adds if statement for reference_type === "Asset"

This commit is contained in:
tunde 2017-06-28 13:05:40 +01:00
parent 01659271be
commit c7e3a09cfb

View File

@ -125,7 +125,11 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
var party_account_field = jvd.reference_type==="Sales Invoice" ? "debit_to": "credit_to"; var party_account_field = jvd.reference_type==="Sales Invoice" ? "debit_to": "credit_to";
out.filters.push([jvd.reference_type, party_account_field, "=", jvd.account]); out.filters.push([jvd.reference_type, party_account_field, "=", jvd.account]);
} else { }
else if(jvd.reference_type === 'Asset'){
frappe.model.validate_missing(jvd, "account");
}
else {
// party_type and party mandatory // party_type and party mandatory
frappe.model.validate_missing(jvd, "party_type"); frappe.model.validate_missing(jvd, "party_type");
frappe.model.validate_missing(jvd, "party"); frappe.model.validate_missing(jvd, "party");