mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
19 lines
307 B
TypeScript
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;
|
|
};
|