added credit note reporting models
This commit is contained in:
parent
791cbd47e8
commit
fb89652159
2 changed files with 59 additions and 0 deletions
22
models/reporting/xero/xero__credit_note_line_items.sql
Normal file
22
models/reporting/xero/xero__credit_note_line_items.sql
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
with
|
||||
int_xero__credit_note_line_items as (
|
||||
select * from {{ ref("int_xero__credit_note_line_items") }}
|
||||
)
|
||||
|
||||
select
|
||||
id_credit_note as id_credit_note,
|
||||
id_line_item as id_line_item,
|
||||
id_item as id_item,
|
||||
item_code as item_code,
|
||||
quantity as quantity,
|
||||
unit_amount as unit_amount,
|
||||
line_amount_local_curr as line_amount_local_curr,
|
||||
line_amount_in_gbp as line_amount_in_gbp,
|
||||
line_amount_wo_taxes_local_curr as line_amount_wo_taxes_local_curr,
|
||||
line_amount_wo_taxes_in_gbp as line_amount_wo_taxes_in_gbp,
|
||||
tax_amount_local_curr as tax_amount_local_curr,
|
||||
tax_amount_in_gbp as tax_amount_in_gbp,
|
||||
tax_type as tax_type,
|
||||
credit_note_currency_iso_4217 as credit_note_currency_iso_4217,
|
||||
line_description as line_description
|
||||
from int_xero__credit_note_line_items li
|
||||
Loading…
Add table
Add a link
Reference in a new issue