Hi.

We have noticed a problem with the price calculation for purchase orders
that are automatically generated for dropshipments:
The product prices of the corresponding sales and purchase orders do not
match.

Background: The invoked Method makePurchaseOrderItem - that is
responsible for the creation of new purchase order items - uses
lastPrice from supplierProduct for the BasePrice calculation. In
contrast to this the price calculation for the corresponding sales order
bases on price from productPrice.
The lastPrice value is set everytime a merchant updates an existing
(purchase) order in the editOrderItem-view from GUI. Because of this all
newly generated purchase order items will base upon the last changes and
not on the original product price.

Possible Solution:
Change the value of baseprice in makePurchaseOrderItem from lastPrice
(supplierProduct) to price (productPrice).

Question:
What is the reason for using lastPrice from supplierProduct for the
creation of purchase orders and what kind of side-effects might occour
if price from productPrice is used instead.

We are working with Apache OFBiz 10.04.


Regards,

Thomas

Reply via email to