Merge pull request #31529 from marination/petty-purchase

fix: Use fallback conversion factor while setting incoming rate for petty purchase
This commit is contained in:
Marica 2022-07-06 00:38:37 +05:30 committed by GitHub
commit 9b6bb1b3fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -300,7 +300,7 @@ class BuyingController(StockController, Subcontracting):
raise_error_if_no_rate=False, raise_error_if_no_rate=False,
) )
rate = flt(outgoing_rate * d.conversion_factor, d.precision("rate")) rate = flt(outgoing_rate * (d.conversion_factor or 1), d.precision("rate"))
else: else:
rate = frappe.db.get_value(ref_doctype, d.get(frappe.scrub(ref_doctype)), "rate") rate = frappe.db.get_value(ref_doctype, d.get(frappe.scrub(ref_doctype)), "rate")