Using country_code as PK

This commit is contained in:
2023-07-14 00:13:58 +02:00
parent 4ac40db55a
commit b8faeb636f
2 changed files with 18 additions and 16 deletions

View File

@ -31,6 +31,8 @@ GROSSLAGE_MAP: Optional[Dict[int, int]] = None
MEMBER_MAP: Optional[Dict[int, Dict[str, Any]]] = None
GROSSLAGE_KG_MAP: Optional[Dict[int, int]] = None
AUSTRIA = 40
QUAL_MAP: Dict[int, str] = {
0: 'WEI',
1: 'RSW',
@ -504,7 +506,7 @@ def migrate_branches(in_dir: str, out_dir: str) -> None:
tel, mob = normalize_phone_nr(b['Telefon']), None
if tel and tel[4] == '6':
mob, tel = tel, None
f.row(b['Kennbst'], b['Name'].strip().title(), 'AT', postal_dest, address,
f.row(b['Kennbst'], b['Name'].strip().title(), AUSTRIA, postal_dest, address,
tel, normalize_phone_nr(b['Telefax']), mob)
@ -846,7 +848,7 @@ def migrate_members(in_dir: str, out_dir: str) -> None:
m['Geburtsjahr'], m['Eintrittsdatum'], m['Austrittsdatum'], m['Geschäftsanteile1'] or 0,
m['BHKontonummer'], zwstid, bnr, ustid,
m['Volllieferant'] or False, m['Buchführend'] or False, funktionaer, active,
iban, bic, 'AT', postal_dest, address or '-', email, kgnr, m['Anmerkung']
iban, bic, AUSTRIA, postal_dest, address or '-', email, kgnr, m['Anmerkung']
)
phone_1: Optional[str] = m['Telefon']
@ -982,7 +984,7 @@ def migrate_members(in_dir: str, out_dir: str) -> None:
'default_kgnr': kgnr
}
if billing_name:
f_mba.row(mgnr, billing_name, 'AT', postal_dest, address or '-')
f_mba.row(mgnr, billing_name, AUSTRIA, postal_dest, address or '-')
def migrate_area_commitments(in_dir: str, out_dir: str) -> None: