public ActionResult SaveOrder(Z10Order xorder, bool?IsOutDepot, bool?IsPay, long?Bank) { EAP.Logic.Z10.Order order = EAP.Logic.Z10.Order.CreateWithSession(); order.Z10Order.CustomerID = xorder.CustomerID; order.Z10Order.DateOrder = xorder.DateOrder; order.Z10Order.DateShip = xorder.DateOrder; order.Z10Order.Currency = xorder.Currency; order.Z10Order.Remark = xorder.Remark; order.Z10Order.FeeShip = xorder.FeeShip; order.Z10Order.FeeShould = xorder.FeeShould; order.Save(_tenant.TenantID.Value, db, null); db.ColAdd <Z01Customer>("ManageHot", xorder.CustomerID ?? 0); bool isout = IsOutDepot ?? false; bool ispay = IsPay ?? false; if (isout) { order.SaleOutDepot(_tenant.TenantID, _user.UserID); } if (ispay) { order.Pay(_tenant.TenantID, _user.UserID, xorder.FeeShould.Value, Bank); } Session.Remove("Z10Order"); return(Content("1")); }
public ActionResult EditSave(long id, Z10Order xorder) { if ((_crud & Zippy.SaaS.Entity.CRUD.Update) != Zippy.SaaS.Entity.CRUD.Update) { return(RedirectToAction("NoPermission", "Error")); } EAP.Logic.Z10.Order.Snap(id, _tenant.TenantID.Value, _user.UserID.Value, db); //制作快照 EAP.Logic.Z10.Order order = EAP.Logic.Z10.Order.CreateWithSession(); order.Z10Order.OrderID = null; order.Z10Order.OriID = id; order.Z10Order.CustomerID = xorder.CustomerID; order.Z10Order.DateOrder = xorder.DateOrder; order.Z10Order.DateShip = xorder.DateShip; order.Z10Order.Currency = xorder.Currency; order.Z10Order.Remark = xorder.Remark; foreach (Z10OrderItem item in order.Items) { item.ItemID = null; } order.Save(_tenant.TenantID.Value, db, id); Session.Remove("Z10Order"); return(Content("1")); }
public ActionResult SaveOrder(Z10Order xorder, bool?IsInDepot, bool?IsPay, long?Bank) { EAP.Logic.Z10.Order order = EAP.Logic.Z10.Order.CreateWithSession(); order.Z10Order.CustomerID = xorder.CustomerID; order.Z10Order.DateOrder = xorder.DateOrder; order.Z10Order.DateShip = xorder.DateOrder; order.Z10Order.Currency = xorder.Currency; order.Z10Order.Remark = xorder.Remark; order.Z10Order.OrderType = (int)EAP.Logic.Z10.OrderTypes.Purchase; order.Z10Order.FeeShip = xorder.FeeShip; order.Z10Order.FeeShould = xorder.FeeShould; order.Save(_tenant.TenantID.Value, db, null); Session.Remove("Z10Order"); bool isin = IsInDepot ?? false; bool ispay = IsPay ?? false; if (isin) { order.StockInDepot(_tenant.TenantID, _user.UserID); } if (ispay) { order.Pay(_tenant.TenantID, _user.UserID, -xorder.FeeShould.Value, Bank); } return(Content("1")); }
public ActionResult doCreate(Z10Order xorder) { EAP.Logic.Z10.Order order = EAP.Logic.Z10.Order.CreateWithSession(); order.Z10Order.DateOrder = xorder.DateOrder; order.Z10Order.Remark = xorder.Remark; order.Z10Order.OrderType = (int)EAP.Logic.Z10.OrderTypes.Transfer; order.Save(_tenant.TenantID.Value, db, null); Session.Remove("Z10Order"); return(Content("1")); }
public ActionResult doReturned(Z10Order xorder) { EAP.Logic.Z10.Order order = EAP.Logic.Z10.Order.CreateWithSession(); order.Z10Order.CustomerID = xorder.CustomerID; order.Z10Order.DateOrder = xorder.DateOrder; order.Z10Order.Currency = xorder.Currency; order.Z10Order.Remark = xorder.Remark; order.Z10Order.OrderType = (int)EAP.Logic.Z10.OrderTypes.PurchaseReturn; order.Save(_tenant.TenantID.Value, db, null); Session.Remove("Z10Order"); return(Content("1")); }
public ActionResult SaveOutDepot(Z10Order xorder) { EAP.Logic.Z10.Order order = EAP.Logic.Z10.Order.CreateWithSession(); order.Z10Order.CustomerID = xorder.CustomerID; order.Z10Order.DateOrder = xorder.DateOrder; order.Z10Order.DateShip = xorder.DateShip; order.Z10Order.Currency = xorder.Currency; order.Z10Order.Remark = xorder.Remark; order.Z10Order.OrderType = (int?)EAP.Logic.Z10.OrderTypes.Sale; order.Z10Order.FeeShip = xorder.FeeShip; order.Z10Order.FeeShould = xorder.FeeShould; order.Save(_tenant.TenantID.Value, db, null); Session.Remove("Z10Order"); return(Content("1")); }
public ActionResult SaveOrder(Z10Order xorder, bool?IsInDepot, bool?IsPay, long?Bank) { EAP.Logic.Z10.Order order = EAP.Logic.Z10.Order.CreateWithSession("Z10InventoryInOrder"); order.Z10Order.CustomerID = xorder.CustomerID; order.Z10Order.DateOrder = xorder.DateOrder; order.Z10Order.DateShip = xorder.DateOrder; order.Z10Order.Currency = xorder.Currency; order.Z10Order.Remark = xorder.Remark; order.Z10Order.OrderType = (int)EAP.Logic.Z10.OrderTypes.InventoryIn; order.Z10Order.FeeShip = xorder.FeeShip; order.Z10Order.FeeShould = xorder.FeeShould; order.Save(_tenant.TenantID.Value, db, null); Session.Remove("Z10InventoryInOrder"); order.StockInDepot(_tenant.TenantID, _user.UserID); return(Content("1")); }
public ActionResult SaveOrder(Z10Order xorder, bool?IsOutDepot) { EAP.Logic.Z10.Order order = EAP.Logic.Z10.Order.CreateWithSession("InventoryOrderOut"); order.Z10Order.CustomerID = xorder.CustomerID; order.Z10Order.Remark = xorder.Remark; order.Save(_tenant.TenantID.Value, db, null); db.ColAdd <Z01Customer>("ManageHot", xorder.CustomerID ?? 0); order.SaleOutDepot(_tenant.TenantID, _user.UserID); //if (ispay) //{ // order.Pay(_tenant.TenantID, _user.UserID, xorder.FeeShould.Value, Bank); //} Session.Remove("InventoryOrderOut"); return(Content("1")); }