Merge pull request #17630 from nabinhait/multi-fixes-dev

fix: Multiple small fixes
This commit is contained in:
Saurabh
2019-05-16 15:21:15 +05:30
committed by GitHub
3 changed files with 17 additions and 12 deletions

View File

@@ -1165,6 +1165,9 @@ class SalesInvoice(SellingController):
self.set_missing_values(for_validate = True) self.set_missing_values(for_validate = True)
def validate_inter_company_party(doctype, party, company, inter_company_reference): def validate_inter_company_party(doctype, party, company, inter_company_reference):
if not party:
return
if doctype in ["Sales Invoice", "Sales Order"]: if doctype in ["Sales Invoice", "Sales Order"]:
partytype, ref_partytype, internal = "Customer", "Supplier", "is_internal_customer" partytype, ref_partytype, internal = "Customer", "Supplier", "is_internal_customer"

View File

@@ -172,18 +172,20 @@ frappe.ui.form.on('Loan', {
}, },
mode_of_payment: function (frm) { mode_of_payment: function (frm) {
frappe.call({ if (frm.doc.mode_of_payment && frm.doc.company) {
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account", frappe.call({
args: { method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account",
"mode_of_payment": frm.doc.mode_of_payment, args: {
"company": frm.doc.company "mode_of_payment": frm.doc.mode_of_payment,
}, "company": frm.doc.company
callback: function (r, rt) { },
if (r.message) { callback: function (r, rt) {
frm.set_value("payment_account", r.message.account); if (r.message) {
frm.set_value("payment_account", r.message.account);
}
} }
} });
}); }
}, },
loan_application: function (frm) { loan_application: function (frm) {

View File

@@ -65,7 +65,7 @@ class Project(Document):
'name': ("not in", self.deleted_task_list) 'name': ("not in", self.deleted_task_list)
}) })
return frappe.get_all("Task", "*", filters, order_by="exp_start_date asc") return frappe.get_all("Task", "*", filters, order_by="exp_start_date asc, status asc")
def validate(self): def validate(self):
self.validate_weights() self.validate_weights()