List of commits:
Subject Hash Author Date (UTC)
Included an export to the storage list from Amazon, imporved useability by adding stops 810be612ed40559434e9ddacb904bc4a766b861d Sebastian 2019-05-09 10:24:36
Added a finish process and removed the order process fc33b421234ef320aa5a61f28cfb1e5d815477ca Sebastian 2019-05-08 13:02:21
Added a encoding sniffing to open the files in right encoding on Windows OS machines d0dbe5da1ca5810bfcc240a1e635ce053168b423 Sebastian 2019-05-06 14:54:04
Small usability improvements for the user to detect errors on different OS 2ec13ba3c85207c799eed1cf48ab1230d245a05f Sebastian 2019-05-06 08:25:54
Combined with the picklist creation project 4e5023c3c2bebc53794fe29edbcf9a7be93c826a Sebastian 2019-05-03 11:40:35
Created a building script for Linux based systems and made it possible to use the script from anywhere inside the filesystem e97b391d7b1cda885c99b6b483d414c75b288b75 Sebastian 2019-04-15 15:00:47
Added a working Linux executable Version, together with a different workspace creation process c84d49cf0f99fd3dcb7faabe82c125c8adc970cb Sebastian 2019-04-12 16:53:29
removed unnecessary files from the report and upload folder 94af82cbd9fd7f592fb6b421986c3d900f1bf532 Sebastian 2019-04-05 12:51:43
Added 2 options: a new order import to plenty and a fba shipment creation db5b9c168dabe3d6524b5674dd977044be286e0a Sebastian 2019-04-05 12:48:53
adjusted to another sync format and added a new export format that includes the sale price d33a1909c4f1ff88569509ad4510a5419e323136 Basti 2019-03-22 10:27:22
first Version of the Sync Upload de9ea87dff9ced84f635dd05d5ae039be870ae8a Basti 2019-03-19 16:32:44
First commit including Readme and folder structure 7e77aa7abd6013ce56d6878c7004973e32011a13 Basti 2019-03-19 10:44:36
Commit 810be612ed40559434e9ddacb904bc4a766b861d - Included an export to the storage list from Amazon, imporved useability by adding stops
Author: Sebastian
Author date (UTC): 2019-05-09 10:24
Committer name: Sebastian
Committer date (UTC): 2019-05-09 10:24
Parent(s): fc33b421234ef320aa5a61f28cfb1e5d815477ca
Signing key:
Tree: 70e32def845a5704e84c4fad66c3e2b19bc20c06
File Lines added Lines deleted
inventory_synchronisation.py 39 4
packages/__pycache__/picklist_creation.cpython-37.pyc 0 0
packages/__pycache__/plenty_export.cpython-37.pyc 0 0
packages/__pycache__/shipment_finish.cpython-37.pyc 0 0
packages/__pycache__/syncfile.cpython-37.pyc 0 0
packages/picklist_creation.py 4 1
packages/plenty_export.py 74 0
packages/shipment_finish.py 8 0
File inventory_synchronisation.py changed (mode: 100644) (index bb3cb81..28ffeb4)
... ... import re
6 6 import chardet import chardet
7 7 from packages.syncfile import importAmazonOrder, writeNewCsv from packages.syncfile import importAmazonOrder, writeNewCsv
8 8 from packages.shipment_finish import finishShipment from packages.shipment_finish import finishShipment
9 from packages.plenty_export import plentyExport
9 10 #from packages.excelfile import createExcelSheet #from packages.excelfile import createExcelSheet
10 11
11 12 def main(): def main():
 
... ... def main():
123 124
124 125 task = '' task = ''
125 126
126 while(not(task.lower() == 'ama' or task.lower() == 'fin' or task.lower() == 'fba')):
127 task = input('Do you want to create a new FBA Shipment?(fba)\nDo you want to finish a shipment?(fin)\nOr do you want to import received items at Amazon (ama)?\n')
128 if(not(task.lower() == 'ama' or task.lower() == 'fin' or task.lower() == 'fba')):
129 print("Please enter either 'fba', 'fin' or 'ama'.\n")
127 while(not(task.lower() == 'ama' or\
128 task.lower() == 'fin' or\
129 task.lower() == 'exp' or\
130 task.lower() == 'fba')):
131 task = input('Do you want to create a new FBA Shipment?(fba)\nDo you want to finish a shipment?(fin)\nDo you want to export the plenty quantity to the storage report?(exp)\nOr do you want to import received items at Amazon (ama)?\n')
132 if(not(task.lower() == 'ama' or task.lower() == 'fin' or task.lower() == 'exp' or task.lower() == 'fba')):
133 print("Please enter either 'fba', 'fin', 'exp' or 'ama'.\n")
130 134
131 135 # Set to 0000 because the current state of the script doesnt need the orderid anymore # Set to 0000 because the current state of the script doesnt need the orderid anymore
132 136 order ='0000' order ='0000'
 
... ... def main():
207 211 orderid=order, plentyid=configid, stockreport=shipment_file orderid=order, plentyid=configid, stockreport=shipment_file
208 212 ) )
209 213
214 print("\npress ENTER to continue...")
215 input()
216
217 # PLENTY EXPORT PART
218 if(task.lower() == 'exp'):
219 print("\n{0}\n".format(line))
220 print("Open the current plenty location export ID49\n")
221 print("Use the options: positive physical quantity and FNSKU\n")
222 print("\n{0}\n".format(altline))
223 print("Öffne den derzeitigen plenty Lagerplatz Export ID49\n")
224 print("Nutze die Optionen: positiver physischer Lagerbestand und FNSKU\n")
225 print("\n{0}\n".format(line))
226
227 locationexport={'filepath':'',
228 'encoding':''}
229
230 locationexport['filepath'] = askopenfilename(initialdir=reportpath,
231 title="Storage quantity export Plentymarkets",
232 filetypes=[ ("csv files", "*.csv") ])
233
234 # detect the encoding of the file
235 with open(locationexport['filepath'], mode='rb') as item:
236 raw_data = item.read()
237 locationexport['encoding'] = chardet.detect(raw_data)['encoding']
238
239 plentyExport(plentyexport=locationexport,folder=uploadpath)
240
241 print("\npress ENTER to continue...")
242 input()
243
244
210 245 if __name__ == '__main__': if __name__ == '__main__':
211 246 main() main()
File packages/__pycache__/picklist_creation.cpython-37.pyc changed (mode: 100644) (index 848d35c..1869fd5)
File packages/__pycache__/plenty_export.cpython-37.pyc added (mode: 100644) (index 0000000..a930b0c)
File packages/__pycache__/shipment_finish.cpython-37.pyc changed (mode: 100644) (index d5479a5..0240a0e)
File packages/__pycache__/syncfile.cpython-37.pyc changed (mode: 100644) (index d08846b..a5a2b36)
File packages/picklist_creation.py changed (mode: 100644) (index 3a84ec5..19dd873)
... ... def picklist_creation(shipmentlist, folder, uploadfolder):
19 19 location_file['encoding'] = chardet.detect(raw_data)['encoding'] location_file['encoding'] = chardet.detect(raw_data)['encoding']
20 20
21 21 # The headers of the outputfile # The headers of the outputfile
22 column_names = ['Sku', 'location', 'Barcode', '@location', 'Shipment']
22 column_names = ['Sku', 'location', 'Barcode', '@location', 'Shipment', 'Versand', 'Kiste']
23 23
24 24 # Define the Dictionary for the datasets and the list for multiple locations # Define the Dictionary for the datasets and the list for multiple locations
25 25 # on a single SKU # on a single SKU
 
... ... def picklist_creation(shipmentlist, folder, uploadfolder):
71 71 Data[row['Name']+'+1']['Shipment'] = row['Menge'] Data[row['Name']+'+1']['Shipment'] = row['Menge']
72 72
73 73 syncfile.writeNewCsv(dataset=Data,path=uploadfolder, header=column_names,name='picklist') syncfile.writeNewCsv(dataset=Data,path=uploadfolder, header=column_names,name='picklist')
74
75 print("press ENTER to continue...\n")
76 input()
File packages/plenty_export.py added (mode: 100644) (index 0000000..88471e0)
1 import csv
2 import sys
3 from tkinter.filedialog import askopenfilename
4 from packages import syncfile
5 import datetime
6
7 def plentyExport(plentyexport, folder):
8 today = datetime.datetime.now()
9 todaystr = today.strftime("%d-%m-%Y_%H-%M")
10
11 Data = {}
12
13 column_names = ["SKU",
14 "FNSKU",
15 "QUANTITY",
16 "NUMBER_OF_PLACES",
17 "QTY_PLACE_1",
18 "QTY_PLACE_2",
19 "QTY_PLACE_3",
20 "QTY_PLACE_4",
21 "QTY_PLACE_5"]
22
23 with open(plentyexport['filepath'], mode = 'r', encoding=plentyexport['encoding']) as item:
24 reader = csv.DictReader(item, delimiter = ";")
25
26 for rownum, row in enumerate( reader ):
27 if( not ( row['VariationNo'] in [ * Data ] ) ):
28 stock = 0
29 try:
30 row['Stock'] = int(float(str( row['Stock'] ).replace(",",".") ))
31 stock = row['Stock']
32 except Exception as exc:
33 print("ERROR @ numberformat change: {0}\n".format( exc ))
34 print("press ENTER to continue...\n")
35 input()
36 sys.exit()
37 try:
38 values = [row[ "VariationNo" ],
39 row[ "Barcode" ],
40 stock,
41 1,
42 stock,
43 0,
44 0,
45 0,
46 0
47 ]
48 except KeyError:
49 print("Expected column names: VariationNo, Barcode, Stock\n")
50 print("Got: {0}".format(", ".join([*row])))
51 print("press ENTER to continue...\n")
52 input()
53 sys.exit()
54
55 Data[row['VariationNo']] = dict(zip(column_names, values))
56
57 elif( row['VariationNo'] in [ * Data ]):
58 if(Data[row['VariationNo']]['QUANTITY'] and row['Stock']):
59 row['Stock'] = int(float(str( row['Stock'] ).replace(",",".") ))
60 Data[row['VariationNo']]['NUMBER_OF_PLACES'] += 1
61 try:
62 Data[row['VariationNo']]['QUANTITY'] = int( Data[row['VariationNo']]['QUANTITY'] ) + row['Stock']
63 Data[row['VariationNo']]['QTY_PLACE_' + str(Data[row['VariationNo']]['NUMBER_OF_PLACES'])] = row['Stock']
64
65 except Exception as exc:
66 Data[row['VariationNo']]['QUANTITY'] = exc
67 print("ERROR @ quantity assign: {0}\n".format(exc))
68 print("press ENTER to continue...\n")
69 input()
70 sys.exit()
71
72 syncfile.writeNewCsv(dataset=Data,path=folder,header=column_names,name="export_" + todaystr)
73 if __name__ == '__main__':
74 main()
File packages/shipment_finish.py changed (mode: 100644) (index 98276cb..9602318)
... ... import os
7 7 import sys import sys
8 8 import csv import csv
9 9 import chardet import chardet
10 from packages import plenty_export
10 11
11 12 # Define and initialize the line seperators # Define and initialize the line seperators
12 13 line = "#"*70 line = "#"*70
 
... ... def reducePlentyMarketsQty(dataset, folder):
251 252
252 253 #print("NEW: {0}\n".format( Data[data_row]['Stock'] )) #print("NEW: {0}\n".format( Data[data_row]['Stock'] ))
253 254
255 print("{0}\n".format(line))
256 print("Create a list of the current plentymarkets location quantity\n")
257 print("{0}\n".format(altline))
258 print("Erstelle eine Liste des derzeitigen Bestands der Plentymarkets Lagerplätze\n")
259 plenty_export.plentyExport(plentyexport=locationlist, folder=folder.replace('Report','Upload'))
260 print("{0}\n".format(line))
261
254 262 Data_and_fields = {'data':Data, 'fields':column_names} Data_and_fields = {'data':Data, 'fields':column_names}
255 263 return Data_and_fields return Data_and_fields
256 264
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/initBasti/Complete_Order_Plenty_Update

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/initBasti/Complete_Order_Plenty_Update

Clone this repository using git:
git clone git://git.rocketgit.com/user/initBasti/Complete_Order_Plenty_Update

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main