Need a little help with a query to get all invoices
that are outstanding and what is still due. Each invoice
can have multiple payments as well as multiple products.
Due Date is for days expired not outstanding status.
Total of payments not equal to total of product amounts
determines that. Currently using MySQL 3.51

Thanks

+Invoice Table+
InvoiceID : PK
Customer : Text
I_DueDate : Date

+Payments Table+
PaymentID : PK
InvoiceID : FK
P_Amount : Numeric
P_PayType : Text
P_Date : Date

+Invoice Products Table+
ProductID : PK
InvoiceID : FK
IP_Amount : Numeric
IP_Type : Text

(Simplified Tables)
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to