migrate.py: WKW fixes
This commit is contained in:
@ -1330,7 +1330,7 @@ def migrate_deliveries(in_dir: str, out_dir: str) -> None:
|
|||||||
elif CLIENT == WG.WINZERKELLER:
|
elif CLIENT == WG.WINZERKELLER:
|
||||||
mod['id'] = {
|
mod['id'] = {
|
||||||
1: 'KA', 2: 'LG', 3: 'MG', 4: 'SG',
|
1: 'KA', 2: 'LG', 3: 'MG', 4: 'SG',
|
||||||
5: 'VT', 6: 'MV', 7: 'LW', 8: 'VL',
|
5: 'VT', 6: 'MV', 7: 'UP', 8: 'VL',
|
||||||
9: 'DN', 10: 'SA', 11: 'DA', 12: 'EG',
|
9: 'DN', 10: 'SA', 11: 'DA', 12: 'EG',
|
||||||
}[nr]
|
}[nr]
|
||||||
else:
|
else:
|
||||||
@ -1461,6 +1461,7 @@ def migrate_deliveries(in_dir: str, out_dir: str) -> None:
|
|||||||
|
|
||||||
comment: Optional[str] = d['Anmerkung']
|
comment: Optional[str] = d['Anmerkung']
|
||||||
acid = d['Säure']
|
acid = d['Säure']
|
||||||
|
|
||||||
hand, lesemaschine = None, None
|
hand, lesemaschine = None, None
|
||||||
if comment:
|
if comment:
|
||||||
comment = comment.replace('Söure', 'Säure')
|
comment = comment.replace('Söure', 'Säure')
|
||||||
@ -1475,8 +1476,7 @@ def migrate_deliveries(in_dir: str, out_dir: str) -> None:
|
|||||||
comment = None
|
comment = None
|
||||||
if comment:
|
if comment:
|
||||||
comments.append(comment)
|
comments.append(comment)
|
||||||
|
gerebelt = True if CLIENT == WG.MATZEN or (CLIENT == WG.WINZERKELLER and zwstid == 'W') else d['Gerebelt'] or False
|
||||||
gerebelt = True if CLIENT == WG.MATZEN else d['Gerebelt'] or False
|
|
||||||
f_part.row(
|
f_part.row(
|
||||||
date.year, snr, dpnr, sortid, int(d['Gewicht']), kmw, qualid, hkid, kgnr, rdnr,
|
date.year, snr, dpnr, sortid, int(d['Gewicht']), kmw, qualid, hkid, kgnr, rdnr,
|
||||||
gerebelt, handwiegung, d['Spaetlese-Ueberpruefung'] or False,
|
gerebelt, handwiegung, d['Spaetlese-Ueberpruefung'] or False,
|
||||||
|
Reference in New Issue
Block a user