Merge pull request #7359 from nabinhait/hotfix
[fix] Make Journal Entry against SO
This commit is contained in:
commit
fa2feae314
@ -651,7 +651,8 @@ def get_payment_entry(ref_doc, args):
|
|||||||
if args.get("party_account"):
|
if args.get("party_account"):
|
||||||
# Modified to include the posting date for which the exchange rate is required.
|
# Modified to include the posting date for which the exchange rate is required.
|
||||||
# Assumed to be the posting date in the reference document
|
# Assumed to be the posting date in the reference document
|
||||||
exchange_rate = get_exchange_rate(ref_doc.posting_date, args.get("party_account"), args.get("party_account_currency"),
|
exchange_rate = get_exchange_rate(ref_doc.get("posting_date") or ref_doc.get("transaction_date"),
|
||||||
|
args.get("party_account"), args.get("party_account_currency"),
|
||||||
ref_doc.company, ref_doc.doctype, ref_doc.name)
|
ref_doc.company, ref_doc.doctype, ref_doc.name)
|
||||||
|
|
||||||
je = frappe.new_doc("Journal Entry")
|
je = frappe.new_doc("Journal Entry")
|
||||||
@ -686,7 +687,8 @@ def get_payment_entry(ref_doc, args):
|
|||||||
bank_row.update(bank_account)
|
bank_row.update(bank_account)
|
||||||
# Modified to include the posting date for which the exchange rate is required.
|
# Modified to include the posting date for which the exchange rate is required.
|
||||||
# Assumed to be the posting date of the reference date
|
# Assumed to be the posting date of the reference date
|
||||||
bank_row.exchange_rate = get_exchange_rate(ref_doc.posting_date, bank_account["account"],
|
bank_row.exchange_rate = get_exchange_rate(ref_doc.get("posting_date")
|
||||||
|
or ref_doc.get("transaction_date"), bank_account["account"],
|
||||||
bank_account["account_currency"], ref_doc.company)
|
bank_account["account_currency"], ref_doc.company)
|
||||||
|
|
||||||
bank_row.cost_center = cost_center
|
bank_row.cost_center = cost_center
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user