Re: Dev - do we need Invoice.billingAccountId and contactMechId?
Posted by
David E. Jones on
May 15, 2006; 1:04am
URL: http://ofbiz.116.s1.nabble.com/Dev-do-we-need-Invoice-billingAccountId-and-contactMechId-tp167896p167899.html
Si Chen wrote:
> This is interesting because we don't have any other payment method that
> is directly associated with an invoice in the Invoice (header) entity.
> Usually we have a more normalized model, but I guess if it works, then
> let's keep it.
In this case it is not a matter of normalization, it is a matter of design. We want an invoice to be associated with at most one billing account. The same is not true for payments, hence the many to many relationship between Payment and BillingAccount through the PaymentApplication entity.
The intention of a BillingAccount is to keep track of invoices and payments for a customer, the credit limit and based on the outstanding invoices and payments the balance on the account, and the "credit" plus outstanding payments that can go toward orders, which when invoiced will apply to the billing account.
-David
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev