I'm running into a bit of a design question. For an online membership management package, I have the following finance objects: Invoice, Payment, and Receipt.
Normally, there is a 1-to-1 relationship between them, so to effect the workflow, I have actions: *) [treasurer] Generate invoices *) [member] [via List Unpaid Invoices] Lodge Payment *) [treasurer] [via List unacknowledged payments] Acknowledge Payment The last action creates a receipt. Until this point, I was happy with an Invoice containing a Payment, and a Payment containing a Receipt. For symmetry, the Invoice could also contain a Receipt, but perhaps not, see below. However, it is possible (in fact, is required) for a 3rd party to make a payment on behalf of more than 1 member. So now I no longer have a 1-to-1 relationship between Invoice and Payment, although, I suppose, there should be a 1-to-1 between Receipt and Payment. What would you suggest regarding the above? I suppose one approach would be for the 3rd Party making the single payment for multiple invoices to register multiple virtual payments, 1 per invoice? This has some benefits, because otherwise I think I would need to keep track of the value of the debits (invoices) which a single Payment is being used to pay for, to ensure that more invoices are not (accidently) paid for than the value of the Payment. Then again, I might need to do this anyway for the mulltiple virtual payments. Argh.
