fix: broken transactions by vendor report

This commit is contained in:
Ahmed Bouhuolia
2024-02-25 13:20:34 +02:00
parent dd072f8585
commit 6ea870edb2
7 changed files with 47 additions and 25 deletions

View File

@@ -25,9 +25,11 @@ export class TransactionsByVendorMeta {
const formattedFromDate = moment(query.fromDate).format('YYYY/MM/DD');
const formattedDateRange = `From ${formattedFromDate} | To ${formattedToDate}`;
const sheetName = 'Transactions By Vendor';
return {
...commonMeta,
sheetName: 'Transactions By Vendor',
sheetName,
formattedFromDate,
formattedToDate,
formattedDateRange,

View File

@@ -2,6 +2,7 @@ import { Inject, Service } from 'typedi';
import { ITransactionsByVendorsFilter } from '@/interfaces';
import { TableSheetPdf } from '../TableSheetPdf';
import { TransactionsByVendorTableInjectable } from './TransactionsByVendorTableInjectable';
import { HtmlTableCustomCss } from './constants';
@Service()
export class TransactionsByVendorsPdf {
@@ -27,7 +28,8 @@ export class TransactionsByVendorsPdf {
tenantId,
table.table,
table.meta.sheetName,
table.meta.formattedDateRange
table.meta.formattedDateRange,
HtmlTableCustomCss
);
}
}

View File

@@ -0,0 +1,23 @@
export const HtmlTableCustomCss = `
table tr td:not(:first-child) {
border-left: 1px solid #ececec;
}
table tr:last-child td {
border-bottom: 1px solid #ececec;
}
table .cell--credit,
table .cell--debit,
table .column--credit,
table .column--debit,
table .column--running_balance,
table .cell--running_balance{
text-align: right;
}
table tr.row-type--closing-balance td,
table tr.row-type--opening-balance td {
font-weight: 600;
}
table tr.row-type--vendor:not(:first-child) td {
border-top: 1px solid #ddd;
}
`;