You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacopo Cappellato <ti...@sastau.it> on 2007/06/08 20:26:00 UTC

Question about InvoiceItem.uomId

Hi all,

while trying to resolve the issue OFBIZ-96 I've discovered what I think 
is a wrong usage of the InvoiceItem.uomId field.
In the form definition for the InvoiceItems list there is this code:

<field name="amount" use-when="uomId!=null"><display type="currency" 
currency="${uomId}"/></field>
<field name="amount" use-when="uomId==null"><display type="currency" 
currency="${invoice.currencyUomId}"/></field>

The meaning is:

if the InvoiceItem.uomId is not null, then use it to display the 
currency of the InvoiceItem.amount field; if null, then use the 
Invoice.currencyUomId field.

I think this is *wrong*: I'm pretty sure that the InvoiceItem.uomId 
should be used to store the uom of the InvoiceItem.quantity field.

Can you please confirm this?

Jacopo

Re: Question about InvoiceItem.uomId

Posted by David E Jones <jo...@hotwaxmedia.com>.
Jacopo,

I think you are exactly correct. It would only make sense for an entire invoice to have a single currency, and yes it makes more sense an unlabeled uomId would associate with a quantity field.

-David


Jacopo Cappellato wrote:
> Hi all,
> 
> while trying to resolve the issue OFBIZ-96 I've discovered what I think 
> is a wrong usage of the InvoiceItem.uomId field.
> In the form definition for the InvoiceItems list there is this code:
> 
> <field name="amount" use-when="uomId!=null"><display type="currency" 
> currency="${uomId}"/></field>
> <field name="amount" use-when="uomId==null"><display type="currency" 
> currency="${invoice.currencyUomId}"/></field>
> 
> The meaning is:
> 
> if the InvoiceItem.uomId is not null, then use it to display the 
> currency of the InvoiceItem.amount field; if null, then use the 
> Invoice.currencyUomId field.
> 
> I think this is *wrong*: I'm pretty sure that the InvoiceItem.uomId 
> should be used to store the uom of the InvoiceItem.quantity field.
> 
> Can you please confirm this?
> 
> Jacopo