From 495b1b2869964715be76a4830e675ee41bf785da Mon Sep 17 00:00:00 2001 From: rstubryan Date: Thu, 19 Feb 2026 12:18:27 +0700 Subject: [PATCH] refactor(FE):Add HPP Amount column to daily marketing export --- .../export/DailyMarketingExportXLSX.tsx | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/components/pages/report/marketing/export/DailyMarketingExportXLSX.tsx b/src/components/pages/report/marketing/export/DailyMarketingExportXLSX.tsx index 8c368fbf..d43213f1 100644 --- a/src/components/pages/report/marketing/export/DailyMarketingExportXLSX.tsx +++ b/src/components/pages/report/marketing/export/DailyMarketingExportXLSX.tsx @@ -42,6 +42,7 @@ export const generateDailyMarketingExcel = async ( { header: 'Bobot Total (Kg)', key: 'totalWeight', width: 18 }, { header: 'Harga Jual (Rp)', key: 'salesPrice', width: 18 }, { header: 'HPP (Rp)', key: 'hppPrice', width: 15 }, + { header: 'HPP Amount (Rp)', key: 'hppAmount', width: 20 }, { header: 'Total (Rp)', key: 'salesAmount', width: 20 }, ]; @@ -67,6 +68,7 @@ export const generateDailyMarketingExcel = async ( totalWeight: formatNumber(item.total_weight_kg || 0), salesPrice: formatCurrency(item.sales_price_per_kg || 0), hppPrice: formatCurrency(item.hpp_price_per_kg || 0), + hppAmount: formatCurrency(item.hpp_amount || 0), salesAmount: formatCurrency(item.sales_amount || 0), }); }); @@ -75,21 +77,22 @@ export const generateDailyMarketingExcel = async ( if (params.summaryTotal) { worksheet.addRow({ no: 'TOTAL', - soDate: 'ALL', - realizationDate: '-', - aging: '-', - warehouse: '-', - customer: '-', - doNumber: '-', - sales: '-', - vehicleNumber: '-', - marketingType: '-', - product: '-', + soDate: '', + realizationDate: '', + aging: '', + warehouse: '', + customer: '', + doNumber: '', + sales: '', + vehicleNumber: '', + marketingType: '', + product: '', qty: formatNumber(params.summaryTotal.total_qty || 0), averageWeight: formatNumber(params.summaryTotal.average_weight_kg || 0), totalWeight: formatNumber(params.summaryTotal.total_weight_kg || 0), - salesPrice: formatNumber(params.summaryTotal.average_sales_price || 0), + salesPrice: formatCurrency(params.summaryTotal.average_sales_price || 0), hppPrice: formatCurrency(params.summaryTotal.total_hpp_price_per_kg || 0), + hppAmount: formatCurrency(params.summaryTotal.total_hpp_amount || 0), salesAmount: formatCurrency(params.summaryTotal.total_sales_amount || 0), }); }