fix(Journals): sync posting datetime with jorunal entries.

This commit is contained in:
a.bouhuolia
2021-03-29 10:50:44 +02:00
parent 40b2ba099e
commit 9a204282a2
38 changed files with 477 additions and 302 deletions

View File

@@ -13,7 +13,8 @@ interface IJournalTransactionsFilter {
contactType?: string,
referenceType?: string[],
referenceId?: number[],
index: number|number[]
index: number|number[],
indexGroup: number|number[],
};
export default class AccountTransactionsRepository extends TenantRepository {
@@ -58,6 +59,13 @@ export default class AccountTransactionsRepository extends TenantRepository {
query.where('index', filter.index);
}
}
if (filter.indexGroup) {
if (Array.isArray(filter.indexGroup)) {
query.whereIn('index_group', filter.indexGroup);
} else {
query.where('index_group', filter.indexGroup);
}
}
});
});
}