Table: Billing_Decision_Tax_Collection
This table stores the same thing that [Billing_Decision_Collection] does, but for [Billing_Decision_Taxing_Authority] instead of [Billing_Decision].
Columns
NameTypeConstraintsDescription
update__staff_KEYintNOT NULL
update_date_utcdatetimeNOT NULL
create_date_utcdatetimeNOT NULL
collection_source__ledger_entry_KEYintNOT NULLIdentifies the receipt in the Ledger_Entry table that paid for this collection.
ledger_entry_KEYintNOT NULLThe combination of ledger_entry_KEY, sheet_entry_KEY and taxing_authority_KEY identifies the BDTA row this collection is for.
from__ledger_entry_KEYintNOT NULLIndicates which [Invoice] row was the source of the application in scenarios such as progress billing. Standard entries that users can create have [from__ledger_entry_KEY] set to the same value as [ledger_entry_KEY].
sheet_entry_KEYintNOT NULLThe combination of ledger_entry_KEY, sheet_entry_KEY and taxing_authority_KEY identifies the BDTA row this collection is for.
taxing_authority_KEYintNOT NULLThe combination of ledger_entry_KEY, sheet_entry_KEY and taxing_authority_KEY identifies the BDTA row this collection is for.
amount_collecteddecimal (9, 2)NOT NULLThe amount collected for the tax.
Primary key
NameColumnsDescription
PK_Billing_Decision_Tax_Collection$collection_source__ledger_entry_KEY$ledger_entry_KEY$from__ledger_entry_KEY$sheet_entry_KEY$tcollection_source__ledger_entry_KEY, ledger_entry_KEY, from__ledger_entry_KEY, sheet_entry_KEY, taxing_authority_KEYCLUSTERED
Indexes
NameColumnsDescription
IX_Billing_Decision_Tax_Collection$from__ledger_entry_KEYfrom__ledger_entry_KEYIndex supports foreign key FK_Billing_Decision_Tax_Collection__Invoice__from__ledger_entry_KEY
IX_Billing_Decision_Tax_Collection$ledger_entry_KEY$collection_source__ledger_entry_KEY$from__ledger_entry_KEY$sheet_entry_KEY@aledger_entry_KEY, collection_source__ledger_entry_KEY, from__ledger_entry_KEY, sheet_entry_KEY, amount_collected, taxing_authority_KEY
IX_Billing_Decision_Tax_Collection$sheet_entry_KEY$ledger_entry_KEY$collection_source__ledger_entry_KEY$from__ledger_entry_KEY@asheet_entry_KEY, ledger_entry_KEY, collection_source__ledger_entry_KEY, from__ledger_entry_KEY, amount_collected, taxing_authority_KEY
IX_Billing_Decision_Tax_Collection$sheet_entry_KEY$ledger_entry_KEY$taxing_authority_KEYsheet_entry_KEY, ledger_entry_KEY, taxing_authority_KEYIndex supports foreign key FK_Billing_Decision_Tax_Collection__Billing_Decision_Taxing_Authority__sheet_entry_KEY__ledger_entry_KEY__taxing_authority_KEY
IX_Billing_Decision_Tax_Collection$taxing_authority_KEYtaxing_authority_KEY
Foreign keys
NameColumnsReferenced tableDescription
FK_Billing_Decision_Tax_Collection__Billing_Decision_Taxing_Authority__sheet_entry_KEY__ledger_entry_KEY__taxing_authority_KEYsheet_entry_KEY, ledger_entry_KEY, taxing_authority_KEYBilling_Decision_Taxing_Authorityon delete cascade;
FK_Billing_Decision_Tax_Collection__Invoice__from__ledger_entry_KEYfrom__ledger_entry_KEYInvoiceon delete cascade;
FK_Billing_Decision_Tax_Collection__Ledger_Entry__collection_source__ledger_entry_KEYcollection_source__ledger_entry_KEYLedger_Entryon delete cascade;

Schema diagram