From 089f775eebb9bd5ae21a2a735c2ef10da2cb4254 Mon Sep 17 00:00:00 2001 From: Talha Ahmed Date: Mon, 24 Aug 2026 22:09:48 +0500 Subject: [PATCH] Recognize 40 more marketplace header variants from the finance reference workbook Promotional Discounts (9 marketplaces), German singular credit forms, Belgian Total Discounts, Italian Marketplace Withheld VAT, the Turkish native headers, and 8 Transaction Release Date translations. Unmapped amount columns raise unmapped_amounts errors that block control C2, so these close real gaps. Co-Authored-By: Claude Fable 5 --- ar-aging-app/backend/app/core/column_map.py | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/ar-aging-app/backend/app/core/column_map.py b/ar-aging-app/backend/app/core/column_map.py index bffb089..a0bbba6 100644 --- a/ar-aging-app/backend/app/core/column_map.py +++ b/ar-aging-app/backend/app/core/column_map.py @@ -100,12 +100,14 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ ("account_type", "text", ("account type", "accounttype")), ("fulfillment", "text", ( "fulfillment", "fulfilment", "fulfillment channel", + "shipping/fulfillment", "fulfillment/shipping", # ES / TR English-form "expédition", "traitement", # FR / BE "versand", # DE "gestione", # IT "gestión logística", # ES "realizacja", # PL "leverans", # SV + "gönderim", # TR )), ("order_city", "text", ( "order city", "city", @@ -116,9 +118,13 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ "bestelling stad", "miejscowość zamówienia", "stad för beställning", + "sipariş şehri", # TR )), ("order_state", "text", ( "order state", "state", + "order state/province", "state/province", # IE/NL/PL/SV/BE, DE + "order region/province", "order province/state", # FR, IT + "order region/autonomous community", # ES "état de la commande", "région d'où provient la commande", "bundesland", "provincia di provenienza dell'ordine", @@ -126,9 +132,11 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ "status bestelling", "stan zamówienia", "delstat för beställning", + "sipariş durumu", # TR (order-state column, per reference workbook) )), ("order_postal", "text", ( "order postal", "postal", "postal code", "zip", + "order postal code", # FR/IE/IT/NL/PL/ES/SV/BE/TR English-form "commande postale", "code postal de la commande", "postleitzahl", "cap dell'ordine", @@ -136,6 +144,7 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ "bestelling per post", "przekaz pocztowy", "postadress för beställning", + "sipariş postası", # TR )), ("tax_collection_model", "text", ( "tax collection model", "tax collection responsible party", @@ -146,6 +155,7 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ )), ("product_sales", "amount", ( "product sales", "sales", + "ürün satışları", # TR "ventes de produits", # FR / BE "umsätze", # DE "vendite", # IT @@ -163,6 +173,8 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ )), ("shipping_credits", "amount", ( "shipping credits", "shipping", "postage credits", + "shipping credit", # DE (singular English-form) + "kargo kredileri", # TR "crédits d'expédition", "crédits d’expédition", "gutschrift für versandkosten", "accrediti per le spedizioni", @@ -173,6 +185,8 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ )), ("shipping_credits_tax", "amount", ( "shipping credits tax", + "tax on shipping credits", # FR / IT / ES English-form + "tax on shipping credit", # DE (singular English-form) "taxe sur les crédits d'expédition", "taxe sur les crédits d’expédition", "steuer auf versandgutschrift", "imposta accrediti per le spedizioni", @@ -180,6 +194,7 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ )), ("gift_wrap_credits", "amount", ( "gift wrap credits", "gift wrap", "giftwrap credits", + "gift wrap credit", # DE (singular English-form) "crédits d'emballage-cadeau", "crédits d’emballage-cadeau", "crédits sur l'emballage cadeau", "gutschrift für geschenkverpackung", @@ -191,6 +206,8 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ )), ("giftwrap_credits_tax", "amount", ( "giftwrap credits tax", "gift wrap credits tax", + "tax on gift wrap credits", # FR / IT / ES English-form + "tax on gift wrap credit", # DE (singular English-form) "taxes sur les crédits cadeaux", "steuer auf geschenkverpackungsgutschriften", "imposta sui crediti confezione regalo", @@ -200,6 +217,8 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ ("tax_on_regulatory_fee", "amount", ("tax on regulatory fee",)), ("promotional_rebates", "amount", ( "promotional rebates", "promotional rebate", + "promotional discounts", # FR/DE/IE/IT/NL/PL/ES/SV/TR English-form + "total discounts", # BE "rabais promotionnels", "total des réductions", "rabatte aus werbeaktionen", "sconti promozionali", @@ -207,9 +226,11 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ "promotiekortingen", "rabaty promocyjne", "kampanjrabatter", + "promosyon indirimleri", # TR )), ("promotional_rebates_tax", "amount", ( "promotional rebates tax", "promotional rebate tax", + "tax on promotional discounts", # FR / DE / IT / ES English-form "taxes sur les remises promotionnelles", "steuer auf aktionsrabatte", "imposta sugli sconti promozionali", @@ -225,6 +246,7 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ )), ("marketplace_withheld_tax", "amount", ( "marketplace withheld tax", + "marketplace withheld vat", # IT English-form "marketplace facilitator tax", "marketplace facilitator tax", "taxe marketplace facilitator", # BE (FR) "taxes retenues sur le site de vente", # FR @@ -244,6 +266,7 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ "verkoopkosten", # NL "opłaty za sprzedaż", # PL "försäljningsavgifter", # SV + "satış ücretleri", # TR )), ("fba_fees", "amount", ( "fba fees", "fba fee", "fulfillment fees", @@ -255,6 +278,7 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ "fba-vergoedingen", "opłaty za fba", "fba-avgifter", + "amazon lojistik ücretleri", # TR )), ("other_transaction_fees", "amount", ( "other transaction fees", "other transaction fee", @@ -265,6 +289,7 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ "overige transactiekosten", "inne opłaty transakcyjne", "övriga transaktionsavgifter", + "diğer işlem ücretleri", # TR )), ("other", "amount", ( "other", @@ -275,6 +300,7 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ "overige", # NL "inne", # PL "övrigt", # SV + "diğer", # TR )), ("transaction_status", "text", ( "transaction status", @@ -282,11 +308,22 @@ CANONICAL_FIELDS: list[tuple[str, str, tuple[str, ...]]] = [ "transaktionsstatus", # DE "stato della transazione", # IT "estado de la transacción", # ES + "transactiestatus", # NL + "status transakcji", # PL + "İşlem durumu", # TR )), ("transaction_release_date", "date", ( "transaction release date", "date de délivrance de la transaction", # FR / BE CSV + "date de sortie de la transaction", # FR "transaktionsfreigabedatum", # DE + "freigabedatum der transaktion", # DE + "data di rilascio della transazione", # IT + "fecha de liberación de la transacción", # ES + "publicatiedatum van transactie", # NL + "data zrealizowania transakcji", # PL + "transaktionens utgivningsdatum", # SV + "İşlem çıkış tarihi", # TR )), ("total", "amount", ( "total", "total amount", "amount",