mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
[fix] [minor] make bank voucher from expense claim and serial no status
This commit is contained in:
@@ -27,8 +27,8 @@ erpnext.hr.ExpenseClaimController = wn.ui.form.Controller.extend({
|
|||||||
var d1 = wn.model.add_child(jv, 'Journal Voucher Detail', 'entries');
|
var d1 = wn.model.add_child(jv, 'Journal Voucher Detail', 'entries');
|
||||||
d1.credit = cur_frm.doc.total_sanctioned_amount;
|
d1.credit = cur_frm.doc.total_sanctioned_amount;
|
||||||
if(r.message) {
|
if(r.message) {
|
||||||
d1.account = r.message[0].account;
|
d1.account = r.message.account;
|
||||||
d1.balance = r.message[0].balance;
|
d1.balance = r.message.balance;
|
||||||
}
|
}
|
||||||
|
|
||||||
loaddoc('Journal Voucher', jv.name);
|
loaddoc('Journal Voucher', jv.name);
|
||||||
|
|||||||
@@ -52,9 +52,7 @@ class DocType(StockController):
|
|||||||
webnotes.throw(_("Item Code cannot be changed for Serial No."), SerialNoCannotCannotChangeError)
|
webnotes.throw(_("Item Code cannot be changed for Serial No."), SerialNoCannotCannotChangeError)
|
||||||
if not self.via_stock_ledger and warehouse != self.doc.warehouse:
|
if not self.via_stock_ledger and warehouse != self.doc.warehouse:
|
||||||
webnotes.throw(_("Warehouse cannot be changed for Serial No."), SerialNoCannotCannotChangeError)
|
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):
|
def validate_item(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user