mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
fix(server): hotbug retireving empty results of inventory valuation and sales by items sheets
This commit is contained in:
@@ -83,7 +83,9 @@ export class SalesByItemsTable extends R.compose(
|
||||
const itemsRows = this.itemsMap(this.data.items);
|
||||
const totalRow = this.totalMap(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