| | |
| | | inboundOrderDetail.BarcodeUnit = item.BarcodeUnit; |
| | | inboundOrderDetail.BarcodeQty = item.BarcodeQty; |
| | | inboundOrderDetail.OrderQuantity = item.OrderQuantity; |
| | | |
| | | var purchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync(item.MaterielCode, item.BarcodeQty); |
| | | inboundOrderDetail.Unit = purchaseToStockResult.Unit; |
| | | inboundOrderDetail.OrderQuantity = purchaseToStockResult.Quantity; |
| | | |
| | | updateInboundOrderDetails.Add(inboundOrderDetail); |
| | | detailIds.Add(inboundOrderDetail.Id); |
| | |
| | | _unitOfWorkManage.BeginTran(); |
| | | foreach (var item in deletePurchaseOrderDetails) |
| | | { |
| | | _inboundOrderDetailRepository.DeleteAndMoveIntoHty(item, OperateTypeEnum.鑷姩鍒犻櫎); |
| | | _inboundOrderDetailRepository.DeleteData(item); |
| | | //_inboundOrderDetailRepository.DeleteAndMoveIntoHty(item, OperateTypeEnum.鑷姩鍒犻櫎); |
| | | } |
| | | |
| | | _inboundOrderDetailRepository.UpdateData(updateInboundOrderDetails); |
| | |
| | | } |
| | | //Db.DeleteNav(inboundOrder).Include(x => x.Details).ExecuteCommand(); |
| | | _unitOfWorkManage.BeginTran(); |
| | | BaseDal.DeleteAndMoveIntoHty(inboundOrder, OperateTypeEnum.鑷姩鍒犻櫎); |
| | | //BaseDal.DeleteAndMoveIntoHty(inboundOrder, OperateTypeEnum.鑷姩鍒犻櫎); |
| | | foreach (var item in inboundOrder.Details) |
| | | { |
| | | _inboundOrderDetailRepository.DeleteAndMoveIntoHty(item, OperateTypeEnum.鑷姩鍒犻櫎); |
| | | _inboundOrderDetailRepository.DeleteData(item); |
| | | //_inboundOrderDetailRepository.DeleteAndMoveIntoHty(item, OperateTypeEnum.鑷姩鍒犻櫎); |
| | | } |
| | | BaseDal.DeleteData(inboundOrder); |
| | | _unitOfWorkManage.CommitTran(); |
| | | } |
| | | return WebResponseContent.Instance.OK(); |
| | |
| | | SupplyCode = item.SupplyCode, |
| | | WarehouseCode = materielGroupDTO.WarehouseType, |
| | | StockQuantity = item.OrderQuantity, |
| | | BarcodeQty=item.BarcodeQty, |
| | | BarcodeUnit=item.BarcodeUnit, |
| | | FactoryArea= inboundOrder.FactoryArea, |
| | | Status = 0, |
| | | OrderNo = inboundOrder.InboundOrderNo, |
| | | BusinessType = inboundOrder.BusinessType, |
| | | ProductionDate = DateTime.Now.ToString("yyyy-mm-dd HH:mm:ss") |
| | | |
| | | }); |
| | | |
| | | item.ReceiptQuantity = item.BarcodeQty; |
| | |
| | | { |
| | | stockInfo.PalletType = PalletTypeEnum.Empty.ObjToInt(); |
| | | stockInfo.StockStatus = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(); |
| | | stockInfo.LocationType = materielGroupDTO.WarehouseCode.ObjToInt(); |
| | | } |
| | | |
| | | _unitOfWorkManage.BeginTran(); |