mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 21:19:19 +00:00
refactor: allow equity types on Payment Entry
(cherry picked from commit 6cbf98294a)
This commit is contained in:
@@ -35,6 +35,11 @@ frappe.ui.form.on("Payment Entry", {
|
|||||||
var account_types = ["Pay", "Internal Transfer"].includes(frm.doc.payment_type)
|
var account_types = ["Pay", "Internal Transfer"].includes(frm.doc.payment_type)
|
||||||
? ["Bank", "Cash"]
|
? ["Bank", "Cash"]
|
||||||
: [frappe.boot.party_account_types[frm.doc.party_type]];
|
: [frappe.boot.party_account_types[frm.doc.party_type]];
|
||||||
|
|
||||||
|
if (frm.doc.party_type == "Shareholder") {
|
||||||
|
account_types.push("Equity");
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
account_type: ["in", account_types],
|
account_type: ["in", account_types],
|
||||||
@@ -90,6 +95,9 @@ frappe.ui.form.on("Payment Entry", {
|
|||||||
var account_types = ["Receive", "Internal Transfer"].includes(frm.doc.payment_type)
|
var account_types = ["Receive", "Internal Transfer"].includes(frm.doc.payment_type)
|
||||||
? ["Bank", "Cash"]
|
? ["Bank", "Cash"]
|
||||||
: [frappe.boot.party_account_types[frm.doc.party_type]];
|
: [frappe.boot.party_account_types[frm.doc.party_type]];
|
||||||
|
if (frm.doc.party_type == "Shareholder") {
|
||||||
|
account_types.push("Equity");
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
account_type: ["in", account_types],
|
account_type: ["in", account_types],
|
||||||
|
|||||||
Reference in New Issue
Block a user