need arbitrary precision for unit price in purchase orders/invoices

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

need arbitrary precision for unit price in purchase orders/invoices

Art Hughes
Hi,

I have a need for arbitrary precision for unit price in purchase orders
and invoices. We manufacture products using electronic components which
we buy in bulk. A typical unit cost varies between 1 and 5 digits, e.g.
$.6 or $0.56308. A purchase of 7000 pieces should be $3941.56, on the
purchase order it is $3920.00 and on the invoice $3941.00.

Anyone know how to get around this problem?

Thanks,
Art

Reply | Threaded
Open this post in threaded view
|

Re: need arbitrary precision for unit price in purchase orders/invoices

Christian Geisert
Art Hughes schrieb:
> Hi,
>
> I have a need for arbitrary precision for unit price in purchase orders
> and invoices. We manufacture products using electronic components which
> we buy in bulk. A typical unit cost varies between 1 and 5 digits, e.g.
> $.6 or $0.56308. A purchase of 7000 pieces should be $3941.56, on the
> purchase order it is $3920.00 and on the invoice $3941.00.
>
> Anyone know how to get around this problem?

Price fields (currency-precise) are defined as 18,3 in OFBiz which means
a precision of three digits. It should be possible to get more digits
with a change in the fieldtypes.

A common solution is to specify the price per 1000 units for example,
but I don't  think this is currently possible with OFBiz (there is a
unitsIncluded field in SupplierProduct but thats all)


--
Christian

Reply | Threaded
Open this post in threaded view
|

Re: need arbitrary precision for unit price in purchase orders/invoices

Art Hughes
Chistian,
Thanks for the help, I redefined the currency-precise type as 18,5 in
the data base, reloaded my data and everything seems good. I did have to
change unitPrice from currency-amount to currency-precise as well.

e.g.

applications/order/entitydef/entitymodel.xml:459:      <field
name="unitPrice" type="currency-precise"></field>
applications/order/entitydef/entitymodel.xml:2473:      <field
name="unitPrice" type="currency-precise"></field>

Art

On Thu, 2007-06-28 at 18:13 +0200, Christian Geisert wrote:

> Art Hughes schrieb:
> > Hi,
> >
> > I have a need for arbitrary precision for unit price in purchase orders
> > and invoices. We manufacture products using electronic components which
> > we buy in bulk. A typical unit cost varies between 1 and 5 digits, e.g.
> > $.6 or $0.56308. A purchase of 7000 pieces should be $3941.56, on the
> > purchase order it is $3920.00 and on the invoice $3941.00.
> >
> > Anyone know how to get around this problem?
>
> Price fields (currency-precise) are defined as 18,3 in OFBiz which means
> a precision of three digits. It should be possible to get more digits
> with a change in the fieldtypes.
>
> A common solution is to specify the price per 1000 units for example,
> but I don't  think this is currently possible with OFBiz (there is a
> unitsIncluded field in SupplierProduct but thats all)
>
>