mirror of
https://github.com/frappe/books.git
synced 2025-01-22 22:58:28 +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.referenceType) filters.referenceType = params.referenceType;
|
||||
if (params.referenceName) filters.referenceName = params.referenceName;
|
||||
if (params.fromDate) filters.date = ['>=', params.fromDate];
|
||||
if (params.toDate) filters.date = ['<=', params.toDate];
|
||||
if (params.toDate || params.fromDate) {
|
||||
filters.date = [];
|
||||
if (params.toDate) filters.date.push('<=', params.toDate);
|
||||
if (params.fromDate) filters.date.push('>=', params.fromDate);
|
||||
}
|
||||
|
||||
let data = await frappe.db.getAll({
|
||||
doctype: 'AccountingLedgerEntry',
|
||||
|
Loading…
x
Reference in New Issue
Block a user