...
header lines → if header fields can be repeated, we also provide them as header lines so that they can be associated to the right note
detail _MUT → this is the most granular detail line, which includes a description etc.lines → there are two types of detail lines
Those which do not include a subtotal: Detail_MUT
Often included date, nomeclature number, description, …
But never a TK amount (actual paid amount)
Those which do include a subtotal: Item_With_Subtotal
Include a TK amount
subtotal → this is the subtotal for a note. There can be multiple subtotals per documentItem_With_Subtotal → this is a hybrid between a detail_MUT and a subtotal line
total → this is the total for the document “there can be only one”
...
a detail_MUT line does not have the column “TK amount” (amount actually paid)
a subtotal line only has amounts (no description, nomenclature code, …)
sometimes a line is contains information both a on the detail line and a on the subtotal. This is done when the note consists of exactly one item
An Item_With_Subtotal therefore has the fields of a detail_MUT line (description, nomenclature code) and the fields of a subtotal line (notably TK amount)
An Item_With_Subtotal line cannot be summed up in another subtotal line (it can be summed up into the document total)
detail_MUT
Table name: detail_MUT
...