Update Report
This commit is contained in:
parent
116f6b8009
commit
4ba5b9def3
@ -369,12 +369,6 @@ const DailyPOSReport = () => {
|
||||
<span className='text-gray-700'>Total Invoice</span>
|
||||
<span className='font-semibold text-gray-800'>{profitLoss?.summary.total_orders ?? 0}</span>
|
||||
</div>
|
||||
<div className='flex justify-between items-center py-2 border-b border-gray-200'>
|
||||
<span className='text-gray-700'>Rata-rata Tagihan Per Invoice </span>
|
||||
<span className='font-semibold text-gray-800'>
|
||||
{formatCurrency(profitLoss?.summary.average_profit ?? 0)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -446,7 +440,6 @@ const DailyPOSReport = () => {
|
||||
<thead>
|
||||
<tr className='text-gray-800 border-b-2 border-gray-300'>
|
||||
<th className='text-left p-3 font-semibold'>Nama</th>
|
||||
<th className='text-center p-3 font-semibold'>Total Produk</th>
|
||||
<th className='text-center p-3 font-semibold'>Qty</th>
|
||||
<th className='text-right p-3 font-semibold'>Pendapatan</th>
|
||||
</tr>
|
||||
@ -455,7 +448,6 @@ const DailyPOSReport = () => {
|
||||
{category?.data?.map((c, index) => (
|
||||
<tr key={index} className={index % 2 === 0 ? 'bg-white' : 'bg-gray-50'}>
|
||||
<td className='p-3 font-medium text-gray-800'>{c.category_name}</td>
|
||||
<td className='p-3 text-center text-gray-700'>{c.product_count}</td>
|
||||
<td className='p-3 text-center text-gray-700'>{c.total_quantity}</td>
|
||||
<td className='p-3 text-right font-semibold' style={{ color: '#36175e' }}>
|
||||
{formatCurrency(c.total_revenue)}
|
||||
@ -466,7 +458,6 @@ const DailyPOSReport = () => {
|
||||
<tfoot>
|
||||
<tr className='text-gray-800 border-t-2 border-gray-300'>
|
||||
<td className='p-3 font-bold'>TOTAL</td>
|
||||
<td className='p-3 text-center font-bold'>{categorySummary?.productCount ?? 0}</td>
|
||||
<td className='p-3 text-center font-bold'>{categorySummary?.totalQuantity ?? 0}</td>
|
||||
<td className='p-3 text-right font-bold'>{formatCurrency(categorySummary?.totalRevenue ?? 0)}</td>
|
||||
</tr>
|
||||
@ -485,19 +476,15 @@ const DailyPOSReport = () => {
|
||||
<div className='overflow-x-auto'>
|
||||
<table className='w-full table-fixed' style={{ minWidth: '100%' }}>
|
||||
<colgroup>
|
||||
<col style={{ width: '40%' }} />
|
||||
<col style={{ width: '15%' }} />
|
||||
<col style={{ width: '15%' }} />
|
||||
<col style={{ width: '15%' }} />
|
||||
<col style={{ width: '15%' }} />
|
||||
<col style={{ width: '50%' }} />
|
||||
<col style={{ width: '20%' }} />
|
||||
<col style={{ width: '30%' }} />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr className='text-gray-800 border-b-2 border-gray-300'>
|
||||
<th className='text-left p-3 font-semibold border-r border-gray-300'>Produk</th>
|
||||
<th className='text-center p-3 font-semibold border-r border-gray-300'>Qty</th>
|
||||
<th className='text-center p-3 font-semibold border-r border-gray-300'>Order</th>
|
||||
<th className='text-right p-3 font-semibold border-r border-gray-300'>Pendapatan</th>
|
||||
<th className='text-right p-3 font-semibold'>Rata Rata</th>
|
||||
<th className='text-right p-3 font-semibold'>Pendapatan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -539,8 +526,6 @@ const DailyPOSReport = () => {
|
||||
{categoryName.toUpperCase()}
|
||||
</td>
|
||||
<td className='p-3 border-r border-gray-300'></td>
|
||||
<td className='p-3 border-r border-gray-300'></td>
|
||||
<td className='p-3 border-r border-gray-300'></td>
|
||||
<td className='p-3'></td>
|
||||
</tr>
|
||||
)
|
||||
@ -563,15 +548,9 @@ const DailyPOSReport = () => {
|
||||
<td className='p-3 text-center text-gray-700 border-r border-gray-200'>
|
||||
{item.quantity_sold}
|
||||
</td>
|
||||
<td className='p-3 text-center text-gray-700 border-r border-gray-200'>
|
||||
{item.order_count ?? 0}
|
||||
</td>
|
||||
<td className='p-3 text-right font-semibold text-gray-800 border-r border-gray-200'>
|
||||
<td className='p-3 text-right font-semibold text-gray-800'>
|
||||
{formatCurrency(item.revenue)}
|
||||
</td>
|
||||
<td className='p-3 text-right font-medium text-gray-800'>
|
||||
{formatCurrency(item.average_price)}
|
||||
</td>
|
||||
</tr>
|
||||
)
|
||||
})
|
||||
@ -581,10 +560,6 @@ const DailyPOSReport = () => {
|
||||
(sum, item) => sum + (item.quantity_sold || 0),
|
||||
0
|
||||
)
|
||||
const categoryTotalOrders = categoryProducts.reduce(
|
||||
(sum, item) => sum + (item.order_count || 0),
|
||||
0
|
||||
)
|
||||
const categoryTotalRevenue = categoryProducts.reduce(
|
||||
(sum, item) => sum + (item.revenue || 0),
|
||||
0
|
||||
@ -602,13 +577,9 @@ const DailyPOSReport = () => {
|
||||
<td className='p-3 text-center font-semibold text-gray-800 border-r border-gray-400'>
|
||||
{categoryTotalQty}
|
||||
</td>
|
||||
<td className='p-3 text-center font-semibold text-gray-800 border-r border-gray-400'>
|
||||
{categoryTotalOrders}
|
||||
</td>
|
||||
<td className='p-3 text-right font-semibold text-gray-800 border-r border-gray-400'>
|
||||
<td className='p-3 text-right font-semibold text-gray-800'>
|
||||
{formatCurrency(categoryTotalRevenue)}
|
||||
</td>
|
||||
<td className='p-3'></td>
|
||||
</tr>
|
||||
)
|
||||
})
|
||||
@ -622,13 +593,9 @@ const DailyPOSReport = () => {
|
||||
<td className='p-3 text-center font-bold border-r border-gray-300'>
|
||||
{productSummary.totalQuantitySold ?? 0}
|
||||
</td>
|
||||
<td className='p-3 text-center font-bold border-r border-gray-300'>
|
||||
{productSummary.totalOrders ?? 0}
|
||||
</td>
|
||||
<td className='p-3 text-right font-bold border-r border-gray-300'>
|
||||
<td className='p-3 text-right font-bold'>
|
||||
{formatCurrency(productSummary.totalRevenue ?? 0)}
|
||||
</td>
|
||||
<td className='p-3'></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
@ -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