mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
fix(server): hotbug retireving empty results of inventory valuation and sales by items sheets
This commit is contained in:
@@ -259,6 +259,6 @@ export class InventoryValuationSheet extends FinancialSheet {
|
||||
const items = this.itemsSection();
|
||||
const total = this.totalSection(items);
|
||||
|
||||
return items.length > 0 ? { items, total } : {};
|
||||
return { items, total };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,9 @@ export class InventoryValuationSheetTable extends R.compose(
|
||||
const itemsRows = this.itemsRowsMapper(this.data.items);
|
||||
const totalRow = this.totalRowMapper(this.data.total);
|
||||
|
||||
return [...itemsRows, totalRow];
|
||||
return R.compose(
|
||||
R.when(R.always(R.not(R.isEmpty(itemsRows))), R.append(totalRow))
|
||||
)([...itemsRows]) as ITableRow[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user