@@ -358,7 +358,7 @@ const LotTable: React.FC<LotTableProps> = ({ | |||||
checked={selectedLotRowId === `row_${index}`} | checked={selectedLotRowId === `row_${index}`} | ||||
onChange={() => onLotSelection(`row_${index}`, lot.lotId)} | onChange={() => onLotSelection(`row_${index}`, lot.lotId)} | ||||
// ✅ Allow selection of available AND insufficient_stock lots | // ✅ Allow selection of available AND insufficient_stock lots | ||||
disabled={lot.lotAvailability === 'expired' || lot.lotAvailability === 'status_unavailable'} | |||||
//disabled={lot.lotAvailability === 'expired' || lot.lotAvailability === 'status_unavailable'} | |||||
value={`row_${index}`} | value={`row_${index}`} | ||||
name="lot-selection" | name="lot-selection" | ||||
/> | /> | ||||
@@ -167,7 +167,7 @@ const SearchResultsTable: React.FC<SearchResultsTableProps> = ({ | |||||
color={item.currentStockBalance && item.currentStockBalance > 0 ? "success.main" : "error.main"} | color={item.currentStockBalance && item.currentStockBalance > 0 ? "success.main" : "error.main"} | ||||
sx={{ fontWeight: item.currentStockBalance && item.currentStockBalance > 0 ? 'bold' : 'normal' }} | sx={{ fontWeight: item.currentStockBalance && item.currentStockBalance > 0 ? 'bold' : 'normal' }} | ||||
> | > | ||||
{item.currentStockBalance || 0} | |||||
{item.currentStockBalance?.toLocaleString()||0} | |||||
</Typography> | </Typography> | ||||
</TableCell> | </TableCell> | ||||
@@ -177,6 +177,7 @@ const SearchResultsTable: React.FC<SearchResultsTableProps> = ({ | |||||
{item.uomDesc || "-"} | {item.uomDesc || "-"} | ||||
</Typography> | </Typography> | ||||
</TableCell> | </TableCell> | ||||
<TableCell align="right"> | |||||
{/* Order Quantity */} | {/* Order Quantity */} | ||||
@@ -208,7 +209,7 @@ const SearchResultsTable: React.FC<SearchResultsTableProps> = ({ | |||||
}} | }} | ||||
disabled={isItemInCreated(item.id)} | disabled={isItemInCreated(item.id)} | ||||
/> | /> | ||||
</TableCell> | |||||
{/* Target Date */} | {/* Target Date */} | ||||
<TableCell align="right"> | <TableCell align="right"> | ||||
<Typography variant="body2"> | <Typography variant="body2"> | ||||
@@ -1029,10 +1029,10 @@ const handleQtyBlur = useCallback((itemId: number) => { | |||||
color={stockBalance > 0 ? "success.main" : "error.main"} | color={stockBalance > 0 ? "success.main" : "error.main"} | ||||
sx={{ fontWeight: stockBalance > 0 ? 'bold' : 'normal' }} | sx={{ fontWeight: stockBalance > 0 ? 'bold' : 'normal' }} | ||||
> | > | ||||
{stockBalance} | |||||
{stockBalance?.toLocaleString() } | |||||
</Typography> | </Typography> | ||||
); | |||||
}, | |||||
); | |||||
}, | |||||
}, | }, | ||||
{ | { | ||||
name: "targetDate", | name: "targetDate", | ||||
@@ -1191,7 +1191,7 @@ const handleQtyBlur = useCallback((itemId: number) => { | |||||
textAlign: 'right' // Add right alignment for the value | textAlign: 'right' // Add right alignment for the value | ||||
}} | }} | ||||
> | > | ||||
{stockBalance} | |||||
{stockBalance?.toLocaleString() } | |||||
</Typography> | </Typography> | ||||
</Box> | </Box> | ||||
); | ); | ||||