Skip to content

Commit

Permalink
fix: valuation rate issue while making stock entry from PO
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure committed Mar 22, 2023
1 parent 8ddbac5 commit 3574d49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion erpnext/buying/doctype/purchase_order/purchase_order.py
Expand Up @@ -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"))
Expand Down
4 changes: 2 additions & 2 deletions erpnext/stock/doctype/stock_entry/stock_entry.py
Expand Up @@ -2229,11 +2229,11 @@ def get_available_serial_nos(self, stock_entries):

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()
Expand Down

0 comments on commit 3574d49

Please sign in to comment.