mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
feat: optimize dynamic list service.
feat: inactive mode for accounts, items, customers and vendors services.
This commit is contained in:
@@ -29,7 +29,6 @@ export default class JournalSheetService {
|
||||
fromRange: null,
|
||||
toRange: null,
|
||||
accountsIds: [],
|
||||
transactionTypes: [],
|
||||
numberFormat: {
|
||||
noCents: false,
|
||||
divideOn1000: false,
|
||||
@@ -107,6 +106,13 @@ export default class JournalSheetService {
|
||||
}
|
||||
query.modify('filterDateRange', filter.fromDate, filter.toDate);
|
||||
query.orderBy(['date', 'createdAt', 'indexGroup', 'index']);
|
||||
|
||||
if (filter.transactionType) {
|
||||
return query.where('reference_type', filter.transactionType);
|
||||
}
|
||||
if (filter.transactionType && filter.transactionId) {
|
||||
return query.where('reference_id', filter.transactionId);
|
||||
}
|
||||
});
|
||||
// Transform the transactions array to journal collection.
|
||||
const transactionsJournal = Journal.fromTransactions(
|
||||
|
||||
Reference in New Issue
Block a user