David Nelson Posted February 5, 2012 Posted February 5, 2012 I have an Invoices table (normalized as per forum instructions) and LineItems. We do not have Products but instead have Classes. A class can be $125. Then I add a new lineitem for sales tax and different things all which total the invoice to $155. When payment comes in for $155, do I just apply it to the invoice by selecting the InvoiceID in the lineitem where the payment is recorded or do I need to break down the payment and 'pay' each lineitem individually or can the computer just do it for me or does it even matter? I ask because I was doing it fine then a student paid $145 and I do not know which 'item' to short change since none of them equals $10. I hope this is clear.
Ocean West Posted February 5, 2012 Posted February 5, 2012 Some questions to ponder: Does one payment satisfy an entire invoice? Can someone make a partial payment on one invoice? Can a single payment cover multiple invoices? Do you accept multiple forms of payments to pay one (or more) invoice(s)? At the risk of complexity if you take ONE payment of $155 to pay for ONE invoice then you could simply at the invoice level record the amount paid / date paid / perhaps record the check number / and or payment type if it were say PayPal or Credit Card / Cash. Curious regarding a line item used solely for tax charged. Typically i would have a check box on each line item and if checked "Taxable" the line item would calculate the sub-total and total... ( quantity * price ) = Subtotal | Case( Taxable = true ; Subtotal * taxRate ) = SalesTax | Subtotal + SalesTax = Total. This way you can control with line items are taxable. - this could also be extended to "shipping & handling". I never apply payment to a particular line item per say - unless there are commissions due for the sales associate per item and you have multiple sales associates on one invoice - however I would tend to normalize that out to its own commissions table. If the answers to the questions above are yes you my need to create a payments table and manage payments separately, and or have a join table between invoices & payments.
David Nelson Posted February 6, 2012 Author Posted February 6, 2012 That makes a lot of sense, Ocean West. Thank you for taking the time to respond. I never would have considered all the things you listed. I will see what I can make and I will be back if stuck. Thanks again.
Recommended Posts
This topic is 4734 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now