diff --git a/.DS_Store b/.DS_Store index ded2b90..186debc 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/tap_quickbooks/quickbooks/reportstreams/GeneralLedgerReport.py b/tap_quickbooks/quickbooks/reportstreams/GeneralLedgerReport.py index 4255eda..9abc008 100644 --- a/tap_quickbooks/quickbooks/reportstreams/GeneralLedgerReport.py +++ b/tap_quickbooks/quickbooks/reportstreams/GeneralLedgerReport.py @@ -259,7 +259,53 @@ def sync(self, catalog_entry): for row in row_array: self._recursive_row_search(row, output, categories) - yield from self.clean_row(output, columns) + # Mapping from French keys to English keys + key_mapping = { + "Date": "Date", + "Typed’opération": "TransactionType", + "Typed’opérationId": "TransactionTypeId", + "Nº": "Num", + "Rajusté": "Adj", + "Datedecréation": "CreateDate", + "Créépar": "CreatedBy", + "Datedeladernièremodification": "LastModified", + "Dernièremodificationapportéepar": "LastModifiedBy", + "Nom": "Name", + "NomId": "NameId", + "Client": "Customer", + "ClientId": "CustomerId", + "Fournisseur": "Vendor", + "FournisseurId": "VendorId", + "Employé": "Employee", + "EmployéId": "EmployeeId", + "Lieu": "Location", + "LieuId": "LocationId", + "Produit/service": "Product/Service", + "Produit/serviceId": "Product/ServiceId", + "Mémo/description": "Memo", + "Qté": "Qty", + "Taux": "Rate", + "Nºdecompte": "Account#", + "Compte": "Account", + "CompteId": "AccountId", + "Répartition": "Split", + "Datedefacturation": "InvoiceDate", + "CCPayé": "A/RPaid", + "CFPayé": "A/PPaid", + "Comp.": "Clr", + "Chèqueimprimé": "CheckPrinted", + "Débit": "Debit", + "Crédit": "Credit", + "Soldecourant": "OpenBalance", + "Montant": "Amount", + "Tauxdechange": "ExchangeRate", + "Devise": "Currency", + "Codedetaxe": "TaxCode", + "Soldecourantétranger": "ForeignOpenBalance", + "Débitétranger": "ForeignDebit", + "Créditétranger": "ForeignCredit" + } + yield from self.clean_row(output, [key_mapping.get(c) or c for c in columns]) else: LOGGER.info( f"Syncing GeneralLedgerReport of last {NUMBER_OF_PERIODS} periods"