switch to a single model with a case, docs for it

This commit is contained in:
Pablo Martin 2024-05-23 15:22:42 +02:00
parent b34da23a94
commit b0528ec2c0
6 changed files with 145 additions and 92 deletions

View file

@ -1100,7 +1100,7 @@ models:
data_type: text
description: ""
- name: credit note_currency_iso_4217
- name: credit_note_currency_iso_4217
data_type: character varying
description: |
The currency in which this line item amounts are defined.
@ -1114,3 +1114,45 @@ models:
- name: line_description
data_type: text
description: A text description of the line item.
- name: xero__net_fees
description: |
A summary aggregation table showing the total raw and net fees by month
and year.
Information comes from both Invoices and Credit notes.
Only documents in statuses ('PAID', 'AUTHORISED') are kept.
Net fees get computed by subtracting credited amounts from invoiced
amounts.
columns:
- name: issued_year
data_type: numeric
description: The issuing year of the aggregated documents.
- name: issued_month
data_type: numeric
description: The issuing month of the aggregated documents.
- name: fee_category
data_type: text
description: |
A fee category, one of out of booking_fees, listing_fees,
verification_fees.
- name: fees_invoiced_in_gbp
data_type: numeric
description: The total sum of invoiced fees.
- name: fees_credited_in_gbp
data_type: numeric
description: The total sum of credited fees.
- name: net_fees_in_gbp
data_type: numeric
description: |
Net fees are calculated by subtracting credited fees from invoiced
fees. It might be the case that net fees are negative in some month,
if it happens to be that we have given back to customers more than we
have invoiced them.