diff --git a/src/components/pages/report/sale/tab/HppPerKandangTab.tsx b/src/components/pages/report/sale/tab/HppPerKandangTab.tsx index 5248521f..1748a6c7 100644 --- a/src/components/pages/report/sale/tab/HppPerKandangTab.tsx +++ b/src/components/pages/report/sale/tab/HppPerKandangTab.tsx @@ -747,7 +747,7 @@ const HppPerKandangTab = () => { {row.getVisibleCells().map((cell) => ( {flexRender(cell.column.columnDef.cell, cell.getContext())} @@ -770,61 +770,49 @@ const HppPerKandangTab = () => { ]; if (perWeightRangeSummary.length > 0) { - customRows.push( - - - - - {perWeightRangeSummary.map( - (item: HppPerKandangPerWeightRange, index = 0) => ( - - - - - - - - - - - - - - - - - ) - )} - -
{index + 1}ALL{item.label} - {formatNumber(item.avg_weight_kg)} - - {formatNumber(item.remaining_chicken_birds)} - - {formatNumber(item.remaining_chicken_weight_kg)} - -- - {item.feed_suppliers - ?.map((s: Supplier) => s.alias || s.name) - .join(' | ') || '-'} - - {item.doc_suppliers - ?.map((s: Supplier) => s.alias || s.name) - .join(' | ') || '-'} - - {formatCurrency(item.average_doc_price_rp)} - - {formatCurrency(item.hpp_rp)} - - - {formatCurrency(item.remaining_value_rp)} -
- - + perWeightRangeSummary.forEach( + (item: HppPerKandangPerWeightRange, index = 0) => { + customRows.push( + + {index + 1} + ALL + {item.label} + + {formatNumber(item.avg_weight_kg)} + + + {formatNumber(item.remaining_chicken_birds)} + + + {formatNumber(item.remaining_chicken_weight_kg)} + + - + - + + {item.feed_suppliers + ?.map((s) => s.alias || s.name) + .join(' | ') || '-'} + + + {item.doc_suppliers + ?.map((s) => s.alias || s.name) + .join(' | ') || '-'} + + + {formatCurrency(item.average_doc_price_rp)} + + - + {formatCurrency(item.hpp_rp)} + - + + {formatCurrency(item.remaining_value_rp)} + + + ); + } ); }