[minor] [fix] make bank voucher form expense claim

This commit is contained in:
Nabin Hait 2013-08-08 11:28:37 +05:30
parent 43d7de8cdc
commit 5230318445

View File

@ -25,9 +25,11 @@ erpnext.hr.ExpenseClaimController = wn.ui.form.Controller.extend({
// credit to bank
var d1 = wn.model.add_child(jv, 'Journal Voucher Detail', 'entries');
d1.account = r.message[0].account;
d1.credit = cur_frm.doc.total_sanctioned_amount;
if(r.message) {
d1.account = r.message[0].account;
d1.balance = r.message[0].balance;
}
loaddoc('Journal Voucher', jv.name);
}