Skip to content

Commit

Permalink
Merge pull request #7816 from mbauskar/hotfix
Browse files Browse the repository at this point in the history
[minor] minor fixes for journal entry get_exchange_rate trigger
  • Loading branch information
nabinhait authored Feb 22, 2017
2 parents 1bdb6a5 + a8fa10d commit 1965949
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion erpnext/accounts/doctype/journal_entry/journal_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ frappe.ui.form.on("Journal Entry", {
},

posting_date: function(frm) {
if(!frm.doc.multi_currency) return;
if(!frm.doc.multi_currency || !frm.doc.posting_date) return;

$.each(frm.doc.accounts || [], function(i, row) {
erpnext.journal_entry.set_exchange_rate(frm, row.doctype, row.name);
Expand Down
2 changes: 1 addition & 1 deletion erpnext/accounts/doctype/journal_entry/journal_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ def get_account_balance_and_party_type(account, date, company, debit=None, credi

# Added posting_date as one of the parameters of get_exchange_rate
@frappe.whitelist()
def get_exchange_rate(posting_date, account, account_currency=None, company=None,
def get_exchange_rate(posting_date, account=None, account_currency=None, company=None,
reference_type=None, reference_name=None, debit=None, credit=None, exchange_rate=None):
from erpnext.setup.utils import get_exchange_rate
account_details = frappe.db.get_value("Account", account,
Expand Down

0 comments on commit 1965949

Please sign in to comment.