Dev - do we need Invoice.billingAccountId and contactMechId?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Dev - do we need Invoice.billingAccountId and contactMechId?

Si Chen-2
Hi everybody -

Do we need the fields on "billingAccountId" and "contactMechId" on
Invoice entity?  Is anyone using them for any purpose?

Si

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - do we need Invoice.billingAccountId and contactMechId?

David E. Jones

I think the answer is a definite yes... This should be the one and only way to associate an Invoice with a BillingAccount.

It is true that the PaymentApplication entity has sufficient fields to do this, but it should _never_ be used for that, it is a "PaymentApplication" after all, and not an "Invoice Application". So, when getting the list of Invoices related to a BillingAccount the Invoice.billingAccountId is the one that should be used...

-David


Si Chen wrote:

> Hi everybody -
>
> Do we need the fields on "billingAccountId" and "contactMechId" on
> Invoice entity?  Is anyone using them for any purpose?
>
> Si
>
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - do we need Invoice.billingAccountId and contactMechId?

Jacopo Cappellato
In reply to this post by Si Chen-2
Si,

the invoice sub screen in the billing account pages uses the field to
show invoices associated to the billing account (and I think that the
same is true for the services that compute the balance of a billing
account).

Question: is there a way to apply a payment to a billing account
(instead of invoices)? I'd like to see payments applied to a billing
account under the payments sub screen in the billing account screens as
well as invoices.

Jacopo


Si Chen wrote:

> Hi everybody -
>
> Do we need the fields on "billingAccountId" and "contactMechId" on
> Invoice entity?  Is anyone using them for any purpose?
>
> Si
>
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - do we need Invoice.billingAccountId and contactMechId?

Si Chen-2
Jacopo,

I think the PaymentApplication has a billingAccountId field that is for that--am I right, David?

Si

Jacopo Cappellato wrote:
Si,

the invoice sub screen in the billing account pages uses the field to 
show invoices associated to the billing account (and I think that the 
same is true for the services that compute the balance of a billing 
account).

Question: is there a way to apply a payment to a billing account 
(instead of invoices)? I'd like to see payments applied to a billing 
account under the payments sub screen in the billing account screens as 
well as invoices.

Jacopo


Si Chen wrote:
  
Hi everybody -

Do we need the fields on "billingAccountId" and "contactMechId" on 
Invoice entity?  Is anyone using them for any purpose?

Si

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

    

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev


  

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - do we need Invoice.billingAccountId and contactMechId?

Si Chen-2
In reply to this post by David E. Jones
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.

What about contactMechId?  Is that used right now?  If not, do we need it?  Because we do have InvoiceContactMech...

Si

David E Jones wrote:
I think the answer is a definite yes... This should be the one and only way to associate an Invoice with a BillingAccount.

It is true that the PaymentApplication entity has sufficient fields to do this, but it should _never_ be used for that, it is a "PaymentApplication" after all, and not an "Invoice Application". So, when getting the list of Invoices related to a BillingAccount the Invoice.billingAccountId is the one that should be used...

-David


Si Chen wrote:
  
Hi everybody -

Do we need the fields on "billingAccountId" and "contactMechId" on 
Invoice entity?  Is anyone using them for any purpose?

Si

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
    
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev


  

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - do we need Invoice.billingAccountId and contactMechId?

David E. Jones

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