Subject | Table Design for Account Receivable Report |
---|---|
Author | Edi |
Post date | 2011-07-03T11:37:50Z |
Dear Firebird Master,
I am a newbie on Firebird SQL Programming with Delphi 7, I have 2 tables like this:
SALE_MASTER
-----------
INVOICE_NUMBER*
SALE_DATE
CUST_ID**
CREDIT_TERM
SALE_DETAIL
-----------
INVOICE_NUMBER*
LINE_INCREMENT*
ITEM_ID
QTY
PRICE
I wanna ask for your help, I want to create a report like this:
Account Receivable Report
No.|Customer|yet due date|30days|31-60days|61-90days|Amount
------------------------------------------------------------
1.| CUST A | 10.000 |50.000| - | - | 60.000
2.| CUST B | - |90.000| 100.000 |200.000 |390.000
-------------------------------------------------------------
Credit Total 450.000
My question are:
1. How should I create a table to make a query easier?
2. Should I create "CREDIT" Table?
Thank you
I am a newbie on Firebird SQL Programming with Delphi 7, I have 2 tables like this:
SALE_MASTER
-----------
INVOICE_NUMBER*
SALE_DATE
CUST_ID**
CREDIT_TERM
SALE_DETAIL
-----------
INVOICE_NUMBER*
LINE_INCREMENT*
ITEM_ID
QTY
PRICE
I wanna ask for your help, I want to create a report like this:
Account Receivable Report
No.|Customer|yet due date|30days|31-60days|61-90days|Amount
------------------------------------------------------------
1.| CUST A | 10.000 |50.000| - | - | 60.000
2.| CUST B | - |90.000| 100.000 |200.000 |390.000
-------------------------------------------------------------
Credit Total 450.000
My question are:
1. How should I create a table to make a query easier?
2. Should I create "CREDIT" Table?
Thank you