Merged PR 2349: Retrieve account for xero invoices, credit notes and sales denom mart

Discussing with Jamie on how I can retrieve the information from Xero for E-deposit and Guesty, he told me that these go to a dedicated account. Since these are invoiced, they do not go to the bank transactions.
Specifically:
- 220 - E-Deposit Fees
- 219 - Guesty Fees
- 221 - Guesty Administration fee

After debugging the data (and getting confirmation from Jamie that indeed we were having invoices on e-deposit), I see that this info is available in the original json from staging. This PR aims just to retrieve these 3 fields:
- id_account
- account_code
- account_name

This will be used later on to retrieve the rest of API KPIs

Related work items: #18719
This commit is contained in:
Oriol Roqué Paniagua 2024-07-18 15:47:14 +00:00
parent e250763a1c
commit b16cb172b6
4 changed files with 38 additions and 5 deletions

View file

@ -12,6 +12,9 @@ select
ili.id_line_item as id_line_item,
ili.id_item as id_item,
'invoice' as document_class,
ili.id_account,
ili.account_code,
ili.account_name,
ili.item_code as item_code,
ili.quantity as quantity,
ili.unit_amount as unit_amount,
@ -58,6 +61,9 @@ select
cnli.id_line_item,
cnli.id_item,
'credit note' as document_class,
cnli.id_account,
cnli.account_code,
cnli.account_name,
cnli.item_code,
cnli.quantity,
cnli.unit_amount,