Merge pull request #7816 from mbauskar/hotfix
[minor] minor fixes for journal entry get_exchange_rate trigger
This commit is contained in:
		
						commit
						1965949c67
					
				| @ -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); | ||||
|  | ||||
| @ -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, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user