Files
bigcapital/packages/webapp/src/containers/FinancialStatements/reducers.tsx
2024-01-19 23:33:15 +02:00

19 lines
307 B
TypeScript

// @ts-nocheck
export const purchasesByItemsReducer = (sheet) => {
const results = [];
if (sheet.items) {
sheet.items.forEach((item) => {
results.push(item);
});
}
if (sheet.total) {
results.push({
row_types: 'total',
...sheet.total,
});
}
return results;
};