fix: rate of stock uom division by zero error (#24829)
This commit is contained in:
parent
20cc2bb0d8
commit
77eaf2939a
@ -406,7 +406,8 @@ class StockController(AccountsController):
|
||||
def set_rate_of_stock_uom(self):
|
||||
if self.doctype in ["Purchase Receipt", "Purchase Invoice", "Purchase Order", "Sales Invoice", "Sales Order", "Delivery Note", "Quotation"]:
|
||||
for d in self.get("items"):
|
||||
d.stock_uom_rate = d.rate / d.conversion_factor
|
||||
if d.conversion_factor:
|
||||
d.stock_uom_rate = d.rate / d.conversion_factor
|
||||
|
||||
def validate_internal_transfer(self):
|
||||
if self.doctype in ('Sales Invoice', 'Delivery Note', 'Purchase Invoice', 'Purchase Receipt') \
|
||||
|
Loading…
x
Reference in New Issue
Block a user