always adjust pruchase price if one exists

This commit is contained in:
Matthias 2021-04-22 22:17:54 +02:00
parent 7cb858546e
commit a1237b4a49

View File

@ -257,7 +257,7 @@ class PurchaseOrder(Order):
# update quantity and price
quantity_new = line.quantity + quantity
line.quantity = quantity_new
if purchase_price:
if line.purchase_price:
line.purchase_price = supplier_part.get_price(quantity_new) / quantity_new
line.save()