| | |
| | | { |
| | | proStockInfoDetail.StockPcsQty -= item.StockPcsQty; |
| | | proStockInfoDetail.SETQty -= item.SETQty; |
| | | proStockInfoDetail.OutboundQuantity = 0; |
| | | upProStockDetails.Add(proStockInfoDetail); |
| | | } |
| | | |
| | |
| | | { |
| | | Dt_ProStockInfo stockInfo = stockInfos[index]; |
| | | float useableStockQuantity = stockInfo.proStockInfoDetails |
| | | .Where(x => x.SaleOrder == outOrderDetail.SaleOrder && x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer |
| | | && (isCanLot ? isCanLot : x.LotNumber == outOrderDetail.PLot) |
| | | .Where(x => x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer |
| | | && (isCanLot ? isCanLot : x.BagNo == outOrderDetail.PLot) |
| | | && (isCanDate ? isCanDate : x.DateCode == outOrderDetail.DateCode)) |
| | | .Sum(x => x.StockPcsQty - x.OutboundQuantity); |
| | | if (useableStockQuantity < needQuantity) |
| | |
| | | { |
| | | stockInfo.proStockInfoDetails.ForEach(x => |
| | | { |
| | | if ((x.StockPcsQty > x.OutboundQuantity) && x.SaleOrder == outOrderDetail.SaleOrder |
| | | if ((x.StockPcsQty > x.OutboundQuantity) |
| | | && x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer |
| | | && (isCanLot ? isCanLot : x.LotNumber == outOrderDetail.PLot) |
| | | && (isCanLot ? isCanLot : x.BagNo == outOrderDetail.PLot) |
| | | && (isCanDate ? isCanDate : x.DateCode == outOrderDetail.DateCode)) |
| | | { |
| | | if (x.StockPcsQty - x.OutboundQuantity >= needQuantity) |
| | |
| | | { |
| | | Dt_ProStockInfo stockInfo = stockInfos[i]; |
| | | float useableStockQuantity = stockInfo.proStockInfoDetails |
| | | .Where(x => x.SaleOrder == outOrderDetail.SaleOrder && x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer |
| | | && (isCanLot ? isCanLot : x.LotNumber == outOrderDetail.PLot) |
| | | .Where(x => x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer |
| | | && (isCanLot ? isCanLot : x.BagNo == outOrderDetail.PLot) |
| | | && (isCanDate ? isCanDate : x.DateCode == outOrderDetail.DateCode)) |
| | | .Sum(x => x.StockPcsQty - x.OutboundQuantity); |
| | | if (useableStockQuantity < needQuantity) |
| | |
| | | { |
| | | stockInfo.proStockInfoDetails.ForEach(x => |
| | | { |
| | | if (x.StockPcsQty > x.OutboundQuantity && x.SaleOrder == outOrderDetail.SaleOrder |
| | | && x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer |
| | | && (isCanLot ? isCanLot : x.LotNumber == outOrderDetail.PLot) |
| | | if (x.StockPcsQty > x.OutboundQuantity && x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer |
| | | && (isCanLot ? isCanLot : x.BagNo == outOrderDetail.PLot) |
| | | && (isCanDate ? isCanDate : x.DateCode == outOrderDetail.DateCode)) |
| | | { |
| | | if (x.StockPcsQty - x.OutboundQuantity >= needQuantity) |