feat: standardise customer name as PT. PRIMAFOOD INTERNATIONAL and update report

This commit is contained in:
Rafhan Mazaya Fathurrahman committed 2026-07-02 16:48:09 +07:00
1 parent 6666ecd599
commit acd8fb4295
3 files changed
+45 -33

No files matched your search

+13 -1
View File
@@ -12,6 +12,7 @@ def main():
target_store = "PX HEAD OFFICE ANCOL"
target_alamat = "JL. ANCOL BARAT VIII/1 KEL. ANCOL, KEC. PADEMANGAN JAKARTA UTARA, DKI JAKARTA"
target_customer = "PT. PRIMAFOOD INTERNATIONAL"
fixed_count = 0
for mf in manual_files:
@@ -19,15 +20,26 @@ def main():
with open(mf, "r") as f:
data = json.load(f)
is_modified = False
# Fix customer
current_customer = data.get("customer", "")
if current_customer != target_customer:
data["customer"] = target_customer
is_modified = True
# Fix store
store = data.get("store", "")
if store == "DKI AREA":
data["store"] = target_store
data["alamat"] = target_alamat
is_modified = True
if is_modified:
with open(mf, "w", encoding="utf-8") as f:
json.dump(data, f, indent=2, ensure_ascii=False)
print(f"Fixed store & address in manual label: {mf}")
print(f"Updated manual label: {mf}")
fixed_count += 1
except Exception as e:
print(f"Error updating {mf}: {e}")