Devendra Kumar

Devendra Kumar

  • NA
  • 500
  • 163.6k

Database structure for advance/due payment

Apr 29 2018 3:58 PM
My frontend program is WPF and SQL Server is backend.
 
I had created a billing application with payment module and whenever user make payment, it should be cleared invoice wise. Now there is an addition to that module, below is the given requirement
 
Customer had some due bills like
customerID = 24
InvoiceNo = 5  = Rs 2000
InvoiceNo = 6 = Rs. 3000
InvoiceNo = 15 = Rs. 4000
InvoiceNo = 26 = Rs.  1000
 
Now customer wants to clear its total bill by giving a cheque of Rs. 10000 (i.e a bulk payment to clear all his dues),
 
In addition to above, customer also advances the amount in regard of invoice amounts like for the above case, customer paid a amount of Rs. 15000 (i.e Rs 5000 advance) that's also want to show to user.
 
Here's is the current payment structure that clears the payment invoice wise
 
Output for the user is showing as below
 
Kindly suggest, how to append the above requirement with the current scenario. 

Answers (3)