diff --git a/backend/fix_store_labels.py b/backend/fix_store_labels.py new file mode 100644 index 0000000..e411502 --- /dev/null +++ b/backend/fix_store_labels.py @@ -0,0 +1,38 @@ +import json +import os +import glob + +def main(): + uploads_dir = "backend/uploads" + if not os.path.exists(uploads_dir): + uploads_dir = "uploads" + + manual_pattern = os.path.join(uploads_dir, "manual_label_*.json") + manual_files = glob.glob(manual_pattern) + + target_store = "PX HEAD OFFICE ANCOL" + target_alamat = "JL. ANCOL BARAT VIII/1 KEL. ANCOL, KEC. PADEMANGAN JAKARTA UTARA, DKI JAKARTA" + fixed_count = 0 + + for mf in manual_files: + try: + with open(mf, "r") as f: + data = json.load(f) + + store = data.get("store", "") + if store == "DKI AREA": + data["store"] = target_store + data["alamat"] = target_alamat + + 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}") + fixed_count += 1 + except Exception as e: + print(f"Error updating {mf}: {e}") + + print(f"Finished updating manual label files. Total files updated: {fixed_count}") + +if __name__ == "__main__": + main() diff --git a/backend/pfm-web-app/public/comparison_report.xlsx b/backend/pfm-web-app/public/comparison_report.xlsx index 732e1b2..34c2fa1 100644 Binary files a/backend/pfm-web-app/public/comparison_report.xlsx and b/backend/pfm-web-app/public/comparison_report.xlsx differ diff --git a/backend/sources/manual_labels.json b/backend/sources/manual_labels.json index 6188e02..6d14b53 100644 --- a/backend/sources/manual_labels.json +++ b/backend/sources/manual_labels.json @@ -378,8 +378,8 @@ "noDO": "1659990584", "tanggal": "30 June 2026", "customer": "PT.PRIMAFOOD INTERNATIONAL", - "store": "DKI AREA", - "alamat": "JL. ANCOL BARAT VIII/1 KEL. ANCOL, KEC. PADEMANGAN, JAKARTA UTARA, DKI JAKARTA (KANTIN CPI)", + "store": "PX HEAD OFFICE ANCOL", + "alamat": "JL. ANCOL BARAT VIII/1 KEL. ANCOL, KEC. PADEMANGAN JAKARTA UTARA, DKI JAKARTA", "plat": "B 9256 JXR", "items": [ { @@ -676,8 +676,8 @@ "noDO": "1659990664", "tanggal": "30 June 2026", "customer": "PT.PRIMAFOOD INTERNATIONAL", - "store": "DKI AREA", - "alamat": "", + "store": "PX HEAD OFFICE ANCOL", + "alamat": "JL. ANCOL BARAT VIII/1 KEL. ANCOL, KEC. PADEMANGAN JAKARTA UTARA, DKI JAKARTA", "plat": "B 9256 JXR", "items": [ { diff --git a/backend/sources/test-images/IMG_20260701_134635.jpg b/backend/sources/test-images/IMG_20260701_134635.jpg deleted file mode 100644 index 5504ea8..0000000 Binary files a/backend/sources/test-images/IMG_20260701_134635.jpg and /dev/null differ diff --git a/backend/sources/test-images/IMG_20260701_134636.jpg b/backend/sources/test-images/IMG_20260701_134636.jpg deleted file mode 100644 index 018e263..0000000 Binary files a/backend/sources/test-images/IMG_20260701_134636.jpg and /dev/null differ