Fix: Download closing stock report was borked as product was an object not a string.
This commit is contained in:
parent
b1c003a935
commit
d44c5b3e02
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user