Skip to content

Commit

Permalink
Merge pull request #31558 from frappe/mergify/bp/version-13/pr-31529
Browse files Browse the repository at this point in the history
fix: Use fallback conversion factor while setting incoming rate for petty purchase (backport #31529)
  • Loading branch information
deepeshgarg007 authored Jul 8, 2022
2 parents 5072e6b + bac8546 commit 45799f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/controllers/buying_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def set_incoming_rate(self):
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:
rate = frappe.db.get_value(ref_doctype, d.get(frappe.scrub(ref_doctype)), "rate")

Expand Down

0 comments on commit 45799f5

Please sign in to comment.