mirror of
https://github.com/frappe/books.git
synced 2025-01-23 07:08:36 +00:00
Fix date filter in general ledger
This commit is contained in:
parent
52f8beffdc
commit
5df04af570
@ -7,8 +7,11 @@ class GeneralLedger {
|
|||||||
if (params.party) filters.party = params.party;
|
if (params.party) filters.party = params.party;
|
||||||
if (params.referenceType) filters.referenceType = params.referenceType;
|
if (params.referenceType) filters.referenceType = params.referenceType;
|
||||||
if (params.referenceName) filters.referenceName = params.referenceName;
|
if (params.referenceName) filters.referenceName = params.referenceName;
|
||||||
if (params.fromDate) filters.date = ['>=', params.fromDate];
|
if (params.toDate || params.fromDate) {
|
||||||
if (params.toDate) filters.date = ['<=', params.toDate];
|
filters.date = [];
|
||||||
|
if (params.toDate) filters.date.push('<=', params.toDate);
|
||||||
|
if (params.fromDate) filters.date.push('>=', params.fromDate);
|
||||||
|
}
|
||||||
|
|
||||||
let data = await frappe.db.getAll({
|
let data = await frappe.db.getAll({
|
||||||
doctype: 'AccountingLedgerEntry',
|
doctype: 'AccountingLedgerEntry',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user