elandau2008
Board Regular
- Joined
- Aug 13, 2008
- Messages
- 94
I have a pretty standard relationship database:
Customer: CustomerID, Name
Order: OrderID, Date, CustomerID, Paid, TransactionID
OrderDetails: ID, ProductID, Price
Payment: PaymentID, Amount, CustomerID, Date, method.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
ffice
ffice" /><o
> </o
>
Recording a payment is pretty easy: With forms, the user selects which Orders are to be paid off with this payment and I simply update the PAID flag of those Orders (and update the TransactionID for record-keeping).
The problem comes in with Partial Payments. If a customer pays a partial amount, I want to be able to record this.
One way is to add a PartialPayment field to the Order table and keep a running total of the partial payments but I’d also need a field to keep track of which transactions they were associated with… and since I can’t predict how many partial payments a customer will make towards one order, I need a comma-separated list of transaction numbers. That seems way too complicated.
If I push it back to the Transaction side, I still can’t predict how many Orders a particular transaction will payoff so again, I’d need a comma-seperated list of Orders.
There’s got to be something I’m missing… an additional table maybe? How does one keep track of partial payments and still maintain records so I can go back and determine how each payment was allocated?
<o
> </o
>
Thanks,
-Ed
Customer: CustomerID, Name
Order: OrderID, Date, CustomerID, Paid, TransactionID
OrderDetails: ID, ProductID, Price
Payment: PaymentID, Amount, CustomerID, Date, method.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com




Recording a payment is pretty easy: With forms, the user selects which Orders are to be paid off with this payment and I simply update the PAID flag of those Orders (and update the TransactionID for record-keeping).
The problem comes in with Partial Payments. If a customer pays a partial amount, I want to be able to record this.
One way is to add a PartialPayment field to the Order table and keep a running total of the partial payments but I’d also need a field to keep track of which transactions they were associated with… and since I can’t predict how many partial payments a customer will make towards one order, I need a comma-separated list of transaction numbers. That seems way too complicated.
If I push it back to the Transaction side, I still can’t predict how many Orders a particular transaction will payoff so again, I’d need a comma-seperated list of Orders.
There’s got to be something I’m missing… an additional table maybe? How does one keep track of partial payments and still maintain records so I can go back and determine how each payment was allocated?
<o


Thanks,
-Ed