data-dwh-dbt-project/models/reporting/xero/xero__deals_due_amounts.sql

19 lines
798 B
MySQL
Raw Permalink Normal View History

2025-06-03 11:53:40 +02:00
with
int_xero__deals_due_amounts as (
select * from {{ ref("int_xero__deals_due_amounts") }}
)
select
dda.id_contact as id_contact,
dda.id_deal as id_deal,
dda.contact_name as contact_name,
2025-06-11 16:57:10 +02:00
dda.currency as currency,
dda.total_due_invoice_amount_local_curr as total_due_invoice_amount_local_curr,
dda.total_due_invoice_amount_in_gbp as total_due_invoice_amount_in_gbp,
dda.total_due_credit_note_amount_local_curr
as total_due_credit_note_amount_local_curr,
dda.total_due_credit_note_amount_in_gbp as total_due_credit_note_amount_in_gbp,
dda.total_due_amount_local_curr as total_due_amount_local_curr,
2025-06-03 11:53:40 +02:00
dda.total_due_amount_in_gbp as total_due_amount_in_gbp,
dda.outstanding_type as outstanding_type
from int_xero__deals_due_amounts dda