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.