mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
Pass buying or selling as filter parameters
Wherever get_exchange_rate is called, pass filter buying or selling on the basis of doctype.
This commit is contained in:
@@ -56,7 +56,7 @@ def work():
|
||||
if company_currency == party_account_currency:
|
||||
exchange_rate = 1
|
||||
else:
|
||||
exchange_rate = get_exchange_rate(party_account_currency, company_currency)
|
||||
exchange_rate = get_exchange_rate(party_account_currency, company_currency, args="for_buying")
|
||||
|
||||
# make supplier quotations
|
||||
if random.random() < 0.2:
|
||||
|
||||
@@ -89,7 +89,7 @@ def make_quotation():
|
||||
if company_currency == party_account_currency:
|
||||
exchange_rate = 1
|
||||
else:
|
||||
exchange_rate = get_exchange_rate(party_account_currency, company_currency)
|
||||
exchange_rate = get_exchange_rate(party_account_currency, company_currency, args="for_selling")
|
||||
|
||||
qtn = frappe.get_doc({
|
||||
"creation": frappe.flags.current_date,
|
||||
|
||||
Reference in New Issue
Block a user