fix: formatted transaction type

This commit is contained in:
Ahmed Bouhuolia
2025-06-15 15:22:19 +02:00
parent bcae2dae03
commit bbf9ef9bc2
29 changed files with 248 additions and 67 deletions

View File

@@ -38,7 +38,7 @@ export class TableSheetPdf {
// Generate HTML content from the template
const htmlContent = await this.templateInjectable.render(
'modules/financial-sheet',
'financial-sheet',
{
table: { rows, columns },
sheetName,

View File

@@ -1,8 +1,10 @@
import { Injectable } from '@nestjs/common';
import { TableSheetPdf } from '../../common/TableSheetPdf';
import { ICashFlowStatementQuery } from './Cashflow.types';
import { CashflowTableInjectable } from './CashflowTableInjectable';
import { HtmlTableCustomCss } from './constants';
@Injectable()
export class CashflowTablePdfInjectable {
constructor(
private readonly cashflowTable: CashflowTableInjectable,

View File

@@ -49,7 +49,7 @@ export class ProfitLossSheetController {
);
res.send(sheet);
// Retrieves the json format.
} else if (acceptHeader.includes(AcceptType.ApplicationJson)) {
} else if (acceptHeader.includes(AcceptType.ApplicationPdf)) {
const pdfContent = await this.profitLossSheetApp.pdf(query);
res.set({

View File

@@ -7,7 +7,6 @@ import {
Req,
Res,
} from '@nestjs/common';
import { ISalesByItemsReportQuery } from './SalesByItems.types';
import { AcceptType } from '@/constants/accept-type';
import { SalesByItemsApplication } from './SalesByItemsApplication';
import { Response } from 'express';
@@ -21,7 +20,10 @@ export class SalesByItemsController {
@Get()
@ApiResponse({ status: 200, description: 'Sales by items report' })
@ApiOperation({ summary: 'Get sales by items report' })
@ApiOperation({
summary: 'Sales by items report',
description: 'Retrieves the sales by items report.',
})
public async salesByitems(
@Query() filter: SalesByItemsQueryDto,
@Res({ passthrough: true }) res: Response,