fix: valuation rate issue while making stock entry from PO

This commit is contained in:
Rohit Waghchaure
2023-03-22 16:52:07 +05:30
parent 8ddbac5158
commit 3574d490db
2 changed files with 3 additions and 3 deletions

View File

@@ -644,7 +644,7 @@ def make_rm_stock_entry(purchase_order, rm_items):
}
stock_entry.add_to_stock_entry_detail(items_dict)
stock_entry.set_missing_values()
stock_entry.set_missing_values(raise_error_if_no_rate=False)
return stock_entry.as_dict()
else:
frappe.throw(_("No Items selected for transfer"))

View File

@@ -2229,11 +2229,11 @@ class StockEntry(StockController):
return sorted(list(set(get_serial_nos(self.pro_doc.serial_no)) - set(used_serial_nos)))
def set_missing_values(self):
def set_missing_values(self, raise_error_if_no_rate=True):
"Updates rate and availability of all the items of mapped doc."
self.set_transfer_qty()
self.set_actual_qty()
self.calculate_rate_and_amount()
self.calculate_rate_and_amount(raise_error_if_no_rate=raise_error_if_no_rate)
@frappe.whitelist()