mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 05:29:18 +00:00
adds if statement for reference_type === "Asset"
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user