fix: cashflow statement localization

This commit is contained in:
Ahmed Bouhuolia
2025-06-06 20:40:56 +02:00
parent 9a685ffe5d
commit 0a57b6e20e
6 changed files with 9 additions and 13 deletions

View File

@@ -21,8 +21,8 @@ export class PublishExpense {
*/
constructor(
private readonly eventPublisher: EventEmitter2,
private readonly uow: UnitOfWork,
private readonly validator: CommandExpenseValidator,
private readonly uow: UnitOfWork,
@Inject(Expense.name)
private readonly expenseModel: TenantModelProxy<typeof Expense>,

View File

@@ -19,7 +19,6 @@ import { VendorBalanceSummaryModule } from './modules/VendorBalanceSummary/Vendo
import { BalanceSheetModule } from './modules/BalanceSheet/BalanceSheet.module';
@Module({
providers: [],
imports: [
BalanceSheetModule,
PurchasesByItemsModule,

View File

@@ -227,12 +227,10 @@ export class CashFlowStatement extends R.pipe(
const accountsTotal = this.getAccountsMetaTotal(accounts);
const total = this.getTotalAmountMeta(accountsTotal);
console.log(sectionSchema.label, 'label');
const node = {
sectionType: ICashFlowStatementSectionType.ACCOUNTS,
id: sectionSchema.id,
label: sectionSchema.label,
label: this.i18n.t(sectionSchema.label),
footerLabel: sectionSchema.footerLabel,
children: accounts,
total,

View File

@@ -240,8 +240,9 @@ export class CashFlowTable {
): ICashFlowStatementSection => {
const label = section.footerLabel
? section.footerLabel
: this.i18n.t('Total {{accountName}}', { accountName: section.label });
: this.i18n.t('financial_sheet.total_row', {
args: { value: section.label },
});
section.children.push({
sectionType: ICashFlowStatementSectionType.TOTAL,
label,

View File

@@ -12,9 +12,7 @@ export class UnitOfWork {
) {}
/**
*
* @param {number} tenantId
* @param {} work
* @param {function} work - The work to be done in the transaction.
* @param {IsolationLevel} isolationLevel
* @returns {}
*/