Hi guys, anyone know why the workflow_state filter doesn’t work?
//
get_items_from_payment_entry: function(frm) {
frappe.db.get_value(“Company”, frm.doc.company, “default_cash_account”).then(acc => {
if (acc) {
frm.clear_table(“accounts”);
console.log(“Selected Account:”, acc.message.default_cash_account);
// Get ACC that is existing in Journal Entry
erpnext.utils.map_current_doc({
method: “erpnext”,
source_doctype: “Payment Entry”,
target: frm,
setters: {
party: undefined,
posting_date: undefined,
paid_to: acc.message.default_cash_account,
workflow_state: undefined,
},
get_query_filters: {
docstatus: 1,
company: frm.doc.company,
payment_type: “Receive”,
paid_to: acc.message.default_cash_account,
workflow_state: [“not in”, [“Collected”, “Partially Deposited”]]
},
add_filters_group: 1,
});
// Log accounts after mapping
console.log(“Accounts after mapping:”, frm.doc.accounts);
}
});
},