migrate.py: Live changes for WKW migration
This commit is contained in:
@ -749,6 +749,9 @@ def migrate_attributes(in_dir: str, out_dir: str) -> None:
|
|||||||
f.row('HU', 'Huber', False, None, False, 0)
|
f.row('HU', 'Huber', False, None, False, 0)
|
||||||
ATTRIBUTE_MAP['M'] = 'M'
|
ATTRIBUTE_MAP['M'] = 'M'
|
||||||
ATTRIBUTE_MAP['HU'] = 'HU'
|
ATTRIBUTE_MAP['HU'] = 'HU'
|
||||||
|
elif CLIENT == WG.WINZERKELLER:
|
||||||
|
f.row('F', 'Fixpreis', False, None, False, 0)
|
||||||
|
ATTRIBUTE_MAP['F'] = 'F'
|
||||||
elif CLIENT == WG.BADEN:
|
elif CLIENT == WG.BADEN:
|
||||||
f.row('D', 'DAC', False, 7500, False, 0)
|
f.row('D', 'DAC', False, 7500, False, 0)
|
||||||
f.row('K', 'Kabinett', False, None, False, 0)
|
f.row('K', 'Kabinett', False, None, False, 0)
|
||||||
@ -1497,7 +1500,7 @@ def fix_deliveries(deliveries: Iterable[Dict[str, Any]]) -> Iterable[Tuple[str,
|
|||||||
|
|
||||||
def migrate_deliveries(in_dir: str, out_dir: str) -> None:
|
def migrate_deliveries(in_dir: str, out_dir: str) -> None:
|
||||||
global DELIVERY_MAP, MODIFIER_MAP, SORT_MAP
|
global DELIVERY_MAP, MODIFIER_MAP, SORT_MAP
|
||||||
DELIVERY_MAP, MODIFIER_MAP, SORT_MAP = {}, {}, {'HU/': 'GV/HU', 'SV/': 'SW/'}
|
DELIVERY_MAP, MODIFIER_MAP, SORT_MAP = {}, {}, {'HU/': 'GV/HU', 'SV/': 'SW/', 'MEF/B': 'ME/F', 'CSF/B': 'CS/F'}
|
||||||
|
|
||||||
modifiers = {
|
modifiers = {
|
||||||
m['ASNR']: m
|
m['ASNR']: m
|
||||||
@ -1518,6 +1521,7 @@ def migrate_deliveries(in_dir: str, out_dir: str) -> None:
|
|||||||
1: 'KA', 2: 'LG', 3: 'MG', 4: 'SG',
|
1: 'KA', 2: 'LG', 3: 'MG', 4: 'SG',
|
||||||
5: 'VT', 6: 'MV', 7: 'UP', 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',
|
||||||
|
13: 'KU',
|
||||||
}[nr]
|
}[nr]
|
||||||
elif CLIENT == WG.BADEN:
|
elif CLIENT == WG.BADEN:
|
||||||
mod['id'] = name[-1] if name.startswith('Klasse') else 'TB' if name == 'Treuebonus' else 'UE'
|
mod['id'] = name[-1] if name.startswith('Klasse') else 'TB' if name == 'Treuebonus' else 'UE'
|
||||||
@ -1601,9 +1605,6 @@ def migrate_deliveries(in_dir: str, out_dir: str) -> None:
|
|||||||
attributes.add('HK')
|
attributes.add('HK')
|
||||||
if 'W' in attributes:
|
if 'W' in attributes:
|
||||||
attributes.remove('W')
|
attributes.remove('W')
|
||||||
elif CLIENT == WG.WINZERKELLER:
|
|
||||||
if 'F' in attributes:
|
|
||||||
attributes.remove('F')
|
|
||||||
elif CLIENT == WG.BADEN:
|
elif CLIENT == WG.BADEN:
|
||||||
if sortid == 'GO':
|
if sortid == 'GO':
|
||||||
sortid = 'SO'
|
sortid = 'SO'
|
||||||
|
Reference in New Issue
Block a user