н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs
@@ -206,7 +206,7 @@
                        entity = new Dt_InventoryInfo
                        {
                            PalletCode = detail.orderDetails?.FirstOrDefault()?.palletCode ?? "",
                            WarehouseId = 1,  // é»˜è®¤åº“房编号
                            WarehouseCode = 1.ToString(),  // é»˜è®¤åº“房编号
                            LocationCode = "",
                            StockStatus = 1,   // ç«‹åº“固定为 1
                            MaterielCode = detail.productCode ?? detail.productName,
@@ -250,22 +250,22 @@
                    switch (request.orderType)
                    {
                        case "1": // å…¥åº“
                            entity.StockQuantity += (float)orderQty;
                            entity.StockQuantity += orderQty;
                            entity.InDate = DateTime.Now;
                            entity.Remark = "入库单回传";
                            batch.StockQuantity += (float)orderQty;
                            batch.StockQuantity += orderQty;
                            batch.Remark = "入库单回传";
                            break;
                        case "2": // å‡ºåº“
                            entity.OutboundQuantity += (float)orderQty;
                            entity.StockQuantity -= (float)orderQty;
                            entity.OutboundQuantity += orderQty;
                            entity.StockQuantity -= orderQty;
                            if (entity.StockQuantity < 0) entity.StockQuantity = 0;
                            entity.Remark = "出库单回传";
                            batch.OutboundQuantity += (float)orderQty;
                            batch.StockQuantity -= (float)orderQty;
                            batch.OutboundQuantity += orderQty;
                            batch.StockQuantity -= orderQty;
                            if (batch.StockQuantity < 0) batch.StockQuantity = 0;
                            batch.Remark = "出库单回传";
                            break;
@@ -278,13 +278,13 @@
                                    decimal diff = Convert.ToDecimal(stock.differenceQuantity);
                                    if (stock.IsProfit == "1") // ç›˜ç›ˆ
                                    {
                                        entity.SupplyQuantity += (float)Math.Abs(diff);
                                        batch.SupplyQuantity += (float)Math.Abs(diff);
                                        entity.SupplyQuantity += Math.Abs(diff);
                                        batch.SupplyQuantity += Math.Abs(diff);
                                    }
                                    else // ç›˜äº
                                    {
                                        entity.SupplyQuantity -= (float)Math.Abs(diff);
                                        batch.SupplyQuantity -= (float)Math.Abs(diff);
                                        entity.SupplyQuantity -= Math.Abs(diff);
                                        batch.SupplyQuantity -= Math.Abs(diff);
                                        if (entity.SupplyQuantity < 0) entity.SupplyQuantity = 0;
                                        if (batch.SupplyQuantity < 0) batch.SupplyQuantity = 0;
                                    }