[minor] check if the company is selected or not before triggering get_bank_cash_account (#9830)

* [minor] check if the company is selected or not before triggering get_bank_cash_account

* [minor] check if production order is available

* [minor] fixed codacy errors
This commit is contained in:
Makarand Bauskar
2017-07-13 11:44:29 +05:30
committed by GitHub
parent 57d3cecd68
commit 8f507a984e
2 changed files with 11 additions and 2 deletions

View File

@@ -89,7 +89,11 @@ frappe.ui.form.on('Salary Structure', {
}
})
var get_payment_mode_account = function(frm, mode_of_payment, callback){
var get_payment_mode_account = function(frm, mode_of_payment, callback) {
if(!frm.doc.company) {
frappe.throw(__("Please select the Company first"));
}
return frappe.call({
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account",
args: {