refactor: allow equity types on Payment Entry
(cherry picked from commit 6cbf98294a)
# Conflicts:
# erpnext/accounts/doctype/payment_entry/payment_entry.js
This commit is contained in:
@@ -21,8 +21,19 @@ frappe.ui.form.on('Payment Entry', {
|
|||||||
frm.set_query("paid_from", function() {
|
frm.set_query("paid_from", function() {
|
||||||
frm.events.validate_company(frm);
|
frm.events.validate_company(frm);
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
var account_types = ["Pay", "Internal Transfer"].includes(frm.doc.payment_type) ?
|
var account_types = ["Pay", "Internal Transfer"].includes(frm.doc.payment_type) ?
|
||||||
["Bank", "Cash"] : [frappe.boot.party_account_types[frm.doc.party_type]];
|
["Bank", "Cash"] : [frappe.boot.party_account_types[frm.doc.party_type]];
|
||||||
|
=======
|
||||||
|
var account_types = ["Pay", "Internal Transfer"].includes(frm.doc.payment_type)
|
||||||
|
? ["Bank", "Cash"]
|
||||||
|
: [frappe.boot.party_account_types[frm.doc.party_type]];
|
||||||
|
|
||||||
|
if (frm.doc.party_type == "Shareholder") {
|
||||||
|
account_types.push("Equity");
|
||||||
|
}
|
||||||
|
|
||||||
|
>>>>>>> 6cbf98294a (refactor: allow equity types on Payment Entry)
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
"account_type": ["in", account_types],
|
"account_type": ["in", account_types],
|
||||||
@@ -75,8 +86,17 @@ frappe.ui.form.on('Payment Entry', {
|
|||||||
frm.set_query("paid_to", function() {
|
frm.set_query("paid_to", function() {
|
||||||
frm.events.validate_company(frm);
|
frm.events.validate_company(frm);
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
var account_types = ["Receive", "Internal Transfer"].includes(frm.doc.payment_type) ?
|
var account_types = ["Receive", "Internal Transfer"].includes(frm.doc.payment_type) ?
|
||||||
["Bank", "Cash"] : [frappe.boot.party_account_types[frm.doc.party_type]];
|
["Bank", "Cash"] : [frappe.boot.party_account_types[frm.doc.party_type]];
|
||||||
|
=======
|
||||||
|
var account_types = ["Receive", "Internal Transfer"].includes(frm.doc.payment_type)
|
||||||
|
? ["Bank", "Cash"]
|
||||||
|
: [frappe.boot.party_account_types[frm.doc.party_type]];
|
||||||
|
if (frm.doc.party_type == "Shareholder") {
|
||||||
|
account_types.push("Equity");
|
||||||
|
}
|
||||||
|
>>>>>>> 6cbf98294a (refactor: allow equity types on Payment Entry)
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
"account_type": ["in", account_types],
|
"account_type": ["in", account_types],
|
||||||
|
|||||||
Reference in New Issue
Block a user