Table: Service_Charge
Columns
Name | Type | Constraints | Description
service_charge_KEY | int | NOT NULL | AUTO-INCREMENT: Database assigned primary key for this table
update__staff_KEY | int | NOT NULL |
update_date | datetime | NOT NULL |
description | nvarchar (30) | NOT NULL | User defined description (unique).
annual_rate | decimal (7, 6) | NOT NULL | Rate to be used for the service charge calculation.
service_charge_type_KEY | int | NOT NULL | Key from one of the Service Charge Types. 1=Invoice Date, 2=Due Date, 3=Due Date + Grace Days
grace_days | int | NOT NULL | Number of days after the due date the client is given until service charges begin calculating.
minimum_balance | decimal (17, 2) | NOT NULL | The system will not calculate service charges for clients unless their A/R balance is equal to or greater than this value.
minimum_charge | decimal (17, 2) | NOT NULL | If 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_charge | bit | NOT NULL | Determines whether the maximum charge is enforced.
maximum_charge | decimal (17, 2) | NOT NULL | If 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.
compound | bit | NOT NULL | Determines whether prior service charges should be included in the balance that is going to be used for the service charge.
round | bit | NOT NULL | Round to the nearest dollar when true.
create_date | datetime | NOT NULL |

Primary key
Name | Columns | Description
PK_Service_Charge$service_charge_KEY | service_charge_KEY | CLUSTERED
Unique constraints
Name | Columns | Description
UK_Service_Charge__description | description | Each description must be unique.
Indexes
Name | Columns | Description
IX_Service_Charge$service_charge_type_KEY | service_charge_type_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_Service_Charge__Service_Charge_Type__service_charge_type_KEY | service_charge_type_KEY | Service_Charge_Type |

Incoming foreign keys
Name | Columns | Referencing table | Description
FK_Client__Service_Charge__service_charge_KEY | service_charge_KEY | Client |
FK_Firm__Service_Charge__service_charge_KEY | service_charge_KEY | Firm |