[fix] [minor] make bank voucher from expense claim and serial no status

This commit is contained in:
Nabin Hait 2013-09-03 23:19:08 +05:30
parent 86f3da1a77
commit 3b152ba6c7
2 changed files with 3 additions and 5 deletions

View File

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

View File

@ -52,9 +52,7 @@ class DocType(StockController):
webnotes.throw(_("Item Code cannot be changed for Serial No."), SerialNoCannotCannotChangeError)
if not self.via_stock_ledger and warehouse != self.doc.warehouse:
webnotes.throw(_("Warehouse cannot be changed for Serial No."), SerialNoCannotCannotChangeError)
if not self.doc.warehouse and self.doc.status=="Available":
self.doc.status = "Not Available"
def validate_item(self):
"""