Compare commits

...

4 Commits

Author SHA1 Message Date
Ahmed Bouhuolia
2cf75e0136 hotfix: systax error 2024-02-25 20:28:16 +02:00
Ahmed Bouhuolia
5a8c394ad7 Merge pull request #370 from bigcapitalhq/big-145-optimize-the-print-style-some-financial-reports
fix: Optimize the print style some financial reports
2024-02-25 17:41:17 +02:00
Ahmed Bouhuolia
71742c3480 fix: Optimize the print style some financial reports 2024-02-25 17:40:33 +02:00
Ahmed Bouhuolia
b340776278 Merge pull request #369 from bigcapitalhq/big-144-fix-transactions-by-vendors-broken
fix: broken transactions by vendor report
2024-02-25 13:21:39 +02:00
11 changed files with 57 additions and 16 deletions

View File

@@ -21,4 +21,5 @@ block content
each row in table.rows each row in table.rows
tr(class=row.classNames) tr(class=row.classNames)
each cell in row.cells each cell in row.cells
td(class='cell--' + cell.key)!= cell.value td(class='cell--' + cell.key)
span!= cell.value

View File

@@ -56,7 +56,7 @@ export default abstract class AgingSummaryTable extends R.compose(
node: IAgingSummaryContact | IAgingSummaryTotal node: IAgingSummaryContact | IAgingSummaryTotal
): ITableColumnAccessor[] => { ): ITableColumnAccessor[] => {
return node.aging.map((aging, index) => ({ return node.aging.map((aging, index) => ({
key: 'aging', key: 'aging_period',
accessor: `aging[${index}].total.formattedAmount`, accessor: `aging[${index}].total.formattedAmount`,
})); }));
}; };

View File

@@ -5,8 +5,17 @@ export enum AgingSummaryRowType {
export const HtmlTableCss = ` export const HtmlTableCss = `
table tr.row-type--total td{ table tr.row-type--total td{
font-weight: 500; font-weight: 600;
border-top: 1px solid #bbb; border-top: 1px solid #bbb;
border-bottom: 3px double #333; border-bottom: 3px double #333;
} }
table .column--current,
table .column--aging_period,
table .column--total,
table .cell--current,
table .cell--aging_period,
table .cell--total {
text-align: right;
}
`; `;

View File

@@ -25,19 +25,18 @@ export class CustomerBalanceSummaryTableInjectable {
tenantId: number, tenantId: number,
filter: ICustomerBalanceSummaryQuery filter: ICustomerBalanceSummaryQuery
): Promise<ICustomerBalanceSummaryTable> { ): Promise<ICustomerBalanceSummaryTable> {
const i18n = this.tenancy.i18n(tenantId); const i18n = this.tenancy.i18n(tenantId);
const { data, query, meta } = const { data, query, meta } =
await this.customerBalanceSummaryService.customerBalanceSummary( await this.customerBalanceSummaryService.customerBalanceSummary(
tenantId, tenantId,
filter filter
); );
const tableRows = new CustomerBalanceSummaryTable(data, filter, i18n); const table = new CustomerBalanceSummaryTable(data, filter, i18n);
return { return {
table: { table: {
columns: tableRows.tableColumns(), columns: table.tableColumns(),
rows: tableRows.tableRows(), rows: table.tableRows(),
}, },
query, query,
meta, meta,

View File

@@ -52,7 +52,7 @@ export class CustomerBalanceSummaryTable {
*/ */
private getCustomerColumnsAccessor = (): IColumnMapperMeta[] => { private getCustomerColumnsAccessor = (): IColumnMapperMeta[] => {
const columns = [ const columns = [
{ key: 'customerName', accessor: 'customerName' }, { key: 'name', accessor: 'customerName' },
{ key: 'total', accessor: 'total.formattedAmount' }, { key: 'total', accessor: 'total.formattedAmount' },
]; ];
return R.compose( return R.compose(
@@ -85,7 +85,7 @@ export class CustomerBalanceSummaryTable {
*/ */
private getTotalColumnsAccessor = (): IColumnMapperMeta[] => { private getTotalColumnsAccessor = (): IColumnMapperMeta[] => {
const columns = [ const columns = [
{ key: 'total', value: this.i18n.__('Total') }, { key: 'name', value: this.i18n.__('Total') },
{ key: 'total', accessor: 'total.formattedAmount' }, { key: 'total', accessor: 'total.formattedAmount' },
]; ];
return R.compose( return R.compose(

View File

@@ -3,4 +3,12 @@ table tr.row-type--total td {
font-weight: 600; font-weight: 600;
border-top: 1px solid #bbb; border-top: 1px solid #bbb;
border-bottom: 3px double #333; border-bottom: 3px double #333;
}`; }
table .column--name {
width: 65%;
}
table .column--total,
table .cell--total {
text-align: right;
}
`;

View File

@@ -10,4 +10,20 @@ table tr.row-type--closing-balance td{
table tr.row-type--closing-balance td { table tr.row-type--closing-balance td {
border-bottom: 1px solid #ececec; border-bottom: 1px solid #ececec;
} }
table .column--debit,
table .column--credit,
table .column--amount,
table .column--running_balance,
table .cell--debit,
table .cell--credit,
table .cell--amount,
table .cell--running_balance{
text-align: right;
}
table tr.row-type--account .cell--date span,
table tr.row-type--opening-balance .cell--account_name span,
table tr.row-type--closing-balance .cell--account_name span{
white-space: nowrap;
}
`; `;

View File

@@ -75,6 +75,6 @@ export class SalesTaxLiabilitySummaryApplication {
tenantId: number, tenantId: number,
query: SalesTaxLiabilitySummaryQuery query: SalesTaxLiabilitySummaryQuery
): Promise<Buffer> { ): Promise<Buffer> {
return this.salesTaxLiabiltiyPdf.pdf(tenantId, query): return this.salesTaxLiabiltiyPdf.pdf(tenantId, query);
} }
} }

View File

@@ -6,7 +6,7 @@ export enum IROW_TYPE {
export const HtmlTableCustomCss = ` export const HtmlTableCustomCss = `
table tr.row-type--total td{ table tr.row-type--total td{
border-top: 1px solid #bbb; border-top: 1px solid #bbb;
font-weight: 500; font-weight: 600;
border-bottom: 3px double #000; border-bottom: 3px double #000;
} }

View File

@@ -54,7 +54,7 @@ export class VendorBalanceSummaryTable {
*/ */
private getVendorColumnsAccessor = (): IColumnMapperMeta[] => { private getVendorColumnsAccessor = (): IColumnMapperMeta[] => {
const columns = [ const columns = [
{ key: 'vendorName', accessor: 'vendorName' }, { key: 'name', accessor: 'vendorName' },
{ key: 'total', accessor: 'total.formattedAmount' }, { key: 'total', accessor: 'total.formattedAmount' },
]; ];
return R.compose( return R.compose(
@@ -87,7 +87,7 @@ export class VendorBalanceSummaryTable {
*/ */
private getTotalColumnsAccessor = (): IColumnMapperMeta[] => { private getTotalColumnsAccessor = (): IColumnMapperMeta[] => {
const columns = [ const columns = [
{ key: 'total', value: this.i18n.__('Total') }, { key: 'name', value: this.i18n.__('Total') },
{ key: 'total', accessor: 'total.formattedAmount' }, { key: 'total', accessor: 'total.formattedAmount' },
]; ];
return R.compose( return R.compose(

View File

@@ -3,4 +3,12 @@ table tr.row-type--total td {
font-weight: 600; font-weight: 600;
border-top: 1px solid #bbb; border-top: 1px solid #bbb;
border-bottom: 3px double #333; border-bottom: 3px double #333;
}`; }
table .column--name {
width: 65%;
}
table .column--total,
table .cell--total {
text-align: right;
}
`;