fix: Route condition set with proper filter (#31556)
* fix: Redirect to report with proper filter * Update member.js * fix: Route condition set with proper filter * fix: Route condition set with proper filter * fix: Route condition set with proper filter Co-authored-by: Marica <maricadsouza221197@gmail.com>
This commit is contained in:
committed by
GitHub
parent
95e1021caf
commit
5cdc267aee
@@ -21,13 +21,18 @@ frappe.ui.form.on('Member', {
|
|||||||
|
|
||||||
// custom buttons
|
// custom buttons
|
||||||
frm.add_custom_button(__('Accounting Ledger'), function() {
|
frm.add_custom_button(__('Accounting Ledger'), function() {
|
||||||
frappe.set_route('query-report', 'General Ledger',
|
if (frm.doc.customer) {
|
||||||
{party_type:'Member', party:frm.doc.name});
|
frappe.set_route('query-report', 'General Ledger', {party_type: 'Customer', party: frm.doc.customer});
|
||||||
});
|
} else {
|
||||||
|
frappe.set_route('query-report', 'General Ledger', {party_type: 'Member', party: frm.doc.name});
|
||||||
frm.add_custom_button(__('Accounts Receivable'), function() {
|
}
|
||||||
frappe.set_route('query-report', 'Accounts Receivable', {member:frm.doc.name});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (frm.doc.customer) {
|
||||||
|
frm.add_custom_button(__('Accounts Receivable'), function() {
|
||||||
|
frappe.set_route('query-report', 'Accounts Receivable', {customer: frm.doc.customer});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!frm.doc.customer) {
|
if (!frm.doc.customer) {
|
||||||
frm.add_custom_button(__('Create Customer'), () => {
|
frm.add_custom_button(__('Create Customer'), () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user