Do I need a payment table if you have an invoice table?

this is my billing table:

Billing table: invoice_id creation_date due_date payment_date statustransfer ("not paid", "paid", "expired")user_id total_price

I wonder if it is useful to have a payment table to record user payments for invoices.

Payment table

may be: payment_id payment_date invoice_id price_paid statusenum ("successful", "not successful")

+3
source share
4 answers

If you want to allow more than one payment for invoices, then yes, it will be useful to use a payment table.

, .

+3

. . .

, .

+1

-?

?

, , , - .

+1

invoice_header, invoice_line, account_ledger, ledger_application account.

account_ledger /. -, - .

The table ledger_applicationcontains information on the relationship between payments and bills.

The table invoice_headercontains all the information related to the invoice, which is not included in the table account_ledger.

The table invoice_linecontains data related to the individual elements / quantities / amounts in the invoice.

The table accountstores data about the customer / supplier, such as address, contact information, etc.

+1
source

Source: https://habr.com/ru/post/1739060/


All Articles