mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
fix: accounts types with new design.
This commit is contained in:
@@ -23,6 +23,15 @@ export default class AccountRepository extends TenantRepository {
|
||||
return this.model.toDependencyGraph(accounts);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve.
|
||||
* @param {string} slug
|
||||
* @return {Promise<IAccount>}
|
||||
*/
|
||||
findBySlug(slug: string) {
|
||||
return this.findOne({ slug });
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes account balance.
|
||||
|
||||
@@ -31,7 +31,7 @@ export default class AccountTransactionsRepository extends TenantRepository {
|
||||
return this.model.query()
|
||||
.modify('filterAccounts', filter.accountsIds)
|
||||
.modify('filterDateRange', filter.fromDate, filter.toDate)
|
||||
.withGraphFetched('account.type')
|
||||
.withGraphFetched('account')
|
||||
.onBuild((query) => {
|
||||
if (filter.sumationCreditDebit) {
|
||||
query.modify('sumationCreditDebit');
|
||||
|
||||
Reference in New Issue
Block a user