From bfa1aa4b9943dd53cf1650278739aede635f52fb Mon Sep 17 00:00:00 2001 From: Piyush Singhania Date: Tue, 26 Oct 2021 01:20:35 +0530 Subject: [PATCH 1/2] update -> used app conventions for better readability --- reports/GeneralLedger/GeneralLedger.js | 2 +- reports/GeneralLedger/viewConfig.js | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/reports/GeneralLedger/GeneralLedger.js b/reports/GeneralLedger/GeneralLedger.js index d4704a15..7bfc502b 100644 --- a/reports/GeneralLedger/GeneralLedger.js +++ b/reports/GeneralLedger/GeneralLedger.js @@ -7,7 +7,7 @@ class GeneralLedger { if (params.party) filters.party = params.party; if (params.referenceType) filters.referenceType = params.referenceType; if (params.referenceName) filters.referenceName = params.referenceName; - if (params.reverted) filters.reverted = !params.reverted; + if (params.reverted === 'Hide Audits') filters.reverted = 0; if (params.toDate || params.fromDate) { filters.date = []; if (params.toDate) filters.date.push('<=', params.toDate); diff --git a/reports/GeneralLedger/viewConfig.js b/reports/GeneralLedger/viewConfig.js index 39c7adca..dc6aadc9 100644 --- a/reports/GeneralLedger/viewConfig.js +++ b/reports/GeneralLedger/viewConfig.js @@ -59,14 +59,11 @@ const viewConfig = { }, { fieldtype: 'Select', - options: [ - { label: 'Hide Audits', value: '1' }, - { label: 'Show Audits', value: '' } - ], + options: ['Show Audits', 'Hide Audits'], size: 'small', - label: 'Audits', - placeholder: 'Show Audits', - default: 1, + default: 'Hide Audits', + label: 'Reverted', + placeholder: 'Reverted', fieldname: 'reverted' } ], From 9d64907ada750812a4bac4d2cd97e14e7877b7bd Mon Sep 17 00:00:00 2001 From: Piyush Singhania Date: Wed, 27 Oct 2021 21:32:40 +0530 Subject: [PATCH 2/2] used app coding conventions --- reports/GeneralLedger/GeneralLedger.js | 2 +- reports/GeneralLedger/viewConfig.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/reports/GeneralLedger/GeneralLedger.js b/reports/GeneralLedger/GeneralLedger.js index 7bfc502b..2833af90 100644 --- a/reports/GeneralLedger/GeneralLedger.js +++ b/reports/GeneralLedger/GeneralLedger.js @@ -7,7 +7,7 @@ class GeneralLedger { if (params.party) filters.party = params.party; if (params.referenceType) filters.referenceType = params.referenceType; if (params.referenceName) filters.referenceName = params.referenceName; - if (params.reverted === 'Hide Audits') filters.reverted = 0; + if (params.reverted) filters.reverted = params.reverted; if (params.toDate || params.fromDate) { filters.date = []; if (params.toDate) filters.date.push('<=', params.toDate); diff --git a/reports/GeneralLedger/viewConfig.js b/reports/GeneralLedger/viewConfig.js index dc6aadc9..d09eef18 100644 --- a/reports/GeneralLedger/viewConfig.js +++ b/reports/GeneralLedger/viewConfig.js @@ -59,11 +59,13 @@ const viewConfig = { }, { fieldtype: 'Select', - options: ['Show Audits', 'Hide Audits'], + options: [ + { label: 'Show Audits', value: '' }, + { label: 'Hide Audits', value: '0' } + ], size: 'small', - default: 'Hide Audits', + default: '0', label: 'Reverted', - placeholder: 'Reverted', fieldname: 'reverted' } ],