mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
fix: Optimize the print style some financial reports
This commit is contained in:
@@ -25,19 +25,18 @@ export class CustomerBalanceSummaryTableInjectable {
|
||||
tenantId: number,
|
||||
filter: ICustomerBalanceSummaryQuery
|
||||
): Promise<ICustomerBalanceSummaryTable> {
|
||||
|
||||
const i18n = this.tenancy.i18n(tenantId);
|
||||
const { data, query, meta } =
|
||||
await this.customerBalanceSummaryService.customerBalanceSummary(
|
||||
tenantId,
|
||||
filter
|
||||
);
|
||||
const tableRows = new CustomerBalanceSummaryTable(data, filter, i18n);
|
||||
const table = new CustomerBalanceSummaryTable(data, filter, i18n);
|
||||
|
||||
return {
|
||||
table: {
|
||||
columns: tableRows.tableColumns(),
|
||||
rows: tableRows.tableRows(),
|
||||
columns: table.tableColumns(),
|
||||
rows: table.tableRows(),
|
||||
},
|
||||
query,
|
||||
meta,
|
||||
|
||||
@@ -52,7 +52,7 @@ export class CustomerBalanceSummaryTable {
|
||||
*/
|
||||
private getCustomerColumnsAccessor = (): IColumnMapperMeta[] => {
|
||||
const columns = [
|
||||
{ key: 'customerName', accessor: 'customerName' },
|
||||
{ key: 'name', accessor: 'customerName' },
|
||||
{ key: 'total', accessor: 'total.formattedAmount' },
|
||||
];
|
||||
return R.compose(
|
||||
@@ -85,7 +85,7 @@ export class CustomerBalanceSummaryTable {
|
||||
*/
|
||||
private getTotalColumnsAccessor = (): IColumnMapperMeta[] => {
|
||||
const columns = [
|
||||
{ key: 'total', value: this.i18n.__('Total') },
|
||||
{ key: 'name', value: this.i18n.__('Total') },
|
||||
{ key: 'total', accessor: 'total.formattedAmount' },
|
||||
];
|
||||
return R.compose(
|
||||
|
||||
@@ -3,4 +3,12 @@ table tr.row-type--total td {
|
||||
font-weight: 600;
|
||||
border-top: 1px solid #bbb;
|
||||
border-bottom: 3px double #333;
|
||||
}`;
|
||||
}
|
||||
table .column--name {
|
||||
width: 65%;
|
||||
}
|
||||
table .column--total,
|
||||
table .cell--total {
|
||||
text-align: right;
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user