Table: Service_Charge
Columns
NameTypeConstraintsDescription
service_charge_KEYintNOT NULLAUTO-INCREMENT: Database assigned primary key for this table
update__staff_KEYintNOT NULL
update_date_utcdatetimeNOT NULL
descriptionnvarchar (250)NOT NULLUser defined description (unique).
annual_ratedecimal (7, 6)NOT NULLRate to be used for the service charge calculation.
service_charge_type_KEYintNOT NULLKey from one of the Service Charge Types. 1=Invoice Date, 2=Due Date, 3=Due Date + Grace Days
grace_daysintNOT NULLNumber of days after the due date the client is given until service charges begin calculating.
minimum_balancedecimal (17, 2)NOT NULLThe system will not calculate service charges for clients unless their A/R balance is equal to or greater than this value.
minimum_chargedecimal (17, 2)NOT NULLIf the system calculates a service charge amount and it is less than this amount then the calculated amount should be dropped and this amount should be used.
use_maximum_chargebitNOT NULLDetermines whether the maximum charge is enforced.
maximum_chargedecimal (17, 2)NOT NULLIf the system calculates a service charge amount and it is greater than this amount then the calculated amount should be dropped and this amount should be used.
compoundbitNOT NULLDetermines whether prior service charges should be included in the balance that is going to be used for the service charge.
roundbitNOT NULLRound to the nearest dollar when true.
create_date_utcdatetimeNOT NULL
Primary key
NameColumnsDescription
PK_Service_Charge$service_charge_KEYservice_charge_KEYCLUSTERED
Unique constraints
NameColumnsDescription
UK_Service_Charge$descriptiondescriptionEach description must be unique.
Indexes
NameColumnsDescription
IX_Service_Charge$service_charge_type_KEYservice_charge_type_KEY
Incoming foreign keys
NameColumnsReferencing tableDescription
FK_Firm__Service_Charge__service_charge_KEYservice_charge_KEYFirm
FK_Client__Service_Charge__service_charge_KEYservice_charge_KEYClient

Schema diagram