mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-22 07:40:32 +00:00
spelling: account
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
@@ -127,7 +127,7 @@ export default class Account extends mixin(TenantModel, [
|
|||||||
},
|
},
|
||||||
filterAccountTypes(query, typesIds) {
|
filterAccountTypes(query, typesIds) {
|
||||||
if (typesIds.length > 0) {
|
if (typesIds.length > 0) {
|
||||||
query.whereIn('account_types.accoun_type_id', typesIds);
|
query.whereIn('account_types.account_type_id', typesIds);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
viewRolesBuilder(query, conditionals, expression) {
|
viewRolesBuilder(query, conditionals, expression) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Service, Inject } from 'typedi';
|
import { Service, Inject } from 'typedi';
|
||||||
import events from '@/subscribers/events';
|
import events from '@/subscribers/events';
|
||||||
import { InventoryTransactionsWarehouses } from './AcountsTransactionsWarehouses';
|
import { InventoryTransactionsWarehouses } from './AccountsTransactionsWarehouses';
|
||||||
import { IBranchesActivatedPayload } from '@/interfaces';
|
import { IBranchesActivatedPayload } from '@/interfaces';
|
||||||
|
|
||||||
@Service()
|
@Service()
|
||||||
|
|||||||
@@ -66,14 +66,14 @@ export class LedgerContactsBalanceStorage {
|
|||||||
): Promise<(entry: ILedgerEntry) => boolean> => {
|
): Promise<(entry: ILedgerEntry) => boolean> => {
|
||||||
const { Account } = this.tenancy.models(tenantId);
|
const { Account } = this.tenancy.models(tenantId);
|
||||||
|
|
||||||
const ARAPAcounts = await Account.query(trx).whereIn('accountType', [
|
const ARAPAccounts = await Account.query(trx).whereIn('accountType', [
|
||||||
ACCOUNT_TYPE.ACCOUNTS_RECEIVABLE,
|
ACCOUNT_TYPE.ACCOUNTS_RECEIVABLE,
|
||||||
ACCOUNT_TYPE.ACCOUNTS_PAYABLE,
|
ACCOUNT_TYPE.ACCOUNTS_PAYABLE,
|
||||||
]);
|
]);
|
||||||
const ARAPAcountsIds = ARAPAcounts.map((a) => a.id);
|
const ARAPAccountsIds = ARAPAccounts.map((a) => a.id);
|
||||||
|
|
||||||
return (entry: ILedgerEntry) => {
|
return (entry: ILedgerEntry) => {
|
||||||
return ARAPAcountsIds.indexOf(entry.accountId) !== -1;
|
return ARAPAccountsIds.indexOf(entry.accountId) !== -1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ export class LedegrAccountsStorage {
|
|||||||
const { Account } = this.tenancy.models(tenantId);
|
const { Account } = this.tenancy.models(tenantId);
|
||||||
const account = await Account.query(trx).findById(accountId);
|
const account = await Account.query(trx).findById(accountId);
|
||||||
|
|
||||||
// Filters the ledger entries by the current acount.
|
// Filters the ledger entries by the current account.
|
||||||
const accountLedger = ledger.whereAccountId(accountId);
|
const accountLedger = ledger.whereAccountId(accountId);
|
||||||
|
|
||||||
// Retrieves the given tenant metadata.
|
// Retrieves the given tenant metadata.
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export default class CashflowAccountTransactionsService extends FinancialSheet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the cashflow accouynt transactions report data.
|
* Retrieve the cashflow account transactions report data.
|
||||||
* @param {number} tenantId -
|
* @param {number} tenantId -
|
||||||
* @param {ICashflowAccountTransactionsQuery} query -
|
* @param {ICashflowAccountTransactionsQuery} query -
|
||||||
* @return {Promise<IInvetoryItemDetailDOO>}
|
* @return {Promise<IInvetoryItemDetailDOO>}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export class PaymentWriteGLEntriesSubscriber {
|
|||||||
trx,
|
trx,
|
||||||
}: IBillPaymentEventCreatedPayload) => {
|
}: IBillPaymentEventCreatedPayload) => {
|
||||||
// Records the journal transactions after bills payment
|
// Records the journal transactions after bills payment
|
||||||
// and change diff acoount balance.
|
// and change diff account balance.
|
||||||
await this.billPaymentGLEntries.writePaymentGLEntries(
|
await this.billPaymentGLEntries.writePaymentGLEntries(
|
||||||
tenantId,
|
tenantId,
|
||||||
billPayment.id,
|
billPayment.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user