update daily report
This commit is contained in:
@@ -423,6 +423,7 @@ const DailyPOSReport = () => {
|
||||
|
||||
currentY = (pdf as any).lastAutoTable.finalY + 20
|
||||
|
||||
// Category Summary - DENGAN BORDER HITAM
|
||||
// Category Summary - DENGAN BORDER HITAM
|
||||
pdf.setFontSize(PDF_FONT_SIZES.heading)
|
||||
pdf.text('Ringkasan Kategori', 14, currentY)
|
||||
@@ -439,6 +440,9 @@ const DailyPOSReport = () => {
|
||||
['TOTAL', String(categorySummary?.totalQuantity ?? 0), formatCurrency(categorySummary?.totalRevenue ?? 0)]
|
||||
],
|
||||
theme: 'grid',
|
||||
// TAMBAHKAN INI: paksa semua row di satu page, jangan split
|
||||
showFoot: 'lastPage', // footer cuma muncul di halaman terakhir
|
||||
tableWidth: 'auto',
|
||||
styles: {
|
||||
fontSize: PDF_FONT_SIZES.tableContent,
|
||||
cellPadding: PDF_SPACING.cellPadding,
|
||||
@@ -480,6 +484,8 @@ const DailyPOSReport = () => {
|
||||
margin: { left: 14, right: 14 }
|
||||
})
|
||||
|
||||
currentY = (pdf as any).lastAutoTable.finalY + 20
|
||||
|
||||
// Group products by category
|
||||
const groupedProducts =
|
||||
products?.data?.reduce(
|
||||
@@ -544,6 +550,7 @@ const DailyPOSReport = () => {
|
||||
head: [['Produk', 'Qty', 'Pendapatan']],
|
||||
body: productBody,
|
||||
foot: [[`Subtotal ${categoryName}`, String(categoryTotalQty), formatCurrency(categoryTotalRevenue)]],
|
||||
showFoot: 'lastPage', // ← TAMBAHKAN INI: subtotal cuma muncul di akhir kategori
|
||||
theme: 'grid',
|
||||
styles: {
|
||||
fontSize: PDF_FONT_SIZES.tableContent,
|
||||
|
||||
Reference in New Issue
Block a user