This commit is contained in:
joshikannan
2024-04-26 18:38:20 +05:30
parent efc498667f
commit 8f54179ba5

View File

@@ -312,61 +312,46 @@ const InvoicePreview = () => {
<TableHead> <TableHead>
<TableRow> <TableRow>
<TableCell>S.No</TableCell> <TableCell>S.No</TableCell>
<TableCell sx={{ width: '150px' }}>Date</TableCell> <TableCell>Particulars</TableCell>
<TableCell sx={{ width: '150px' }}>Order Id</TableCell> <TableCell>Unit</TableCell>
<TableCell>Pickup</TableCell> <TableCell>Quantity</TableCell>
<TableCell>Drop</TableCell> <TableCell align="right">Rate</TableCell>
{/* <TableCell>Customer</TableCell> {/* {selected && selected.pricingtypeid === 73 && ( */}
<TableCell>Contact no</TableCell> <TableCell>Other Charges</TableCell>
<TableCell>KMS</TableCell> */} {/* )} */}
<TableCell align="right">Amount</TableCell> <TableCell align="right">Amount</TableCell>
</TableRow> </TableRow>
</TableHead> </TableHead>
{selected.tenantsalesdetails && ( {selected.tenantsalesdetails && (
<TableBody> <TableBody>
{selected.tenantsalesdetails.map((item, index) => ( <TableRow>
<TableRow key={index}> <TableCell>1</TableCell>
<TableCell>{index + 1}</TableCell> <TableCell>
<TableCell> <Typography>
<Stack direction="column"> {`Invoice from ${dayjs(selected.tenantsalesdetails[0].fromdate).format('DD-MM-YYYY')} to ${dayjs(
<Typography variant="caption">{dayjs(item.orderdate).format('DD-MM-YYYY')}</Typography> selected.tenantsalesdetails[0].todate
).format('DD-MM-YYYY')}`}
</Typography>
</TableCell>
<TableCell>
<Typography>{selected.tenantsalesdetails[0].pricingtype}</Typography>
</TableCell>
<Typography variant="caption" color="secondary"> <TableCell>
{dayjs(item.orderdate).format('hh:mm a')} <Typography>{`${selected.tenantsalesdetails[0].quantity}km`}</Typography>
</Typography> </TableCell>
</Stack> <TableCell>
</TableCell> <Typography align="right">{`${selected.tenantsalesdetails[0].baserate.toFixed(2)}`}</Typography>
<TableCell> </TableCell>
{' '} {/* {selected.tenantsalesdetails[0].pricingtypeid == 73 && ( */}
<Typography variant="caption">{item.orderid} </Typography> <TableCell align="center">
</TableCell> <Typography>{`${selected.tenantsalesdetails[0].othercharges}.00`}</Typography>
</TableCell>
<TableCell> {/* )} */}
{' '} <TableCell align="right">
<Typography variant="caption">{item.pickup} </Typography> <Typography>{`${selected.tenantsalesdetails[0].amount}.00`}</Typography>
</TableCell> </TableCell>
<TableCell> </TableRow>
<Typography variant="caption">{item.drop} </Typography>
</TableCell>
<TableCell align="right">
<Typography variant="caption">{formatNumberToRupees(item.totalamount)}</Typography>
</TableCell>
{/* <TableCell>
<Typography variant="caption">
{item.actualkms == "" || 0
? parseInt(item.kms).toFixed(1)
: parseInt(item.actualkms).toFixed(1)}
</Typography>
</TableCell> */}
{/* <TableCell>
<Typography variant="caption">
{item.deliveryamt == "" || 0
? `₹ ${item.deliverycharges}.00`
: `₹ ${item.deliveryamt}.00`}
</Typography>
</TableCell> */}
</TableRow>
))}
</TableBody> </TableBody>
)} )}
</Table> </Table>