lots of currency stuff

This commit is contained in:
Pablo Martin 2024-05-14 12:26:02 +02:00
parent 908ec75d17
commit bc4ca1cbc3
5 changed files with 139 additions and 8 deletions

View file

@ -12,10 +12,19 @@ select
invoice_currency_iso_4217,
exchange_rate_to_gbp,
total_amount_local_curr,
(total_amount_local_curr * exchange_rate_to_gbp)::numeric(
18, 4
) as total_amount_in_gbp,
total_amount_wo_tax_local_curr,
(total_amount_wo_tax_local_curr * exchange_rate_to_gbp)::numeric(
18, 4
) as total_amount_wo_tax_in_gbp,
total_tax_local_curr,
(total_tax_local_curr * exchange_rate_to_gbp)::numeric(18, 4) as total_tax_in_gbp,
total_due_local_curr,
(total_due_local_curr * exchange_rate_to_gbp)::numeric(18, 4) as total_due_in_gbp,
total_paid_local_curr,
(total_paid_local_curr * exchange_rate_to_gbp)::numeric(18, 4) as total_paid_in_gbp,
invoice_status,
full_contact_details,
payments,