; ; ShowSearchBox("BillSearch","HAVEDEPOT","tbNo",tbNo.CValue); UpdateForm(false,""); UpdateForm(false,""); UpdateForm(false,""); UpdateForm(false,""); UpdateForm(false,""); UpdateForm(false,""); UpdateForm(false,""); if (#PurchaseInDepotBill.Amount_PurchaseInDepotBill == 0 || SumOfCol("#PurchaseInDepotBillProduct.Cost_PurchaseInDepotBillProduct") == 0) { MessageBox("『金额总计/采购金额』数值有误,请确认货款、费用及产品采购单价是否已录入!",@Title); return; } ; ; ; ; ; ChangeMode("Search"); if (#PurchaseInDepotBill.Amount_PurchaseInDepotBill == 0 || SumOfCol("#PurchaseInDepotBillProduct.Cost_PurchaseInDepotBillProduct") == 0) { MessageBox("『金额总计/采购金额』数值有误,请确认货款、费用及产品采购单价是否已录入!",@Title); return; } if (MessageBox("该操作将更新库存成本单价,其后的入库业务都将以此成本核算。确定要提交数据吗?",@Title,MB_YESNO)==DialogResult("NO")) { return; } ChangeMode("Modify"); ; PrintReport(); ; ; ; ; ; ; #PurchaseInDepotBillProduct.Money = #PurchaseInDepotBillProduct.Quantity_PurchaseInDepotBillProduct * #PurchaseInDepotBillProduct.Cost_PurchaseInDepotBillProduct;
Empty(); NewInstance(); tbNo.ReadOnly = false; tbOutDepotBillNo.ReadOnly = true; cbCurrency.Enabled = false; txtMoney.ReadOnly = true; txttax.ReadOnly = true; txtCustom.ReadOnly = true; txtAgent.ReadOnly = true; txtCarriage.ReadOnly = true; txtHandling.ReadOnly = true; txtOthers.ReadOnly = true; toolBar.EnableSubmit = false; toolBar.EnableModify=false; dgProduct.ReadOnly = true; #PurchaseInDepotBill.AssessDate_PurchaseInDepotBill = DBNull(); #PurchaseInDepotBill.CostingDate_PurchaseInDepotBill = DBNull(); UpdateForm(true,""); btnCostCounting.Enabled = false; tbNo.Focus(); @Status = 0; ; tbNo.ReadOnly = true; tbOutDepotBillNo.ReadOnly = true; cbCurrency.Enabled = false; txtMoney.ReadOnly = true; txttax.ReadOnly = true; txtCustom.ReadOnly = true; txtAgent.ReadOnly = true; txtCarriage.ReadOnly = true; txtHandling.ReadOnly = true; txtOthers.ReadOnly = true; toolBar.EnableSubmit = false; toolBar.EnableModify=true; dgProduct.ReadOnly = true; UpdateForm(true,""); btnCostCounting.Enabled = false; @Status = 2; tbNo.ReadOnly = true; tbOutDepotBillNo.ReadOnly = false; cbCurrency.Enabled = false; txtMoney.ReadOnly = false; txttax.ReadOnly = false; txtCustom.ReadOnly = false; txtAgent.ReadOnly = false; txtCarriage.ReadOnly = false; txtHandling.ReadOnly = false; txtOthers.ReadOnly = false; toolBar.EnableSubmit = true; toolBar.EnableModify=false; dgProduct.ReadOnly = false; #PurchaseInDepotBill.Currency_PurchaseInDepotBill =@SysCurrency; #PurchaseInDepotBill.Creator_PurchaseInDepotBill = GetLoginUserID(); #PurchaseInDepotBill.Name_UserMod = GetCurrentUser(); #PurchaseInDepotBill.CostingDate_PurchaseInDepotBill = DateTimeNow(); dgProduct.AllowNew(false); dgProduct.AllowDelete(false); btnCostCounting.Enabled = true; UpdateForm(true,""); @Status = 3; UpdateForm(false,""); if (@Status == 3) { Update(); } ChangeMode("View"); #PurchaseInDepotBill.count = #PurchaseInDepotBill.GoodsAmount_PurchaseInDepotBill + #PurchaseInDepotBill.TaxAmount_PurchaseInDepotBill; #PurchaseInDepotBill.Amount_PurchaseInDepotBill = #PurchaseInDepotBill.count + #PurchaseInDepotBill.Custom_PurchaseInDepotBill + #PurchaseInDepotBill.Agent_PurchaseInDepotBill + #PurchaseInDepotBill.Carriage_PurchaseInDepotBill + #PurchaseInDepotBill.Handling_PurchaseInDepotBill + #PurchaseInDepotBill.Others_PurchaseInDepotBill; UpdateForm(true,"");