diff --git a/CHANGELOG.md b/CHANGELOG.md index b8f1759f7..122f29e15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -97,7 +97,7 @@ All notable changes to Bigcapital server-side will be in this file. - fix: delete invoice transaction issue. `@bigcapital/webapp` -- fix: general, accoutant and items preferences. +- fix: general, accountant and items preferences. - fix: auto-increment sale invoices, estiamtes, credit notes, payments and manual journals. - refactor: the setup organization form to use binded Formik components. diff --git a/packages/server/resources/locales/ar.json b/packages/server/resources/locales/ar.json index f7bed4726..a52b13d51 100644 --- a/packages/server/resources/locales/ar.json +++ b/packages/server/resources/locales/ar.json @@ -152,7 +152,7 @@ "Opening Balance Liabilities": "رصيد الالتزامات الافتتاحي", "Loan": "اقراض", "Owner A Drawings": "مسحوبات المالك", - "An account that holds valuation of products or goods that availiable for sale.": "حساب يحمل قيم مخزون البضاعة أو السلع المتاحة للبيع.", + "An account that holds valuation of products or goods that available for sale.": "حساب يحمل قيم مخزون البضاعة أو السلع المتاحة للبيع.", "Tracks the gain and losses of the exchange differences.": "يسجل مكاسب وخسائر فروق الصرف.", "Any bank fees levied is recorded into the bank fees and charges account. A bank account maintenance fee, transaction charges, a late payment fee are some examples.": "يتم تسجيل أي رسوم مصرفية يتم فرضها في حساب الرسوم والمصروفات البنكية. ومن الأمثلة على ذلك رسوم صيانة الحساب المصرفي ورسوم المعاملات ورسوم الدفع المتأخر.", "The income activities are not associated to the core business.": "لا ترتبط انشطة الدخل إلى الأعمال الأساسية.", diff --git a/packages/server/resources/locales/en.json b/packages/server/resources/locales/en.json index 811db19e7..b021c2347 100644 --- a/packages/server/resources/locales/en.json +++ b/packages/server/resources/locales/en.json @@ -151,7 +151,7 @@ "Opening Balance Liabilities": "Opening Balance Liabilities", "Loan": "Loan", "Owner A Drawings": "Owner A Drawings", - "An account that holds valuation of products or goods that availiable for sale.": "An account that holds valuation of products or goods that availiable for sale.", + "An account that holds valuation of products or goods that available for sale.": "An account that holds valuation of products or goods that available for sale.", "Tracks the gain and losses of the exchange differences.": "Tracks the gain and losses of the exchange differences.", "Any bank fees levied is recorded into the bank fees and charges account. A bank account maintenance fee, transaction charges, a late payment fee are some examples.": "Any bank fees levied is recorded into the bank fees and charges account. A bank account maintenance fee, transaction charges, a late payment fee are some examples.", "The income activities are not associated to the core business.": "The income activities are not associated to the core business.", diff --git a/packages/server/src/api/controllers/ManualJournals.ts b/packages/server/src/api/controllers/ManualJournals.ts index 682ef64ce..8af8c13b5 100644 --- a/packages/server/src/api/controllers/ManualJournals.ts +++ b/packages/server/src/api/controllers/ManualJournals.ts @@ -387,7 +387,7 @@ export default class ManualJournalsController extends BaseController { errors: [{ type: 'CREDIT.DEBIT.NOT.EQUALS', code: 300 }], }); } - if (error.errorType === 'acccounts_ids_not_found') { + if (error.errorType === 'accounts_ids_not_found') { return res.boom.badRequest( 'Journal entries some of accounts ids not exists.', { errors: [{ type: 'ACCOUNTS.IDS.NOT.FOUND', code: 400 }] } diff --git a/packages/server/src/api/controllers/Sales/PaymentReceives.ts b/packages/server/src/api/controllers/Sales/PaymentReceives.ts index 4e1f69720..ec210ad23 100644 --- a/packages/server/src/api/controllers/Sales/PaymentReceives.ts +++ b/packages/server/src/api/controllers/Sales/PaymentReceives.ts @@ -372,7 +372,7 @@ export default class PaymentReceivesController extends BaseController { /** * Retrieve the given payment receive details. - * @asycn + * @async * @param {Request} req - * @param {Response} res - */ diff --git a/packages/server/src/database/seeds/data/accounts.js b/packages/server/src/database/seeds/data/accounts.js index fb6bf6c07..00fada5f5 100644 --- a/packages/server/src/database/seeds/data/accounts.js +++ b/packages/server/src/database/seeds/data/accounts.js @@ -81,7 +81,7 @@ export default [ parent_account_id: null, index: 1, active: 1, - description:'An account that holds valuation of products or goods that availiable for sale.', + description:'An account that holds valuation of products or goods that available for sale.', }, // Libilities diff --git a/packages/server/src/interfaces/CashFlow.ts b/packages/server/src/interfaces/CashFlow.ts index 289159727..e9a2dc8cd 100644 --- a/packages/server/src/interfaces/CashFlow.ts +++ b/packages/server/src/interfaces/CashFlow.ts @@ -41,7 +41,7 @@ export interface ICashFlowStatementAccountMeta { code: string; total: ICashFlowStatementTotal; accountType: string; - adjusmentType: string; + adjustmentType: string; sectionType: ICashFlowStatementSectionType.ACCOUNT; } diff --git a/packages/server/src/lib/DynamicFilter/DynamicFilter.ts b/packages/server/src/lib/DynamicFilter/DynamicFilter.ts index 2af4d7c4f..b50391dc2 100644 --- a/packages/server/src/lib/DynamicFilter/DynamicFilter.ts +++ b/packages/server/src/lib/DynamicFilter/DynamicFilter.ts @@ -1,8 +1,8 @@ import { forEach, uniqBy } from 'lodash'; -import DynamicFilterAbstructor from './DynamicFilterAbstructor'; +import DynamicFilterAbstractor from './DynamicFilterAbstractor'; import { IDynamicFilter, IFilterRole, IModel } from '@/interfaces'; -export default class DynamicFilter extends DynamicFilterAbstructor{ +export default class DynamicFilter extends DynamicFilterAbstractor{ private model: IModel; private tableName: string; private dynamicFilters: IDynamicFilter[]; diff --git a/packages/server/src/lib/DynamicFilter/DynamicFilterAbstructor.ts b/packages/server/src/lib/DynamicFilter/DynamicFilterAbstractor.ts similarity index 96% rename from packages/server/src/lib/DynamicFilter/DynamicFilterAbstructor.ts rename to packages/server/src/lib/DynamicFilter/DynamicFilterAbstractor.ts index 3b3f6dee1..256333c68 100644 --- a/packages/server/src/lib/DynamicFilter/DynamicFilterAbstructor.ts +++ b/packages/server/src/lib/DynamicFilter/DynamicFilterAbstractor.ts @@ -1,5 +1,5 @@ -export default class DynamicFilterAbstructor { +export default class DynamicFilterAbstractor { /** * Extract relation table name from relation. * @param {String} column - diff --git a/packages/server/src/lib/DynamicFilter/DynamicFilterFilterRoles.ts b/packages/server/src/lib/DynamicFilter/DynamicFilterFilterRoles.ts index ae0502e7e..0bacf4d80 100644 --- a/packages/server/src/lib/DynamicFilter/DynamicFilterFilterRoles.ts +++ b/packages/server/src/lib/DynamicFilter/DynamicFilterFilterRoles.ts @@ -1,7 +1,7 @@ -import DynamicFilterRoleAbstructor from './DynamicFilterRoleAbstructor'; +import DynamicFilterRoleAbstractor from './DynamicFilterRoleAbstractor'; import { IFilterRole } from '@/interfaces'; -export default class FilterRoles extends DynamicFilterRoleAbstructor { +export default class FilterRoles extends DynamicFilterRoleAbstractor { private filterRoles: IFilterRole[]; /** diff --git a/packages/server/src/lib/DynamicFilter/DynamicFilterRoleAbstructor.ts b/packages/server/src/lib/DynamicFilter/DynamicFilterRoleAbstractor.ts similarity index 99% rename from packages/server/src/lib/DynamicFilter/DynamicFilterRoleAbstructor.ts rename to packages/server/src/lib/DynamicFilter/DynamicFilterRoleAbstractor.ts index 1dbc4f889..488f48919 100644 --- a/packages/server/src/lib/DynamicFilter/DynamicFilterRoleAbstructor.ts +++ b/packages/server/src/lib/DynamicFilter/DynamicFilterRoleAbstractor.ts @@ -6,7 +6,7 @@ import DynamicFilterQueryParser from './DynamicFilterQueryParser'; import { Lexer } from '../LogicEvaluation/Lexer'; import { COMPARATOR_TYPE, FIELD_TYPE } from './constants'; -export default abstract class DynamicFilterAbstructor +export default abstract class DynamicFilterAbstractor implements IDynamicFilter { protected filterRoles: IFilterRole[] = []; diff --git a/packages/server/src/lib/DynamicFilter/DynamicFilterSortBy.ts b/packages/server/src/lib/DynamicFilter/DynamicFilterSortBy.ts index f1ab6c7fc..d70ff3603 100644 --- a/packages/server/src/lib/DynamicFilter/DynamicFilterSortBy.ts +++ b/packages/server/src/lib/DynamicFilter/DynamicFilterSortBy.ts @@ -1,4 +1,4 @@ -import DynamicFilterRoleAbstructor from '@/lib/DynamicFilter/DynamicFilterRoleAbstructor'; +import DynamicFilterRoleAbstractor from '@/lib/DynamicFilter/DynamicFilterRoleAbstractor'; import { FIELD_TYPE } from './constants'; interface ISortRole { @@ -6,7 +6,7 @@ interface ISortRole { order: string; } -export default class DynamicFilterSortBy extends DynamicFilterRoleAbstructor { +export default class DynamicFilterSortBy extends DynamicFilterRoleAbstractor { private sortRole: ISortRole = {}; /** diff --git a/packages/server/src/lib/DynamicFilter/DynamicFilterViews.ts b/packages/server/src/lib/DynamicFilter/DynamicFilterViews.ts index 40e95c5b4..289e616ab 100644 --- a/packages/server/src/lib/DynamicFilter/DynamicFilterViews.ts +++ b/packages/server/src/lib/DynamicFilter/DynamicFilterViews.ts @@ -1,8 +1,8 @@ import { omit } from 'lodash'; import { IView, IViewRole } from '@/interfaces'; -import DynamicFilterRoleAbstructor from './DynamicFilterRoleAbstructor'; +import DynamicFilterRoleAbstractor from './DynamicFilterRoleAbstractor'; -export default class DynamicFilterViews extends DynamicFilterRoleAbstructor { +export default class DynamicFilterViews extends DynamicFilterRoleAbstractor { private viewSlug: string; private logicExpression: string; private filterRoles: IViewRole[]; diff --git a/packages/server/src/lib/ViewRolesBuilder/FilterRolesDynamicFilter.js b/packages/server/src/lib/ViewRolesBuilder/FilterRolesDynamicFilter.js index 978abb53d..c07af232b 100644 --- a/packages/server/src/lib/ViewRolesBuilder/FilterRolesDynamicFilter.js +++ b/packages/server/src/lib/ViewRolesBuilder/FilterRolesDynamicFilter.js @@ -1,10 +1,10 @@ -import DynamicFilterRoleAbstructor from '@/lib/DynamicFilter/DynamicFilterRoleAbstructor'; +import DynamicFilterRoleAbstractor from '@/lib/DynamicFilter/DynamicFilterRoleAbstractor'; import { validateViewRoles, buildFilterQuery, } from '@/lib/ViewRolesBuilder'; -export default class ViewRolesDynamicFilter extends DynamicFilterRoleAbstructor { +export default class ViewRolesDynamicFilter extends DynamicFilterRoleAbstractor { /** * Constructor method. * @param {*} filterRoles - diff --git a/packages/server/src/locales/ar.json b/packages/server/src/locales/ar.json index f7bed4726..a52b13d51 100644 --- a/packages/server/src/locales/ar.json +++ b/packages/server/src/locales/ar.json @@ -152,7 +152,7 @@ "Opening Balance Liabilities": "رصيد الالتزامات الافتتاحي", "Loan": "اقراض", "Owner A Drawings": "مسحوبات المالك", - "An account that holds valuation of products or goods that availiable for sale.": "حساب يحمل قيم مخزون البضاعة أو السلع المتاحة للبيع.", + "An account that holds valuation of products or goods that available for sale.": "حساب يحمل قيم مخزون البضاعة أو السلع المتاحة للبيع.", "Tracks the gain and losses of the exchange differences.": "يسجل مكاسب وخسائر فروق الصرف.", "Any bank fees levied is recorded into the bank fees and charges account. A bank account maintenance fee, transaction charges, a late payment fee are some examples.": "يتم تسجيل أي رسوم مصرفية يتم فرضها في حساب الرسوم والمصروفات البنكية. ومن الأمثلة على ذلك رسوم صيانة الحساب المصرفي ورسوم المعاملات ورسوم الدفع المتأخر.", "The income activities are not associated to the core business.": "لا ترتبط انشطة الدخل إلى الأعمال الأساسية.", diff --git a/packages/server/src/locales/en.json b/packages/server/src/locales/en.json index 811db19e7..b021c2347 100644 --- a/packages/server/src/locales/en.json +++ b/packages/server/src/locales/en.json @@ -151,7 +151,7 @@ "Opening Balance Liabilities": "Opening Balance Liabilities", "Loan": "Loan", "Owner A Drawings": "Owner A Drawings", - "An account that holds valuation of products or goods that availiable for sale.": "An account that holds valuation of products or goods that availiable for sale.", + "An account that holds valuation of products or goods that available for sale.": "An account that holds valuation of products or goods that available for sale.", "Tracks the gain and losses of the exchange differences.": "Tracks the gain and losses of the exchange differences.", "Any bank fees levied is recorded into the bank fees and charges account. A bank account maintenance fee, transaction charges, a late payment fee are some examples.": "Any bank fees levied is recorded into the bank fees and charges account. A bank account maintenance fee, transaction charges, a late payment fee are some examples.", "The income activities are not associated to the core business.": "The income activities are not associated to the core business.", diff --git a/packages/server/src/models/Account.ts b/packages/server/src/models/Account.ts index a3d9f74f3..9d4fb053e 100644 --- a/packages/server/src/models/Account.ts +++ b/packages/server/src/models/Account.ts @@ -127,7 +127,7 @@ export default class Account extends mixin(TenantModel, [ }, filterAccountTypes(query, typesIds) { if (typesIds.length > 0) { - query.whereIn('account_types.accoun_type_id', typesIds); + query.whereIn('account_types.account_type_id', typesIds); } }, viewRolesBuilder(query, conditionals, expression) { diff --git a/packages/server/src/models/Branch.ts b/packages/server/src/models/Branch.ts index d8097a45d..bf2c4bfa3 100644 --- a/packages/server/src/models/Branch.ts +++ b/packages/server/src/models/Branch.ts @@ -97,7 +97,7 @@ export default class Branch extends TenantModel { }, /** - * Branch may belongs to assocaited bills. + * Branch may belongs to associated bills. */ bills: { relation: Model.HasManyRelation, diff --git a/packages/server/src/models/CashflowTransaction.ts b/packages/server/src/models/CashflowTransaction.ts index 6d6ffcc9b..2184d1434 100644 --- a/packages/server/src/models/CashflowTransaction.ts +++ b/packages/server/src/models/CashflowTransaction.ts @@ -121,7 +121,7 @@ export default class CashflowTransaction extends TenantModel { }, /** - * Cashflow transaction may has assocaited cashflow account. + * Cashflow transaction may has associated cashflow account. */ cashflowAccount: { relation: Model.BelongsToOneRelation, diff --git a/packages/server/src/models/Warehouse.ts b/packages/server/src/models/Warehouse.ts index 12058d396..6657c9a15 100644 --- a/packages/server/src/models/Warehouse.ts +++ b/packages/server/src/models/Warehouse.ts @@ -84,7 +84,7 @@ export default class Warehouse extends TenantModel { }, /** - * Warehouse may belongs to assocaited bills. + * Warehouse may belongs to associated bills. */ bills: { relation: Model.HasManyRelation, diff --git a/packages/server/src/services/Accounting/AcountsTransactionsWarehouses.ts b/packages/server/src/services/Accounting/AccountsTransactionsWarehouses.ts similarity index 100% rename from packages/server/src/services/Accounting/AcountsTransactionsWarehouses.ts rename to packages/server/src/services/Accounting/AccountsTransactionsWarehouses.ts diff --git a/packages/server/src/services/Accounting/AccountsTransactionsWarehousesSubscribe.ts b/packages/server/src/services/Accounting/AccountsTransactionsWarehousesSubscribe.ts index dd6486e91..b109d1237 100644 --- a/packages/server/src/services/Accounting/AccountsTransactionsWarehousesSubscribe.ts +++ b/packages/server/src/services/Accounting/AccountsTransactionsWarehousesSubscribe.ts @@ -1,6 +1,6 @@ import { Service, Inject } from 'typedi'; import events from '@/subscribers/events'; -import { InventoryTransactionsWarehouses } from './AcountsTransactionsWarehouses'; +import { InventoryTransactionsWarehouses } from './AccountsTransactionsWarehouses'; import { IBranchesActivatedPayload } from '@/interfaces'; @Service() diff --git a/packages/server/src/services/Accounting/JournalPoster.ts b/packages/server/src/services/Accounting/JournalPoster.ts index d3400396d..1a2787488 100644 --- a/packages/server/src/services/Accounting/JournalPoster.ts +++ b/packages/server/src/services/Accounting/JournalPoster.ts @@ -79,7 +79,7 @@ export default class JournalPoster implements IJournalPoster { } /** - * Async initialize acccounts dependency graph. + * Async initialize accounts dependency graph. * @private * @returns {Promise} */ diff --git a/packages/server/src/services/Accounting/LedgerContactStorage.ts b/packages/server/src/services/Accounting/LedgerContactStorage.ts index f8a484122..11825db8f 100644 --- a/packages/server/src/services/Accounting/LedgerContactStorage.ts +++ b/packages/server/src/services/Accounting/LedgerContactStorage.ts @@ -66,14 +66,14 @@ export class LedgerContactsBalanceStorage { ): Promise<(entry: ILedgerEntry) => boolean> => { 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_PAYABLE, ]); - const ARAPAcountsIds = ARAPAcounts.map((a) => a.id); + const ARAPAccountsIds = ARAPAccounts.map((a) => a.id); return (entry: ILedgerEntry) => { - return ARAPAcountsIds.indexOf(entry.accountId) !== -1; + return ARAPAccountsIds.indexOf(entry.accountId) !== -1; }; }; diff --git a/packages/server/src/services/Accounting/LedgerStorageService.ts b/packages/server/src/services/Accounting/LedgerStorageService.ts index 2ab78d8fb..616ae6230 100644 --- a/packages/server/src/services/Accounting/LedgerStorageService.ts +++ b/packages/server/src/services/Accounting/LedgerStorageService.ts @@ -35,7 +35,7 @@ export default class LedgerStorageService { // Saves the ledger entries. this.ledgerEntriesService.saveEntries(tenantId, ledger, trx), - // Mutates the assocaited accounts balances. + // Mutates the associated accounts balances. this.ledgerAccountsBalance.saveAccountsBalance(tenantId, ledger, trx), // Mutates the associated contacts balances. @@ -60,7 +60,7 @@ export default class LedgerStorageService { // Deletes the ledger entries. this.ledgerEntriesService.deleteEntries(tenantId, ledger, trx), - // Mutates the assocaited accounts balances. + // Mutates the associated accounts balances. this.ledgerAccountsBalance.saveAccountsBalance(tenantId, ledger, trx), // Mutates the associated contacts balances. diff --git a/packages/server/src/services/Accounting/LedgetAccountStorage.ts b/packages/server/src/services/Accounting/LedgetAccountStorage.ts index 0bb5ae8fb..92d02c07e 100644 --- a/packages/server/src/services/Accounting/LedgetAccountStorage.ts +++ b/packages/server/src/services/Accounting/LedgetAccountStorage.ts @@ -108,7 +108,7 @@ export class LedegrAccountsStorage { const { Account } = this.tenancy.models(tenantId); 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); // Retrieves the given tenant metadata. diff --git a/packages/server/src/services/Accounts/DeleteAccount.ts b/packages/server/src/services/Accounts/DeleteAccount.ts index 4534d5fdd..d8d499c58 100644 --- a/packages/server/src/services/Accounts/DeleteAccount.ts +++ b/packages/server/src/services/Accounts/DeleteAccount.ts @@ -77,7 +77,7 @@ export class DeleteAccount { // Authorize before delete account. await this.authorize(tenantId, accountId, oldAccount); - // Deletes the account and assocaited transactions under UOW envirement. + // Deletes the account and associated transactions under UOW envirement. return this.uow.withTransaction(tenantId, async (trx: Knex.Transaction) => { // Triggers `onAccountDelete` event. await this.eventPublisher.emitAsync(events.accounts.onDelete, { diff --git a/packages/server/src/services/Branches/Subscribers/Activate/CashflowBranchesActviateSubscriber.ts b/packages/server/src/services/Branches/Subscribers/Activate/CashflowBranchesActivateSubscriber.ts similarity index 100% rename from packages/server/src/services/Branches/Subscribers/Activate/CashflowBranchesActviateSubscriber.ts rename to packages/server/src/services/Branches/Subscribers/Activate/CashflowBranchesActivateSubscriber.ts diff --git a/packages/server/src/services/Branches/Subscribers/Activate/index.ts b/packages/server/src/services/Branches/Subscribers/Activate/index.ts index fa691a069..97aeadcee 100644 --- a/packages/server/src/services/Branches/Subscribers/Activate/index.ts +++ b/packages/server/src/services/Branches/Subscribers/Activate/index.ts @@ -1,4 +1,4 @@ -export * from './CashflowBranchesActviateSubscriber'; +export * from './CashflowBranchesActivateSubscriber'; export * from './CreditNoteBranchesActivateSubscriber'; export * from './PaymentMadeBranchesActivateSubscriber'; export * from './PaymentReceiveBranchesActivateSubscriber'; diff --git a/packages/server/src/services/Cashflow/utils.ts b/packages/server/src/services/Cashflow/utils.ts index f9cb1ad6b..31af4b1bc 100644 --- a/packages/server/src/services/Cashflow/utils.ts +++ b/packages/server/src/services/Cashflow/utils.ts @@ -6,7 +6,7 @@ import { } from './constants'; /** - * Ensures the given transaction type to transformed to properiate format. + * Ensures the given transaction type to transformed to appropriate format. * @param {string} type * @returns {string} */ diff --git a/packages/server/src/services/CreditNotes/CreditNotesInventoryTransactions.ts b/packages/server/src/services/CreditNotes/CreditNotesInventoryTransactions.ts index 175b640b6..857f5fc89 100644 --- a/packages/server/src/services/CreditNotes/CreditNotesInventoryTransactions.ts +++ b/packages/server/src/services/CreditNotes/CreditNotesInventoryTransactions.ts @@ -49,7 +49,7 @@ export default class CreditNoteInventoryTransactions { }; /** - * Edits vendor credit assocaited inventory transactions. + * Edits vendor credit associated inventory transactions. * @param {number} tenantId * @param {number} creditNoteId * @param {ICreditNote} creditNote diff --git a/packages/server/src/services/CreditNotes/DeleteCustomerLinkedCreditSubscriber.ts b/packages/server/src/services/CreditNotes/DeleteCustomerLinkedCreditSubscriber.ts index 4f1727c5c..4f1fb3e9d 100644 --- a/packages/server/src/services/CreditNotes/DeleteCustomerLinkedCreditSubscriber.ts +++ b/packages/server/src/services/CreditNotes/DeleteCustomerLinkedCreditSubscriber.ts @@ -29,7 +29,7 @@ export default class DeleteCustomerLinkedCreditSubscriber { }; /** - * Validate vendor has no assocaited credit transaction once the vendor deleting. + * Validate vendor has no associated credit transaction once the vendor deleting. * @param {IVendorEventDeletingPayload} payload - */ public validateCustomerHasNoLinkedCreditsOnDeleting = async ({ diff --git a/packages/server/src/services/DynamicListing/DynamicListAbstract.ts b/packages/server/src/services/DynamicListing/DynamicListAbstract.ts new file mode 100644 index 000000000..216ace346 --- /dev/null +++ b/packages/server/src/services/DynamicListing/DynamicListAbstract.ts @@ -0,0 +1,6 @@ + + + +export default class DynamicListAbstract { + +} \ No newline at end of file diff --git a/packages/server/src/services/DynamicListing/DynamicListAbstruct.ts b/packages/server/src/services/DynamicListing/DynamicListAbstruct.ts deleted file mode 100644 index d7997966b..000000000 --- a/packages/server/src/services/DynamicListing/DynamicListAbstruct.ts +++ /dev/null @@ -1,6 +0,0 @@ - - - -export default class DynamicListAbstruct { - -} \ No newline at end of file diff --git a/packages/server/src/services/DynamicListing/DynamicListCustomView.ts b/packages/server/src/services/DynamicListing/DynamicListCustomView.ts index 7642bd4c4..a46f6ee98 100644 --- a/packages/server/src/services/DynamicListing/DynamicListCustomView.ts +++ b/packages/server/src/services/DynamicListing/DynamicListCustomView.ts @@ -1,5 +1,5 @@ import { Inject, Service } from 'typedi'; -import DynamicListAbstruct from './DynamicListAbstruct'; +import DynamicListAbstract from './DynamicListAbstract'; import DynamicFilterViews from '@/lib/DynamicFilter/DynamicFilterViews'; import { ServiceError } from '@/exceptions'; import HasTenancyService from '@/services/Tenancy/TenancyService'; @@ -7,7 +7,7 @@ import { ERRORS } from './constants'; import { IModel } from '@/interfaces'; @Service() -export default class DynamicListCustomView extends DynamicListAbstruct { +export default class DynamicListCustomView extends DynamicListAbstract { @Inject() tenancy: HasTenancyService; diff --git a/packages/server/src/services/DynamicListing/DynamicListFilterRoles.ts b/packages/server/src/services/DynamicListing/DynamicListFilterRoles.ts index 688b05b09..8f8485036 100644 --- a/packages/server/src/services/DynamicListing/DynamicListFilterRoles.ts +++ b/packages/server/src/services/DynamicListing/DynamicListFilterRoles.ts @@ -2,13 +2,13 @@ import { Service } from 'typedi'; import * as R from 'ramda'; import validator from 'is-my-json-valid'; import { IFilterRole, IModel } from '@/interfaces'; -import DynamicListAbstruct from './DynamicListAbstruct'; +import DynamicListAbstract from './DynamicListAbstract'; import DynamicFilterAdvancedFilter from '@/lib/DynamicFilter/DynamicFilterAdvancedFilter'; import { ERRORS } from './constants'; import { ServiceError } from '@/exceptions'; @Service() -export default class DynamicListFilterRoles extends DynamicListAbstruct { +export default class DynamicListFilterRoles extends DynamicListAbstract { /** * Validates filter roles schema. * @param {IFilterRole[]} filterRoles - Filter roles. diff --git a/packages/server/src/services/DynamicListing/DynamicListSearch.ts b/packages/server/src/services/DynamicListing/DynamicListSearch.ts index 517a15460..7dadaa897 100644 --- a/packages/server/src/services/DynamicListing/DynamicListSearch.ts +++ b/packages/server/src/services/DynamicListing/DynamicListSearch.ts @@ -1,11 +1,11 @@ import { Service } from 'typedi'; import { IFilterRole, IModel } from '@/interfaces'; -import DynamicListAbstruct from './DynamicListAbstruct'; +import DynamicListAbstract from './DynamicListAbstract'; import DynamicFilterFilterRoles from '@/lib/DynamicFilter/DynamicFilterFilterRoles'; import DynamicFilterSearch from '@/lib/DynamicFilter/DynamicFilterSearch'; @Service() -export default class DynamicListSearch extends DynamicListAbstruct { +export default class DynamicListSearch extends DynamicListAbstract { /** * Dynamic list filter roles. * @param {IModel} model diff --git a/packages/server/src/services/DynamicListing/DynamicListSortBy.ts b/packages/server/src/services/DynamicListing/DynamicListSortBy.ts index 594e1c141..0e236edb0 100644 --- a/packages/server/src/services/DynamicListing/DynamicListSortBy.ts +++ b/packages/server/src/services/DynamicListing/DynamicListSortBy.ts @@ -1,12 +1,12 @@ import { Service } from 'typedi'; -import DynamicListAbstruct from './DynamicListAbstruct'; +import DynamicListAbstract from './DynamicListAbstract'; import DynamicFilterSortBy from '@/lib/DynamicFilter/DynamicFilterSortBy'; import { IModel, ISortOrder } from '@/interfaces'; import { ServiceError } from '@/exceptions'; import { ERRORS } from './constants'; @Service() -export default class DynamicListSortBy extends DynamicListAbstruct { +export default class DynamicListSortBy extends DynamicListAbstract { /** * Dynamic list sort by. * @param {IModel} model diff --git a/packages/server/src/services/Features/FeaturesManager.ts b/packages/server/src/services/Features/FeaturesManager.ts index c57f3663e..2ee0265be 100644 --- a/packages/server/src/services/Features/FeaturesManager.ts +++ b/packages/server/src/services/Features/FeaturesManager.ts @@ -34,7 +34,7 @@ export class FeaturesManager { } /** - * Detarmines the given feature name is accessiable. + * Detarmines the given feature name is accessible. * @param {number} tenantId * @param {string} feature * @returns {Promise} diff --git a/packages/server/src/services/Features/FeaturesSettingsDriver.ts b/packages/server/src/services/Features/FeaturesSettingsDriver.ts index 6e3827951..dd0c98022 100644 --- a/packages/server/src/services/Features/FeaturesSettingsDriver.ts +++ b/packages/server/src/services/Features/FeaturesSettingsDriver.ts @@ -33,7 +33,7 @@ export class FeaturesSettingsDriver { } /** - * Detarmines the given feature name is accessiable. + * Detarmines the given feature name is accessible. * @param {number} tenantId * @param {string} feature * @returns {Promise} diff --git a/packages/server/src/services/FinancialStatements/CashFlow/CashFlow.ts b/packages/server/src/services/FinancialStatements/CashFlow/CashFlow.ts index fe2717fea..019b252ba 100644 --- a/packages/server/src/services/FinancialStatements/CashFlow/CashFlow.ts +++ b/packages/server/src/services/FinancialStatements/CashFlow/CashFlow.ts @@ -197,7 +197,7 @@ export default class CashFlowStatement extends compose( code: account.code, label: account.name, accountType: account.accountType, - adjusmentType: relation.direction, + adjustmentType: relation.direction, total: this.getAmountMeta(closingBalance), sectionType: ICashFlowStatementSectionType.ACCOUNT, }; @@ -362,14 +362,14 @@ export default class CashFlowStatement extends compose( /** * Retrieve the total section from the eqauation parser. * @param {ICashFlowSchemaTotalSection} sectionSchema - * @param {ICashFlowSchemaSection[]} accumlatedSections + * @param {ICashFlowSchemaSection[]} accumulatedSections * @returns {ICashFlowStatementTotalSection} */ private totalEquationSectionParser = ( - accumlatedSections: ICashFlowSchemaSection[], + accumulatedSections: ICashFlowSchemaSection[], sectionSchema: ICashFlowSchemaTotalSection ): ICashFlowStatementTotalSection => { - const mappedSectionsById = this.transformSectionsToMap(accumlatedSections); + const mappedSectionsById = this.transformSectionsToMap(accumulatedSections); const nodesTotalById = this.sectionsMapToTotal(mappedSectionsById); const total = this.evaluateEquation(sectionSchema.equation, nodesTotalById); @@ -421,7 +421,7 @@ export default class CashFlowStatement extends compose( code: account.code, label: account.name, accountType: account.accountType, - adjusmentType: relation.direction, + adjustmentType: relation.direction, total: this.getAmountMeta(closingBalance), sectionType: ICashFlowStatementSectionType.ACCOUNT, }; @@ -524,7 +524,7 @@ export default class CashFlowStatement extends compose( * @param {ICashFlowSchemaSection | ICashFlowStatementSection} section * @param {number} key * @param {ICashFlowSchemaSection[]} parentValue - * @param {(ICashFlowSchemaSection | ICashFlowStatementSection)[]} accumlatedSections + * @param {(ICashFlowSchemaSection | ICashFlowStatementSection)[]} accumulatedSections * @returns {ICashFlowSchemaSection} */ private schemaSectionTotalParser = ( @@ -532,13 +532,13 @@ export default class CashFlowStatement extends compose( key: number, parentValue: ICashFlowSchemaSection[], context, - accumlatedSections: (ICashFlowSchemaSection | ICashFlowStatementSection)[] + accumulatedSections: (ICashFlowSchemaSection | ICashFlowStatementSection)[] ): ICashFlowSchemaSection | ICashFlowStatementSection => { return R.compose( // Total equation section. R.when( this.isSchemaSectionType(ICashFlowStatementSectionType.TOTAL), - R.curry(this.totalEquationSectionParser)(accumlatedSections) + R.curry(this.totalEquationSectionParser)(accumulatedSections) ) )(section); }; diff --git a/packages/server/src/services/FinancialStatements/CashFlow/CashFlowDatePeriods.ts b/packages/server/src/services/FinancialStatements/CashFlow/CashFlowDatePeriods.ts index 864180b26..7d493cc5d 100644 --- a/packages/server/src/services/FinancialStatements/CashFlow/CashFlowDatePeriods.ts +++ b/packages/server/src/services/FinancialStatements/CashFlow/CashFlowDatePeriods.ts @@ -165,7 +165,7 @@ export const CashFlowStatementDatePeriods = (Base) => .whereAccountId(node.id) .getClosingBalance(); - return this.amountAdjustment(node.adjusmentType, closingBalance); + return this.amountAdjustment(node.adjustmentType, closingBalance); }; /** @@ -322,7 +322,7 @@ export const CashFlowStatementDatePeriods = (Base) => // Cash at beginning ---------------------- /** - * Retrieve the date preioods of the given node and accumlated function. + * Retrieve the date preioods of the given node and accumulated function. * @param {} node * @param {} * @return {} diff --git a/packages/server/src/services/FinancialStatements/CashflowAccountTransactions/CashflowAccountTransactionsService.ts b/packages/server/src/services/FinancialStatements/CashflowAccountTransactions/CashflowAccountTransactionsService.ts index 7a41cef41..f3035a148 100644 --- a/packages/server/src/services/FinancialStatements/CashflowAccountTransactions/CashflowAccountTransactionsService.ts +++ b/packages/server/src/services/FinancialStatements/CashflowAccountTransactions/CashflowAccountTransactionsService.ts @@ -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 {ICashflowAccountTransactionsQuery} query - * @return {Promise} diff --git a/packages/server/src/services/FinancialStatements/FinancialDatePeriods.ts b/packages/server/src/services/FinancialStatements/FinancialDatePeriods.ts index e1c05e64e..cc79aa74d 100644 --- a/packages/server/src/services/FinancialStatements/FinancialDatePeriods.ts +++ b/packages/server/src/services/FinancialStatements/FinancialDatePeriods.ts @@ -64,7 +64,7 @@ export const FinancialDatePeriods = (Base) => }; /** - * Retrieve the date preioods of the given node and accumlated function. + * Retrieve the date preioods of the given node and accumulated function. * @param {IBalanceSheetAccountNode} node * @param {(fromDate: Date, toDate: Date, index: number) => any} * @return {} diff --git a/packages/server/src/services/FinancialStatements/InventoryDetails/InventoryDetails.ts b/packages/server/src/services/FinancialStatements/InventoryDetails/InventoryDetails.ts index c626441e3..d09cf19cd 100644 --- a/packages/server/src/services/FinancialStatements/InventoryDetails/InventoryDetails.ts +++ b/packages/server/src/services/FinancialStatements/InventoryDetails/InventoryDetails.ts @@ -126,7 +126,7 @@ export default class InventoryDetails extends FinancialSheet { ); /** - * Accumlate and mapping running quantity on transactions. + * Accumulate and mapping running quantity on transactions. * @param {IInventoryDetailsItemTransaction[]} transactions * @returns {IInventoryDetailsItemTransaction[]} */ @@ -150,7 +150,7 @@ export default class InventoryDetails extends FinancialSheet { } /** - * Accumlate and mapping running valuation on transactions. + * Accumulate and mapping running valuation on transactions. * @param {IInventoryDetailsItemTransaction[]} transactions * @returns {IInventoryDetailsItemTransaction} */ @@ -160,8 +160,8 @@ export default class InventoryDetails extends FinancialSheet { const initial = this.getNumberMeta(0); const mapAccumAppender = (a, b) => { - const adjusmtent = b.direction === 'OUT' ? -1 : 1; - const total = a.runningValuation.number + b.cost.number * adjusmtent; + const adjustment = b.direction === 'OUT' ? -1 : 1; + const total = a.runningValuation.number + b.cost.number * adjustment; const totalMeta = this.getNumberMeta(total, { excerptZero: false }); const accum = { ...b, runningValuation: totalMeta }; diff --git a/packages/server/src/services/FinancialStatements/ProjectProfitabilitySummary/ProjectProfitabilitySummaryRepository.ts b/packages/server/src/services/FinancialStatements/ProjectProfitabilitySummary/ProjectProfitabilitySummaryRepository.ts index 9ba59cc74..463574a27 100644 --- a/packages/server/src/services/FinancialStatements/ProjectProfitabilitySummary/ProjectProfitabilitySummaryRepository.ts +++ b/packages/server/src/services/FinancialStatements/ProjectProfitabilitySummary/ProjectProfitabilitySummaryRepository.ts @@ -129,9 +129,9 @@ export class ProjectProfitabilitySummaryRespository { */ public getIncomeAccountsGroupedEntries = async () => { const incomeAccounts = await this.getIncomeAccounts(); - const incomeAcountssIds = map(incomeAccounts, 'id'); + const incomeAccountsIds = map(incomeAccounts, 'id'); - return this.getAccountsGroupedEntries(incomeAcountssIds); + return this.getAccountsGroupedEntries(incomeAccountsIds); }; /** diff --git a/packages/server/src/services/Inventory/Inventory.ts b/packages/server/src/services/Inventory/Inventory.ts index c5ec78dee..33394bfe7 100644 --- a/packages/server/src/services/Inventory/Inventory.ts +++ b/packages/server/src/services/Inventory/Inventory.ts @@ -95,7 +95,7 @@ export default class InventoryService { ) { const { Item } = this.tenancy.models(tenantId); - // Fetches the item with assocaited item category. + // Fetches the item with associated item category. const item = await Item.query().findById(itemId); // Cannot continue if the given item was not inventory item. diff --git a/packages/server/src/services/Inventory/InventoryAdjustmentService.ts b/packages/server/src/services/Inventory/InventoryAdjustmentService.ts index 44df986e1..48b94d149 100644 --- a/packages/server/src/services/Inventory/InventoryAdjustmentService.ts +++ b/packages/server/src/services/Inventory/InventoryAdjustmentService.ts @@ -180,7 +180,7 @@ export default class InventoryAdjustmentService { quickAdjustmentDTO, } as IInventoryAdjustmentCreatingPayload ); - // Saves the inventory adjustment with assocaited entries to the storage. + // Saves the inventory adjustment with associated entries to the storage. const inventoryAdjustment = await InventoryAdjustment.query( trx ).upsertGraph({ diff --git a/packages/server/src/services/Inventory/InventoryAverageCost.ts b/packages/server/src/services/Inventory/InventoryAverageCost.ts index 0108cab16..84c2bdd85 100644 --- a/packages/server/src/services/Inventory/InventoryAverageCost.ts +++ b/packages/server/src/services/Inventory/InventoryAverageCost.ts @@ -49,7 +49,7 @@ export default class InventoryAverageCostMethod public async computeItemCost() { const { InventoryTransaction } = this.tenantModels; const { averageCost, openingQuantity, openingCost } = - await this.getOpeningAvaregeCost(this.startingDate, this.itemId); + await this.getOpeningAverageCost(this.startingDate, this.itemId); const afterInvTransactions: IInventoryTransaction[] = await InventoryTransaction.query() @@ -75,12 +75,12 @@ export default class InventoryAverageCostMethod } /** - * Get items Avarege cost from specific date from inventory transactions. + * Get items Average cost from specific date from inventory transactions. * @async * @param {Date} closingDate * @return {number} */ - public async getOpeningAvaregeCost(closingDate: Date, itemId: number) { + public async getOpeningAverageCost(closingDate: Date, itemId: number) { const { InventoryCostLotTracker } = this.tenantModels; const commonBuilder = (builder: any) => { diff --git a/packages/server/src/services/Inventory/InventoryCostLotTracker.ts b/packages/server/src/services/Inventory/InventoryCostLotTracker.ts index 9ce03880a..aa317674c 100644 --- a/packages/server/src/services/Inventory/InventoryCostLotTracker.ts +++ b/packages/server/src/services/Inventory/InventoryCostLotTracker.ts @@ -79,7 +79,7 @@ export default class InventoryCostLotTracker extends InventoryCostMethod impleme /** * Fetched inventory transactions that has date from the starting date and - * fetches availiable IN LOTs transactions that has remaining bigger than zero. + * fetches available IN LOTs transactions that has remaining bigger than zero. * @private */ private async fetchInvINTransactions() { @@ -97,7 +97,7 @@ export default class InventoryCostLotTracker extends InventoryCostMethod impleme .orderBy('lot_number', (this.costMethod === 'LIFO') ? 'DESC' : 'ASC') .withGraphFetched('item'); - const availiableINLots: IInventoryLotCost[] = + const availableINLots: IInventoryLotCost[] = await InventoryLotCostTracker.query() .modify('filterDateRange', null, this.startingDate) .orderBy('date', 'ASC') @@ -107,7 +107,7 @@ export default class InventoryCostLotTracker extends InventoryCostMethod impleme .whereNot('remaining', 0); this.inTransactions = [ - ...availiableINLots.map((trans) => ({ lotTransId: trans.id, ...trans })), + ...availableINLots.map((trans) => ({ lotTransId: trans.id, ...trans })), ...afterInvTransactions.map((trans) => ({ invTransId: trans.id, ...trans })), ]; } diff --git a/packages/server/src/services/ItemCategories/ItemCategoriesService.ts b/packages/server/src/services/ItemCategories/ItemCategoriesService.ts index 76a6f1c18..f1ba27621 100644 --- a/packages/server/src/services/ItemCategories/ItemCategoriesService.ts +++ b/packages/server/src/services/ItemCategories/ItemCategoriesService.ts @@ -344,7 +344,7 @@ export default class ItemCategoriesService implements IItemCategoriesService { ); // Items categories. const itemCategories = await ItemCategory.query().onBuild((query) => { - // Subquery to calculate sumation of assocaited items to the item category. + // Subquery to calculate sumation of associated items to the item category. query.select('*', ItemCategory.relatedQuery('items').count().as('count')); dynamicList.buildQuery()(query); diff --git a/packages/server/src/services/Items/ItemValidators.ts b/packages/server/src/services/Items/ItemValidators.ts index d902c3872..486c08a8d 100644 --- a/packages/server/src/services/Items/ItemValidators.ts +++ b/packages/server/src/services/Items/ItemValidators.ts @@ -198,7 +198,7 @@ export class ItemsValidators { /** * Validate the item inventory account whether modified and item - * has assocaited inventory transactions. + * has associated inventory transactions. * @param {numnber} tenantId * @param {IItem} oldItem * @param {IItemDTO} newItemDTO diff --git a/packages/server/src/services/ManualJournals/CommandManualJournalValidators.ts b/packages/server/src/services/ManualJournals/CommandManualJournalValidators.ts index d6bbe0a8c..5cc3e94c4 100644 --- a/packages/server/src/services/ManualJournals/CommandManualJournalValidators.ts +++ b/packages/server/src/services/ManualJournals/CommandManualJournalValidators.ts @@ -59,7 +59,7 @@ export class CommandManualJournalValidators { const storedAccountsIds = accounts.map((account) => account.id); if (difference(manualAccountsIds, storedAccountsIds).length > 0) { - throw new ServiceError(ERRORS.ACCCOUNTS_IDS_NOT_FOUND); + throw new ServiceError(ERRORS.ACCOUNTS_IDS_NOT_FOUND); } } diff --git a/packages/server/src/services/ManualJournals/GetManualJournal.ts b/packages/server/src/services/ManualJournals/GetManualJournal.ts index 9f4f5c530..97142a494 100644 --- a/packages/server/src/services/ManualJournals/GetManualJournal.ts +++ b/packages/server/src/services/ManualJournals/GetManualJournal.ts @@ -12,7 +12,7 @@ export class GetManualJournal { private transformer: TransformerInjectable; /** - * Retrieve manual journal details with assocaited journal transactions. + * Retrieve manual journal details with associated journal transactions. * @param {number} tenantId * @param {number} manualJournalId */ diff --git a/packages/server/src/services/ManualJournals/constants.ts b/packages/server/src/services/ManualJournals/constants.ts index ed085f2fc..6f6379be2 100644 --- a/packages/server/src/services/ManualJournals/constants.ts +++ b/packages/server/src/services/ManualJournals/constants.ts @@ -2,7 +2,7 @@ export const ERRORS = { NOT_FOUND: 'manual_journal_not_found', CREDIT_DEBIT_NOT_EQUAL_ZERO: 'credit_debit_not_equal_zero', CREDIT_DEBIT_NOT_EQUAL: 'credit_debit_not_equal', - ACCCOUNTS_IDS_NOT_FOUND: 'acccounts_ids_not_found', + ACCOUNTS_IDS_NOT_FOUND: 'accounts_ids_not_found', JOURNAL_NUMBER_EXISTS: 'journal_number_exists', ENTRIES_SHOULD_ASSIGN_WITH_CONTACT: 'ENTRIES_SHOULD_ASSIGN_WITH_CONTACT', CONTACTS_NOT_FOUND: 'contacts_not_found', diff --git a/packages/server/src/services/Projects/Times/SyncActualTimeTaskSubscriber.ts b/packages/server/src/services/Projects/Times/SyncActualTimeTaskSubscriber.ts index 45f64f52c..82b24b31b 100644 --- a/packages/server/src/services/Projects/Times/SyncActualTimeTaskSubscriber.ts +++ b/packages/server/src/services/Projects/Times/SyncActualTimeTaskSubscriber.ts @@ -23,7 +23,7 @@ export class SyncActualTimeTaskSubscriber { ); bus.subscribe( events.projectTime.onDeleted, - this.handleDecreaseActaulTimeOnTimeDelete + this.handleDecreaseActualTimeOnTimeDelete ); bus.subscribe( events.projectTime.onEdited, @@ -52,7 +52,7 @@ export class SyncActualTimeTaskSubscriber { * Handle decreasing the actual time of the tsak once time entry be deleted. * @param {IProjectTimeDeletedEventPayload} payload */ - private handleDecreaseActaulTimeOnTimeDelete = async ({ + private handleDecreaseActualTimeOnTimeDelete = async ({ tenantId, oldTime, trx, diff --git a/packages/server/src/services/Purchases/BillPayments/BillPaymentGLEntriesSubscriber.ts b/packages/server/src/services/Purchases/BillPayments/BillPaymentGLEntriesSubscriber.ts index 6a7cc983e..cdfb456d5 100644 --- a/packages/server/src/services/Purchases/BillPayments/BillPaymentGLEntriesSubscriber.ts +++ b/packages/server/src/services/Purchases/BillPayments/BillPaymentGLEntriesSubscriber.ts @@ -36,7 +36,7 @@ export class PaymentWriteGLEntriesSubscriber { trx, }: IBillPaymentEventCreatedPayload) => { // Records the journal transactions after bills payment - // and change diff acoount balance. + // and change diff account balance. await this.billPaymentGLEntries.writePaymentGLEntries( tenantId, billPayment.id, diff --git a/packages/server/src/services/Purchases/BillPayments/BillPaymentsPages.ts b/packages/server/src/services/Purchases/BillPayments/BillPaymentsPages.ts index 7b4e0d8fe..0eb20b856 100644 --- a/packages/server/src/services/Purchases/BillPayments/BillPaymentsPages.ts +++ b/packages/server/src/services/Purchases/BillPayments/BillPaymentsPages.ts @@ -68,7 +68,7 @@ export default class BillPaymentsPages { ): Promise { const { Bill } = this.tenancy.models(tenantId); - // Retrieve all payable bills that assocaited to the payment made transaction. + // Retrieve all payable bills that associated to the payment made transaction. const payableBills = await Bill.query() .modify('opened') .modify('dueBills') diff --git a/packages/server/src/services/Purchases/Bills/BillGLEntriesSubscriber.ts b/packages/server/src/services/Purchases/Bills/BillGLEntriesSubscriber.ts index 9b31cf463..231b3cedd 100644 --- a/packages/server/src/services/Purchases/Bills/BillGLEntriesSubscriber.ts +++ b/packages/server/src/services/Purchases/Bills/BillGLEntriesSubscriber.ts @@ -14,7 +14,7 @@ export class BillGLEntriesSubscriber { private billGLEntries: BillGLEntries; /** - * Attachs events with handles. + * Attaches events with handles. */ public attach(bus) { bus.subscribe( diff --git a/packages/server/src/services/Purchases/Bills/BillPaymentsGLEntriesRewriteSubscriber.ts b/packages/server/src/services/Purchases/Bills/BillPaymentsGLEntriesRewriteSubscriber.ts index b2571fef3..4e193fe2f 100644 --- a/packages/server/src/services/Purchases/Bills/BillPaymentsGLEntriesRewriteSubscriber.ts +++ b/packages/server/src/services/Purchases/Bills/BillPaymentsGLEntriesRewriteSubscriber.ts @@ -9,7 +9,7 @@ export class BillPaymentsGLEntriesRewriteSubscriber { private billPaymentGLEntriesRewrite: BillPaymentsGLEntriesRewrite; /** - * Attachs events with handles. + * Attaches events with handles. */ public attach(bus) { bus.subscribe( diff --git a/packages/server/src/services/Purchases/Bills/DeleteBill.ts b/packages/server/src/services/Purchases/Bills/DeleteBill.ts index 51f58ddfc..6cb47e9d5 100644 --- a/packages/server/src/services/Purchases/Bills/DeleteBill.ts +++ b/packages/server/src/services/Purchases/Bills/DeleteBill.ts @@ -43,7 +43,7 @@ export class DeleteBill { // Validate the givne bill has no associated landed cost transactions. await this.validators.validateBillHasNoLandedCost(tenantId, billId); - // Validate the purchase bill has no assocaited payments transactions. + // Validate the purchase bill has no associated payments transactions. await this.validators.validateBillHasNoEntries(tenantId, billId); // Validate the given bill has no associated reconciled with vendor credits. diff --git a/packages/server/src/services/Purchases/LandedCost/RevertAllocatedLandedCost.ts b/packages/server/src/services/Purchases/LandedCost/RevertAllocatedLandedCost.ts index 75d4a4399..df18b6065 100644 --- a/packages/server/src/services/Purchases/LandedCost/RevertAllocatedLandedCost.ts +++ b/packages/server/src/services/Purchases/LandedCost/RevertAllocatedLandedCost.ts @@ -39,7 +39,7 @@ export default class RevertAllocatedLandedCost extends BaseLandedCost { ); // Deletes landed cost with associated transactions. return this.uow.withTransaction(tenantId, async (trx: Knex.Transaction) => { - // Delete landed cost transaction with assocaited locate entries. + // Delete landed cost transaction with associated locate entries. await this.deleteLandedCost(tenantId, landedCostId, trx); // Triggers the event `onBillLandedCostCreated`. @@ -55,7 +55,7 @@ export default class RevertAllocatedLandedCost extends BaseLandedCost { }; /** - * Deletes the landed cost transaction with assocaited allocate entries. + * Deletes the landed cost transaction with associated allocate entries. * @param {number} tenantId - Tenant id. * @param {number} landedCostId - Landed cost id. */ diff --git a/packages/server/src/services/Purchases/VendorCredits/DeleteVendorAssociatedVendorCredit.ts b/packages/server/src/services/Purchases/VendorCredits/DeleteVendorAssociatedVendorCredit.ts index 63ad79d8d..ac974cee9 100644 --- a/packages/server/src/services/Purchases/VendorCredits/DeleteVendorAssociatedVendorCredit.ts +++ b/packages/server/src/services/Purchases/VendorCredits/DeleteVendorAssociatedVendorCredit.ts @@ -25,7 +25,7 @@ export default class DeleteVendorAssociatedVendorCredit { }; /** - * Validate vendor has no assocaited credit transaction once the vendor deleting. + * Validate vendor has no associated credit transaction once the vendor deleting. * @param {IVendorEventDeletingPayload} payload - */ public validateVendorHasNoCreditsTransactionsOnceDeleting = async ({ diff --git a/packages/server/src/services/Purchases/VendorCredits/VendorCreditGLEntriesSubscriber.ts b/packages/server/src/services/Purchases/VendorCredits/VendorCreditGLEntriesSubscriber.ts index 5bfccf190..0c7761701 100644 --- a/packages/server/src/services/Purchases/VendorCredits/VendorCreditGLEntriesSubscriber.ts +++ b/packages/server/src/services/Purchases/VendorCredits/VendorCreditGLEntriesSubscriber.ts @@ -71,7 +71,7 @@ export default class VendorCreditGlEntriesSubscriber { }; /** - * Edits assocaited GL entries once vendor credit edited. + * Edits associated GL entries once vendor credit edited. * @param {IVendorCreditEditedPayload} payload */ private editGLEntriesOnceVendorCreditEdited = async ({ diff --git a/packages/server/src/services/Purchases/VendorCredits/VendorCreditInventoryTransactions.ts b/packages/server/src/services/Purchases/VendorCredits/VendorCreditInventoryTransactions.ts index ed58daa1b..258bfe8d9 100644 --- a/packages/server/src/services/Purchases/VendorCredits/VendorCreditInventoryTransactions.ts +++ b/packages/server/src/services/Purchases/VendorCredits/VendorCreditInventoryTransactions.ts @@ -51,7 +51,7 @@ export default class VendorCreditInventoryTransactions { }; /** - * Edits vendor credit assocaited inventory transactions. + * Edits vendor credit associated inventory transactions. * @param {number} tenantId * @param {number} creditNoteId * @param {ICreditNote} creditNote diff --git a/packages/server/src/services/Sales/Estimates/DeleteSaleEstimate.ts b/packages/server/src/services/Sales/Estimates/DeleteSaleEstimate.ts index 4975b58f3..4cc17e926 100644 --- a/packages/server/src/services/Sales/Estimates/DeleteSaleEstimate.ts +++ b/packages/server/src/services/Sales/Estimates/DeleteSaleEstimate.ts @@ -44,7 +44,7 @@ export class DeleteSaleEstimate { if (oldSaleEstimate.convertedToInvoiceId) { throw new ServiceError(ERRORS.SALE_ESTIMATE_CONVERTED_TO_INVOICE); } - // Deletes the estimate with associated transactions under UOW enivrement. + // Updates the estimate with associated transactions under UOW enivrement. return this.uow.withTransaction(tenantId, async (trx: Knex.Transaction) => { // Triggers `onSaleEstimatedDeleting` event. await this.eventPublisher.emitAsync(events.saleEstimate.onDeleting, { diff --git a/packages/server/src/services/Sales/Invoices/GetInvoicePaymentsService.ts b/packages/server/src/services/Sales/Invoices/GetInvoicePaymentsService.ts index 2bdb874f1..05b3b7f9e 100644 --- a/packages/server/src/services/Sales/Invoices/GetInvoicePaymentsService.ts +++ b/packages/server/src/services/Sales/Invoices/GetInvoicePaymentsService.ts @@ -12,7 +12,7 @@ export class GetInvoicePaymentsService { private transformer: TransformerInjectable; /** - * Retrieve the invoice assocaited payments transactions. + * Retrieve the invoice associated payments transactions. * @param {number} tenantId - Tenant id. * @param {number} invoiceId - Invoice id. */ diff --git a/packages/server/src/services/Warehouses/WarehousesTransfers/TransferredWarehouseTransfer.ts b/packages/server/src/services/Warehouses/WarehousesTransfers/TransferredWarehouseTransfer.ts index 6e5f52722..9ce618990 100644 --- a/packages/server/src/services/Warehouses/WarehousesTransfers/TransferredWarehouseTransfer.ts +++ b/packages/server/src/services/Warehouses/WarehousesTransfers/TransferredWarehouseTransfer.ts @@ -32,7 +32,7 @@ export class TransferredWarehouseTransfer extends CommandWarehouseTransfer { warehouseTransfer: IWarehouseTransfer ) => { if (warehouseTransfer.transferDeliveredAt) { - throw new ServiceError(ERRORS.WAREHOUSE_TRANSFER_ALREAD_TRANSFERRED); + throw new ServiceError(ERRORS.WAREHOUSE_TRANSFER_ALREADY_TRANSFERRED); } }; diff --git a/packages/server/src/services/Warehouses/WarehousesTransfers/constants.ts b/packages/server/src/services/Warehouses/WarehousesTransfers/constants.ts index b147c1f08..790061627 100644 --- a/packages/server/src/services/Warehouses/WarehousesTransfers/constants.ts +++ b/packages/server/src/services/Warehouses/WarehousesTransfers/constants.ts @@ -8,7 +8,7 @@ export const ERRORS = { WAREHOUSE_TRANSFER_ITEMS_SHOULD_BE_INVENTORY: 'WAREHOUSE_TRANSFER_ITEMS_SHOULD_BE_INVENTORY', - WAREHOUSE_TRANSFER_ALREAD_TRANSFERRED: + WAREHOUSE_TRANSFER_ALREADY_TRANSFERRED: 'WAREHOUSE_TRANSFER_ALREADY_TRANSFERRED', WAREHOUSE_TRANSFER_ALREADY_INITIATED: 'WAREHOUSE_TRANSFER_ALREADY_INITIATED', diff --git a/packages/server/src/subscribers/Bills/WriteJournalEntries.ts b/packages/server/src/subscribers/Bills/WriteJournalEntries.ts index f30694753..50e4ea155 100644 --- a/packages/server/src/subscribers/Bills/WriteJournalEntries.ts +++ b/packages/server/src/subscribers/Bills/WriteJournalEntries.ts @@ -17,7 +17,7 @@ export default class BillWriteGLEntriesSubscriber { billsService: BillsService; /** - * Attachs events with handles. + * Attaches events with handles. */ public attach(bus) { bus.subscribe( diff --git a/packages/server/src/subscribers/Organization/SyncTenantAdminUser.ts b/packages/server/src/subscribers/Organization/SyncTenantAdminUser.ts index d09a621da..f0d88fcf6 100644 --- a/packages/server/src/subscribers/Organization/SyncTenantAdminUser.ts +++ b/packages/server/src/subscribers/Organization/SyncTenantAdminUser.ts @@ -16,7 +16,7 @@ export default class OrgSyncTenantAdminUserSubscriber { } /** - * Assign the autorized system user as admin role. + * Assign the authorized system user as admin role. */ public assignSystemUserAsAdminRole = async ({ tenantId, diff --git a/packages/server/tests/routes/auth.test.js b/packages/server/tests/routes/auth.test.js index 69226bad8..0f9da2b34 100644 --- a/packages/server/tests/routes/auth.test.js +++ b/packages/server/tests/routes/auth.test.js @@ -95,7 +95,7 @@ describe('routes: /auth/', () => { expect(res.status).equals(200); }); - it('Should autheticate success with correct phone number and password.', async () => { + it('Should authenticate success with correct phone number and password.', async () => { const password = await hashPassword('admin'); const user = await createUser(tenantWebsite, { phone_number: '0920000000', diff --git a/packages/server/tests/routes/sales_invoices.test.js b/packages/server/tests/routes/sales_invoices.test.js index 8e759fbdc..f0441dd5a 100644 --- a/packages/server/tests/routes/sales_invoices.test.js +++ b/packages/server/tests/routes/sales_invoices.test.js @@ -471,7 +471,7 @@ describe('route: `/sales/invoices`', () => { }); }); - it('Should delete the given sale invoice with assocaited entries.', async () => { + it('Should delete the given sale invoice with associated entries.', async () => { const saleInvoice = await tenantFactory.create('sale_invoice'); const saleInvoiceEntey = await tenantFactory.create('sale_invoice_entry', { sale_invoice_id: saleInvoice.id, diff --git a/packages/webapp/src/components/AvaterCell.tsx b/packages/webapp/src/components/AvatarCell.tsx similarity index 100% rename from packages/webapp/src/components/AvaterCell.tsx rename to packages/webapp/src/components/AvatarCell.tsx diff --git a/packages/webapp/src/components/Dashboard/DashboardBoot.tsx b/packages/webapp/src/components/Dashboard/DashboardBoot.tsx index 2389cc4a7..bae18273e 100644 --- a/packages/webapp/src/components/Dashboard/DashboardBoot.tsx +++ b/packages/webapp/src/components/Dashboard/DashboardBoot.tsx @@ -86,7 +86,7 @@ export function useApplicationBoot() { const [startLoading, stopLoading] = useSplashLoading(); // Splash loading when organization request loading and - // applicaiton still not booted. + // application still not booted. useWatchImmediate((value) => { value && !isBooted.current && startLoading(); }, isOrgLoading); diff --git a/packages/webapp/src/components/index.tsx b/packages/webapp/src/components/index.tsx index 79efd3148..4a8478e3d 100644 --- a/packages/webapp/src/components/index.tsx +++ b/packages/webapp/src/components/index.tsx @@ -1,7 +1,7 @@ // @ts-nocheck import MODIFIER from './modifiers'; import ContextMenu from './ContextMenu'; -import AvaterCell from './AvaterCell'; +import AvatarCell from './AvatarCell'; export * from './Money/Money'; export * from './Dialog'; @@ -65,4 +65,4 @@ export * from './Postbox'; export * from './AppToaster'; export * from './Layout'; -export { MODIFIER, ContextMenu, AvaterCell }; +export { MODIFIER, ContextMenu, AvatarCell }; diff --git a/packages/webapp/src/containers/Customers/CustomerForm/CustomerForm.tsx b/packages/webapp/src/containers/Customers/CustomerForm/CustomerForm.tsx index ceca8de2c..bcc7df75b 100644 --- a/packages/webapp/src/containers/Customers/CustomerForm/CustomerForm.tsx +++ b/packages/webapp/src/containers/Customers/CustomerForm/CustomerForm.tsx @@ -4,7 +4,7 @@ import { CustomerFormProvider } from './CustomerFormProvider'; import CustomerFormFormik from './CustomerFormFormik'; /** - * Abstructed customer form. + * Abstracted customer form. */ export default function CustomerForm({ customerId }) { return ( diff --git a/packages/webapp/src/containers/Customers/CustomersLanding/components.tsx b/packages/webapp/src/containers/Customers/CustomersLanding/components.tsx index c93bcb31f..0de0a69b5 100644 --- a/packages/webapp/src/containers/Customers/CustomersLanding/components.tsx +++ b/packages/webapp/src/containers/Customers/CustomersLanding/components.tsx @@ -11,7 +11,7 @@ import { Classes, } from '@blueprintjs/core'; -import { Can, Icon, Money, If, AvaterCell } from '@/components'; +import { Can, Icon, Money, If, AvatarCell } from '@/components'; import { CustomerAction, AbilitySubject } from '@/constants/abilityOption'; import { safeCallback } from '@/utils'; @@ -121,7 +121,7 @@ export function useCustomersTableColumns() { { id: 'avatar', Header: '', - Cell: AvaterCell, + Cell: AvatarCell, className: 'avatar', width: 45, disableResizing: true, diff --git a/packages/webapp/src/containers/Dialogs/WarehouseActivateDialog/index.tsx b/packages/webapp/src/containers/Dialogs/WarehouseActivateDialog/index.tsx index 1537c0c0d..ea0ac1272 100644 --- a/packages/webapp/src/containers/Dialogs/WarehouseActivateDialog/index.tsx +++ b/packages/webapp/src/containers/Dialogs/WarehouseActivateDialog/index.tsx @@ -16,7 +16,7 @@ function WarehouseActivateDialog({ dialogName, payload: {}, isOpen }) { return ( } + title={} isOpen={isOpen} canEscapeJeyClose={true} autoFocus={true} diff --git a/packages/webapp/src/containers/Drawers/BillDrawer/BillDetailTableFooter.tsx b/packages/webapp/src/containers/Drawers/BillDrawer/BillDetailTableFooter.tsx index 6ad6d62d5..e3b44c1ce 100644 --- a/packages/webapp/src/containers/Drawers/BillDrawer/BillDetailTableFooter.tsx +++ b/packages/webapp/src/containers/Drawers/BillDrawer/BillDetailTableFooter.tsx @@ -23,7 +23,7 @@ export function BillDetailTableFooter() { } - value={} + value={} borderStyle={TotalLineBorderStyle.SingleDark} /> { diff --git a/packages/webapp/src/containers/Projects/components/ProjectSuggestField.tsx b/packages/webapp/src/containers/Projects/components/ProjectSuggestField.tsx index 216606a5f..071e0ac41 100644 --- a/packages/webapp/src/containers/Projects/components/ProjectSuggestField.tsx +++ b/packages/webapp/src/containers/Projects/components/ProjectSuggestField.tsx @@ -128,10 +128,10 @@ export function ProjectSuggestField({ } const AvatarSelect = ({ text }) => { - return {firstLettersArgs(text?.name)}; + return {firstLettersArgs(text?.name)}; }; -const AvaterContent = styled.div` +const AvatarContent = styled.div` display: inline-block; background: #adbcc9; text-align: center; diff --git a/packages/webapp/src/containers/Purchases/Bills/BillForm/BillFloatingActions.tsx b/packages/webapp/src/containers/Purchases/Bills/BillForm/BillFloatingActions.tsx index e326102f0..f0e1fda04 100644 --- a/packages/webapp/src/containers/Purchases/Bills/BillForm/BillFloatingActions.tsx +++ b/packages/webapp/src/containers/Purchases/Bills/BillForm/BillFloatingActions.tsx @@ -36,7 +36,7 @@ export default function BillFloatingActions() { submitForm(); }; - // Handle submit, open and anothe new button click. + // Handle submit, open and another new button click. const handleSubmitOpenAndNewBtnClick = (event) => { setSubmitPayload({ redirect: false, status: true, resetForm: true }); submitForm(); diff --git a/packages/webapp/src/containers/Purchases/CreditNotes/CreditNoteForm/VendorCreditNoteFloatingActions.tsx b/packages/webapp/src/containers/Purchases/CreditNotes/CreditNoteForm/VendorCreditNoteFloatingActions.tsx index db0c3111c..dd56835a7 100644 --- a/packages/webapp/src/containers/Purchases/CreditNotes/CreditNoteForm/VendorCreditNoteFloatingActions.tsx +++ b/packages/webapp/src/containers/Purchases/CreditNotes/CreditNoteForm/VendorCreditNoteFloatingActions.tsx @@ -35,7 +35,7 @@ export default function VendorCreditNoteFloatingActions() { submitForm(); }; - // Handle submit, open and anothe new button click. + // Handle submit, open and another new button click. const handleSubmitOpenAndNewBtnClick = (event) => { setSubmitPayload({ redirect: false, open: true, resetForm: true }); submitForm(); diff --git a/packages/webapp/src/containers/Purchases/PaymentMades/PaymentForm/PaymentMadeEntriesTable.tsx b/packages/webapp/src/containers/Purchases/PaymentMades/PaymentForm/PaymentMadeEntriesTable.tsx index 89f2c786c..cd0228799 100644 --- a/packages/webapp/src/containers/Purchases/PaymentMades/PaymentForm/PaymentMadeEntriesTable.tsx +++ b/packages/webapp/src/containers/Purchases/PaymentMades/PaymentForm/PaymentMadeEntriesTable.tsx @@ -42,7 +42,7 @@ export default function PaymentMadeEntriesTable({ }, [onUpdateData, entries], ); - // Detarmines the right no results message before selecting vendor and aftering + // Detarmines the right no results message before selecting vendor and after // selecting vendor id. const noResultsMessage = vendor_id ? ( { setSubmitPayload({ redirect: false, open: true, resetForm: true }); submitForm(); diff --git a/packages/webapp/src/containers/Vendors/VendorForm/VendorAttahmentTab.tsx b/packages/webapp/src/containers/Vendors/VendorForm/VendorAttachmentTab.tsx similarity index 76% rename from packages/webapp/src/containers/Vendors/VendorForm/VendorAttahmentTab.tsx rename to packages/webapp/src/containers/Vendors/VendorForm/VendorAttachmentTab.tsx index 5d80112fe..7cbb5735f 100644 --- a/packages/webapp/src/containers/Vendors/VendorForm/VendorAttahmentTab.tsx +++ b/packages/webapp/src/containers/Vendors/VendorForm/VendorAttachmentTab.tsx @@ -3,9 +3,9 @@ import React from 'react'; import { Dragzone, FormattedMessage as T } from '@/components'; /** - * Vendor Attahment Tab. + * Vendor Attachment Tab. */ -function VendorAttahmentTab() { +function VendorAttachmentTab() { return (
تعدد المخازن, لن تتمكن من تعطيلها. ومع ذلك ، يمكنك حذف المخزن أو وضع علامة على أنه غير نشط.", "warehouse_activate.dialog_paragraph.line_1": "سيتم اعتبار المنشأة الحالية بمثابة المكتب الرئيسي أو الفرع الرئيسي.", "warehouse_activate.dialog_paragraph.line_2": "سيتم اعتبار جميع معاملات الحسابات بمثابة المكتب الرئيسي. ", diff --git a/packages/webapp/src/lang/en/index.json b/packages/webapp/src/lang/en/index.json index 4e9739217..68cb44364 100644 --- a/packages/webapp/src/lang/en/index.json +++ b/packages/webapp/src/lang/en/index.json @@ -420,7 +420,7 @@ "company_name": "Company Name", "other": "Other", "address": "Address", - "attachement": "Attachement", + "attachment": "Attachment", "country": "Country", "city_town": "City/Town", "state": "State", @@ -1930,7 +1930,7 @@ "branch.alert.mark_primary_message": "The branch has been marked as primary.", "branch.alert.are_you_sure_you_want_to_make": "Are you sure you want to make a primary branch?", "branch.error.could_not_delete_only_branch": "You could not delete the only branch.", - "warehouse_actviate.dialog.label": "Warehouses Activation", + "warehouse_activate.dialog.label": "Warehouses Activation", "warehouse_activate.dialog_success_message": "Multi-branches feature has been activated successfully.", "warehouse_activate.dialog_paragraph": "Once you enable Multiple Warehouses, you will not be able to disable it. However, you can delete the warehouse or mark it inactive.", "warehouse_activate.dialog_paragraph.line_1": "The current organization will be considered as the Head Office or Primary warehouse.",