| | |
| | | |
| | | pickedDetails.AddRange(materielPickedDetails.PickedDetails); |
| | | |
| | | decimal allallocatedQuantity = materielCalc.UnallocatedQuantity; |
| | | decimal allallocatedQuantity = Math.Min(materielCalc.UnallocatedQuantity, materielPickedDetails.PickedDetails.Sum(x => x.OutboundQuantity)); |
| | | materielCalc.UnallocatedQuantity = allallocatedQuantity; |
| | | // æ´æ°åºåºåæç»ï¼å¢å é宿°éï¼ä¸å¢å å·²åºæ°éï¼ |
| | | foreach (var detail in materielCalc.Details) |
| | | { |
| | |
| | | .GroupBy(x => new |
| | | { |
| | | x.MaterielCode, |
| | | x.MaterielName, |
| | | x.BatchNo, |
| | | x.SupplyCode, |
| | | x.WarehouseCode |
| | |
| | | .Select(g => new MaterielOutboundCalculationDTO |
| | | { |
| | | MaterielCode = g.Key.MaterielCode, |
| | | MaterielName = g.Key.MaterielName, |
| | | BatchNo = g.Key.BatchNo, |
| | | SupplyCode = g.Key.SupplyCode, |
| | | WarehouseCode = g.Key.WarehouseCode, |
| | |
| | | Dictionary<int, List<Dt_OutStockLockInfo>> lockStockMap = data.LockStockMap; |
| | | |
| | | // éªè¯æ»å¯ç¨åºåæ¯å¦æ»¡è¶³åºåºéæ± |
| | | if (totalAvailableStock < materielCalc.UnallocatedQuantity) |
| | | { |
| | | throw new Exception($"ç©æ {materielCalc.MaterielCode} å¯ç¨åºå {totalAvailableStock} ä¸è¶³åºåºæ°é {materielCalc.UnallocatedQuantity}"); |
| | | } |
| | | |
| | | //decimal remainingQuantity = Math.Min(totalAvailableStock, materielCalc.UnallocatedQuantity); |
| | | //if (totalAvailableStock < materielCalc.UnallocatedQuantity) |
| | | //{ |
| | | // throw new Exception($"ç©æ {materielCalc.MaterielCode} å¯ç¨åºå {totalAvailableStock} ä¸è¶³åºåºæ°é {materielCalc.UnallocatedQuantity}"); |
| | | //} |
| | | // éåé
æ°é |
| | | decimal remainingQuantity = Math.Min(totalAvailableStock, materielCalc.UnallocatedQuantity); |
| | | |
| | | // éåé
æ°é |
| | | decimal remainingQuantity = materielCalc.UnallocatedQuantity; |
| | | //decimal remainingQuantity = materielCalc.UnallocatedQuantity; |
| | | |
| | | // å·²åé
çæçå表 |
| | | List<string> allocatedPallets = new List<string>(); |