update daily report
This commit is contained in:
parent
3cf7799a91
commit
de32d86e94
@ -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,
|
||||
|
||||
@ -173,7 +173,7 @@ const VerticalMenu = ({ dictionary, scrollMenu }: Props) => {
|
||||
</MenuItem> */}
|
||||
{/* <MenuItem href={`/${locale}/apps/marketing/voucher`}>{dictionary['navigation'].voucher}</MenuItem> */}
|
||||
<MenuItem href={`/${locale}/apps/marketing/tier`}>{dictionary['navigation'].tiers_text}</MenuItem>
|
||||
<MenuItem href={`/${locale}/apps/marketing/discount`}>{dictionary['navigation'].discount}</MenuItem>
|
||||
{/* <MenuItem href={`/${locale}/apps/marketing/discount`}>{dictionary['navigation'].discount}</MenuItem> */}
|
||||
</SubMenu>
|
||||
<SubMenu label={dictionary['navigation'].inventory} icon={<i className='tabler-salad' />}>
|
||||
<SubMenu label={dictionary['navigation'].products}>
|
||||
|
||||
@ -6,8 +6,8 @@ const getToken = () => {
|
||||
}
|
||||
|
||||
export const api = axios.create({
|
||||
// baseURL: 'https://api-pos.apskel.id/api/v1',
|
||||
baseURL: 'http://127.0.0.1:4000/api/v1',
|
||||
baseURL: 'https://api-pos.apskel.id/api/v1',
|
||||
// baseURL: 'http://127.0.0.1:4000/api/v1',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user