diff --git a/overlord/src/app/closing-stock/closing-stock.component.ts b/overlord/src/app/closing-stock/closing-stock.component.ts index cefc177b..12cc5e98 100644 --- a/overlord/src/app/closing-stock/closing-stock.component.ts +++ b/overlord/src/app/closing-stock/closing-stock.component.ts @@ -137,7 +137,10 @@ export class ClosingStockComponent implements OnInit { Amount: 'amount', }; - const csvData = new Blob([this.toCsv.toCsv(headers, this.dataSource.data)], { + const d = JSON.parse(JSON.stringify(this.dataSource.data)).map( + (x: ClosingStockItem)=> ({product: x.product.name, group: x.group, quantity: x.quantity, amount: x.amount}) + ); + const csvData = new Blob([this.toCsv.toCsv(headers, d)], { type: 'text/csv;charset=utf-8;', }); const link = document.createElement('a');