order all price should be 2 digit and rupees symbol

This commit is contained in:
Sibunnayak 2024-11-01 19:18:25 +05:30
parent 84411bb6a0
commit e9fe97e261
10 changed files with 24 additions and 24 deletions

View File

@ -444,7 +444,7 @@ const CancelledOrders = () => {
<span>, {formatAMPM(order.createdAt)}</span> <span>, {formatAMPM(order.createdAt)}</span>
</TableCell> </TableCell>
<TableCell>{order.orderItem.length}</TableCell> <TableCell>{order.orderItem.length}</TableCell>
<TableCell>{order.grandTotal.toFixed(2)}</TableCell> <TableCell> {order.grandTotal.toFixed(2)}</TableCell>
<TableCell>{order.status}</TableCell> <TableCell>{order.status}</TableCell>
<TableCell> <TableCell>
<Button <Button

View File

@ -154,7 +154,7 @@ const ProcessingOrders = () => {
</span> </span>
</TableCell> </TableCell>
<TableCell>{invoice.items.length}</TableCell> <TableCell>{invoice.items.length}</TableCell>
<TableCell>{invoice.invoiceAmount}</TableCell> <TableCell> {invoice.invoiceAmount.toFixed(2)}</TableCell>
<TableCell>{invoice.courierStatus}</TableCell> <TableCell>{invoice.courierStatus}</TableCell>
<TableCell> <TableCell>
<Button <Button

View File

@ -154,7 +154,7 @@ const ProcessingOrders = () => {
</span> </span>
</TableCell> </TableCell>
<TableCell>{invoice.items.length}</TableCell> <TableCell>{invoice.items.length}</TableCell>
<TableCell>{invoice.invoiceAmount}</TableCell> <TableCell> {invoice.invoiceAmount.toFixed(2)}</TableCell>
<TableCell>{invoice.courierStatus}</TableCell> <TableCell>{invoice.courierStatus}</TableCell>
<TableCell> <TableCell>
<Button <Button

View File

@ -794,7 +794,7 @@ const NewOrders = () => {
<span>, {formatAMPM(order.createdAt)}</span> <span>, {formatAMPM(order.createdAt)}</span>
</TableCell> </TableCell>
<TableCell>{order.orderItem.length}</TableCell> <TableCell>{order.orderItem.length}</TableCell>
<TableCell>{order.grandTotal.toFixed(2)}</TableCell> <TableCell> {order.grandTotal.toFixed(2)}</TableCell>
<TableCell>{order.status}</TableCell> <TableCell>{order.status}</TableCell>
<TableCell> <TableCell>
<Button <Button

View File

@ -154,7 +154,7 @@ const ProcessingOrders = () => {
</span> </span>
</TableCell> </TableCell>
<TableCell>{invoice.items.length}</TableCell> <TableCell>{invoice.items.length}</TableCell>
<TableCell>{invoice.invoiceAmount}</TableCell> <TableCell> {invoice.invoiceAmount.toFixed(2)}</TableCell>
<TableCell>{invoice.courierStatus}</TableCell> <TableCell>{invoice.courierStatus}</TableCell>
<TableCell> <TableCell>
<Button <Button

View File

@ -352,12 +352,12 @@ const ViewOrders = () => {
{item?.name} {item?.name}
</Typography> </Typography>
</TableCell> </TableCell>
<TableCell align="right">{item.price}</TableCell> <TableCell align="right">{item.price.toFixed(2)}</TableCell>
<TableCell align="center">{item.quantity}</TableCell> <TableCell align="center">{item.quantity}</TableCell>
<TableCell align="right">{subtotal}</TableCell> <TableCell align="right">{subtotal.toFixed(2)}</TableCell>
<TableCell align="right">{item.GST}%</TableCell> <TableCell align="right">{item.GST}%</TableCell>
<TableCell align="right">{gstAmount}</TableCell> <TableCell align="right">{gstAmount.toFixed(2)}</TableCell>
<TableCell align="right">{totalWithGST}</TableCell> <TableCell align="right">{totalWithGST.toFixed(2)}</TableCell>
</TableRow> </TableRow>
); );
})} })}
@ -394,10 +394,10 @@ const ViewOrders = () => {
Total Items: {order?.orderItem.length} Total Items: {order?.orderItem.length}
</Typography> </Typography>
<Typography>Total Subtotal: {order?.subtotal}</Typography> <Typography>Total Subtotal: {order?.subtotal.toFixed(2)}</Typography>
<Typography>Total GST: {order?.gstTotal}</Typography> <Typography>Total GST: {order?.gstTotal.toFixed(2)}</Typography>
<Typography variant="h5" sx={{ marginTop: 2 }}> <Typography variant="h5" sx={{ marginTop: 2 }}>
Grand Total: {order?.grandTotal} Grand Total: {order?.grandTotal.toFixed(2)}
</Typography> </Typography>
</Box> </Box>
</Grid> </Grid>

View File

@ -47,9 +47,9 @@ const InvoiceTable = ({ invoices }) => {
</div> </div>
))} ))}
</TableCell> </TableCell>
<TableCell>{invoice.subtotal}</TableCell> <TableCell>{invoice.subtotal.toFixed(2)}</TableCell>
<TableCell>{invoice.gstTotal}</TableCell> <TableCell>{invoice.gstTotal.toFixed(2)}</TableCell>
<TableCell>{invoice.invoiceAmount}</TableCell> <TableCell>{invoice.invoiceAmount.toFixed(2)}</TableCell>
<TableCell> <TableCell>
<Chip <Chip
label={invoice.courierStatus} label={invoice.courierStatus}

View File

@ -55,14 +55,14 @@ const PendingOrderTable = ({ order }) => {
{item?.name} {item?.name}
</Typography> </Typography>
</TableCell> </TableCell>
<TableCell align="center">{item.price}</TableCell> <TableCell align="center">{item.price.toFixed(2)}</TableCell>
<TableCell align="center"> <TableCell align="center">
{item.remainingQuantity} {item.remainingQuantity}
</TableCell> </TableCell>
<TableCell align="center">{subtotal}</TableCell> <TableCell align="center">{subtotal.toFixed(2)}</TableCell>
<TableCell align="center">{item.GST}%</TableCell> <TableCell align="center">{item.GST.toFixed(2)}%</TableCell>
<TableCell align="center">{gstAmount}</TableCell> <TableCell align="center">{gstAmount.toFixed(2)}</TableCell>
<TableCell align="center">{totalWithGST}</TableCell> <TableCell align="center">{totalWithGST.toFixed(2)}</TableCell>
</TableRow> </TableRow>
); );
} }

View File

@ -146,7 +146,7 @@ const PendingOrders = () => {
<span>, {formatAMPM(order.createdAt)}</span> <span>, {formatAMPM(order.createdAt)}</span>
</TableCell> </TableCell>
<TableCell>{order.orderItem.length}</TableCell> <TableCell>{order.orderItem.length}</TableCell>
<TableCell>{order.grandTotal.toFixed(2)}</TableCell> <TableCell> {order.grandTotal.toFixed(2)}</TableCell>
<TableCell>{order.status}</TableCell> <TableCell>{order.status}</TableCell>
<TableCell> <TableCell>
<Button <Button

View File

@ -199,9 +199,9 @@ const ViewInvoices = () => {
</div> </div>
))} ))}
</TableCell> </TableCell>
<TableCell>{invoice.subtotal}</TableCell> <TableCell>{invoice.subtotal.toFixed(2)}</TableCell>
<TableCell>{invoice.gstTotal}</TableCell> <TableCell>{invoice.gstTotal.toFixed(2)}</TableCell>
<TableCell>{invoice.invoiceAmount}</TableCell> <TableCell>{invoice.invoiceAmount.toFixed(2)}</TableCell>
<TableCell> <TableCell>
<Chip <Chip
label={invoice.courierStatus} label={invoice.courierStatus}