Table: dbo.Receivable_Transaction
Columns
Name | Type | Constraints | Description
receivable_transaction_KEY | int (4) | NOT NULL | Primary key
customer__client_KEY | int (4) | NOT NULL | Currently, this is the foreign key of the client being billed by the accountant. In the future, this key will be generalized to point to any customer that may have to be billed (a foreign key into a customer table). At that point, the firm client (accountant) will contain a customer record for all their clients and a regular client will contain customer records for those they do business with.
customer_name | nvarchar (100) | NOT NULL | The name of the customer at the time the receivable was created.
receivable_transaction_type_KEY | int (4) | NOT NULL | Determines the kind of receivable record ie. an invoice, a credit memo, etc. The system only supports client billing invoices at the moment.
transaction_status_KEY | int (4) | NOT NULL | The current state of the transaction ie. is it pending, has it been finalized, is it deleted, etc.
transaction_date | smalldatetime (4) | NOT NULL | Normally, this is the date the invoice was created; however, it can be overridden by the user.
reference_number | nvarchar (86) | NOT NULL | For an invoice, the alphanumeric reference number can be automatically created by incrementing the last reference number used. The user can override this and even leave it blank. For other types of receivables, the contents of this field may be always set by the process or may completely be in the users control.
description | nvarchar (480) | NOT NULL | A description of the receivable. It can be left blank.
gross_amount | decimal (9, 2) | NOT NULL | The total gross amount of the receivable which means it does not include any discount adjustments. This total always equals the sum of the receivable details.
gross_amount_override | decimal (9, 2) |  | An override of the total gross amount. This override amount does not have to equal the sum of the details. If the user hasn't overridden the gross amount, then this value is NULL.
discount_amount | decimal (9, 2) | NOT NULL | The total amount of calculated discount available for this invoice.
discount_amount_override | decimal (9, 2) |  | A user override of the calculated discount amount. If the user didn't override the discount amount, then this value is NULL.
practice_cs_latest_export_date | smalldatetime (4) |  | The date that the receivable transaction was last exported to Practice CS. If the date is null, then the transaction has never exported to Practice CS.

Primary key
Name | Columns | Description
PK_Receivable_Transaction | receivable_transaction_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_Receivable_Transaction__Client__customer__client_KEY | customer__client_KEY | Client (client_KEY) |
FK_Receivable_Transaction__Receivable_Transaction_Type__receivable_transaction_type_KEY | receivable_transaction_type_KEY | Receivable_Transaction_Type (receivable_transaction_type_KEY) |
FK_Receivable_Transaction__Transaction_Status__transaction_status_KEY | transaction_status_KEY | Transaction_Status (transaction_status_KEY) |

Incoming foreign keys
Name | Columns | Referencing table | Description
FK_Receivable_Transaction_Print_Option__Receivable_Transaction__receivable_transaction_KEY | receivable_transaction_KEY | Receivable_Transaction_Print_Option |
FK_Receivable_Transaction_Print_Override__Receivable_Transaction__receivable_transaction_KEY | receivable_transaction_KEY | Receivable_Transaction_Print_Override |
FK_Receivable_Transaction_Detail__Receivable_Transaction__receivable_transaction_KEY | receivable_transaction_KEY | Receivable_Transaction_Detail |
FK_Payable_Transaction_N_Receivable_Transaction__Receivable_Transaction__receivable_transaction_KEY | receivable_transaction_KEY | Payable_Transaction_N_Receivable_Transaction |