Database Design for Credit Purchase I have the following table that holds the purchase order

po_id
supplier_id
transaction_type  -- either cash or credit


and other table that holds the items

po_id 
product_id
quantity
unit_price


Now, how should I handle payment transactions, as payments can either be cash, or credit. If credit, the payment can be made in multiple transactions. and if Cash, there should not be any outstanding payments for this particular purchase order. How can I design a schema that identifies outstanding amounts per purchase order and reflect that in a double entry accounting schema.
You can create the table - Transactions: po_id, client_id, transaction_type, transaction_purpose_id (you can create the table transaction purposes (products, services, taxex and so forth) amount_paid, transaction_status (processing = 1, proccessed = 2, failed = 3, unknown = -1 and so forth). 

Now, a clien can pay for an order however he wants. Taxex can be paid as well.