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,
    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,
    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
