Hi,
What your trying to do sounds better accomplished with a billing/invoicing system in addition to plutus.
Businesses typically keep track of all of a customers purchases through the use of invoices and receipts and other "commercial documents". Back in the day, the accountants would translate all these items into transactions in the accounting books. In other words, invoices/bills are customer facing, whereas Accounts are private to the business.
For you, I would suggest keeping track of the various payments in something like an Invoice class. You can have LineItems for these, as well… so many-to-one LineItems to Invoice for example. Then Customer would have one-to-many Invoices.
Each LineItem could have an account associated with it, or a Product that has the account associated with it.
For example, you might have a "Monthly Billing" product, which would have a one-to-one association with some Revenue account, and additionally a "One off payment" product which would be associated with a different Revenue account.
So your relationships might look like
Customer (has_many ->) Invoices (has_many ->) Line Items (belongs_to->) Product (belongs_to ->) Plutus::Account
So when you generate your Invoice, you look up the Plutus::Account for each Product, and then create the Plutus::Transaction and associate it with the Invoice as the `commercial_document`.
In any case, I wouldn't suggest using plutus to keep track of customers' billing and payments. Plutus really should be seen as a traditional accounting system that tracks the business's internal financial situation.
--
Michael Bulat
Sent with Sparrow (
http://www.sparrowmailapp.com/?sig)
> --
> You received this message because you are subscribed to the Google Groups "plutus-gem" group.
> To post to this group, send email to
plutu...@googlegroups.com (mailto:
plutu...@googlegroups.com).
> To unsubscribe from this group, send email to
plutus-gem+...@googlegroups.com (mailto:
plutus-gem+...@googlegroups.com).
> To view this discussion on the web visit
https://groups.google.com/d/msg/plutus-gem/-/gnggSlw5DDMJ.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>