Skip to content

Commit c946d0f

Browse files
authored
HGI-8761 | Prefer column title over schema mapping (#184)
* Prefer column title over schema mapping * Fix space stripping
1 parent 34bba1d commit c946d0f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,4 @@ cython_debug/
154154
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
155155
#.idea/
156156
.vscode
157+
.DS_Store

tap_quickbooks/quickbooks/reportstreams/BaseReport.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ def _get_column_metadata(self, resp, schema=None):
4040
LOGGER.info(f"Metadata for col {column.get('ColTitle')} not found, skipping.")
4141
continue
4242
# append col to columns
43-
columns.append(schema.get(col_type))
43+
col_title = column.get("ColTitle")
44+
if col_title in schema.values():
45+
columns.append(col_title.replace(" ", ""))
46+
else:
47+
columns.append(schema.get(col_type))
4448
else:
4549
if column.get("ColTitle") == "Memo/Description":
4650
columns.append("Memo")

tap_quickbooks/quickbooks/reportstreams/english_schemas/GeneralLedgerReportFields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"rate": "Rate",
1717
"account_name": "Account",
1818
"split_acc": "Split",
19-
"inv_date": "Invoice Date",
19+
"inv_date": "InvoiceDate",
2020
"is_ar_paid": "A/RPaid",
2121
"is_ap_paid": "A/PPaid",
2222
"is_cleared": "Clr",

0 commit comments

Comments
 (0)