Car Service | Subject area: PAYMENT AND INVOICE

DocsCar Service → Subject area: PAYMENT AND INVOICE

Subject area: PAYMENT AND INVOICE

Overview

The Logical Data Model of the PAYMENT AND INVOICE Subject Area includes the following entities:

Entity: PAYMENT_METHOD

List of payment methods.

Attributes
ID PRIMARY KEY
Name Payment method name. NOT NULL UNIQUE. Can't have two payment methods with the same name.
Code Payment method code. NOT NULL
Sequence_No The sequence number helps to order the Payment methods list when displayed.
Description Payment method description.

Example

PAYMENT_METHOD

Name
CASH
CARD
Paypal
Stripe
etc.

Entity: PAYMENT

This entity records information about all Payments recorded for an Invoice.

Attributes
ID PRIMARY KEY
Invoice_ID Lookup for the Invoice for which the Payment was recorded. An INVOICE can have one or many payments assigned. For example an Invoice has two payments assigned when 30% of the total amount is paid with CASH and the rest is paid with CARD. NOT NULL
Payment_Method_ID Lookup for the Payment Method used for the Payment. NOT NULL
Payment_No Payment number that Shop associates with the Payment. Cannot have two payments with the same Payment_No. NOT NULL UNIQUE
Amount The Amount that was paid. The INVOICE.Total attribute and the PAYMENT.Amount attribute should have the same value. See Entity: INVOICE for more information. NOT NULL
Payment_Time Timestamp when payment was registered. The ORDER_HEADER.Payment_Time attribute and the PAYMENT.Payment_Time attribute should have the same value. See Subject Area: ORDER , Entity: ORDER_HEADER for more information. NOT NULL
Is_Canceled Flag to indicate if the Payment is Canceled. If an already paid Order is Canceled, then the associated Payment is also Canceled. See Subject Area: ORDER - Order Process and Status, Step: CANCEL Order for more information. NOT NULL
Canceled_Time Timestamp when Payment was Canceled.
Cancel_Reason Payment cancel reason. The PAYMENT.Is_Canceled, PAYMENT.Canceled_Time and PAYMENT.Canceled_Reason attributes should have the same values with ORDER_HEADER.Is_Canceled, ORDER_HEADER.Canceled_Time and ORDER_HEADER.Canceled_Reason attributes for the Order for which the Payment was recorded and then Canceled. See Subject Area: ORDER - Order Process and Status, Step: CANCEL Order for more information.
Comments Internal notes used for clarifications on record content.

Entity: INVOICE

This entity records information about all Invoices recorded for an Order.

Attributes
ID PRIMARY KEY
Order_ID Lookup for the Order for which the Invoice was recorded. NOT NULL
Invoice_No Invoice number that Shop associates with the Invoice. Cannot have two invoices with se same Invoice_No. NOT NULL UNIQUE
Invoice_Time Timestamp when Invoice was registered. NOT NULL
Is_Canceled Flag to indicate if the Invoice is Canceled. If an Order is Canceled, then the associated Invoice is also Canceled. See Subject Area: ORDER - Order Process and Status, Step: CANCEL Order for more information. NOT NULL
Canceled_Time Timestamp when Invoice was Canceled.
Cancel_Reason Invoice cancel reason. The INVOICE.Is_Canceled, INVOICE.Canceled_Time and INVOICE.Canceled_Reason attributes should have the same values with ORDER.Is_Canceled, ORDER.Canceled_Time and ORDER.Canceled_Reason attributes for the Payment for which the Invoice was recorded and then Canceled. See Subject Area: ORDER - Order Process and Status, Step: CANCEL Order for more information.
Comments Internal notes used for clarifications on record content.

Entity: INVOICE_LINE

This entity records information about all the Invoice Lines of an Invoice.

Attributes
ID PRIMARY KEY
Invoice_ID Lookup for the Invoice for which the Invoice line is recorded. NOT NULL
Order_Line_ID Lookup for the Order Line for which the Invoice Line is recorded. Each Invoice Line is recorded for an Order Line. NOT NULL
Line_No The sequential number of an Invoice Line. An Invoice can have many lines. Each Invoice Line has a sequential number: 1, 2, 3 etc. This attribute can help to sort the Invoice lines and also to reference an Invoice Line (for example when Shop Employee and Customer review an Invoice) etc. NOT NULL
Is_Canceled Flag to indicate if the Invoice Line is Canceled. If an Invoice is Canceled, then the associated Invoice Line is also Canceled. NOT NULL
Canceled_Time Timestamp when Invoice Line was Canceled.
Cancel_Reason Invoice Line cancel reason. The INVOICE_LINE.Is_Canceled, INVOICE_LINE.Canceled_Time and INVOICE_LINE.Canceled_Reason attributes should have the same values with INVOICE.Is_Canceled, INVOICE.Canceled_Time and INVOICE.Canceled_Reason attributes for the Invoice for which the Invoice Line was recorded and then Canceled.
Comments Internal notes used for clarifications on record content.

Accelerate every database schema design with powerful data models

We have already designed the data model and prepared the SQL scripts for creating the database schema objects.

Try Data Model Pack Free

© 2025 Data Model Pack · Terms of Use · Privacy

Top