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