; ; if(tbNo.ReadOnly == false) { if(tbNo.CValue != StringEmpty()) { UpdateForm(false, ""); if(Search("SearchPreGetWithNo", tbNo.CValue)) { ChangeMode("View"); } else { MessageBox("该收款单不存在!",@Title); } } else { MessageBox("请输入收款编号!", @Title); } } ShowSearchBox("BillSearch","NODEPOT", "tbNo",tbNo.CValue); UpdateForm(false,""); if(tbCustomerNo.CValue!=StringEmpty()) { if(!Search("SearchCustomer",tbCustomerNo.CValue)) { MessageBox("该客户不存在!",@Title); @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo.CValue); if(@temp != "") { tbCustomerNo.CValue = @temp; ActiveControlEvent("tbCustomerNo", "Enter"); } } else { if (Search("SearchCustomersCustomer",tbCustomerNo.CValue)) { MessageBox("该客户为 "+ #CustomersCustomer.No_Customer +" 的客户,不能填单!"); tbCustomerNo.Text = ""; return; } if(!Equals(#Customer.SuspendDate_Customer,DBNull())) { MessageBox("该客户已停用!",@Title); } #PreGet.ID_Customer=#Customer.ID_Customer; #PreGet.ShortName_Customer=#Customer.ShortName_Customer; #PreGet.Balance_PreGet=0; } } else { MessageBox("请输入客户编号!",@Title); #PreGet.ID_Customer=GuidEmpty(); #PreGet.ShortName_Customer=""; #PreGet.Balance_PreGet=0; tbCustomerNo.Focus(); } UpdateForm(true,"txtCustomerName"); if (tbCustomerNo.ReadOnly == false) { @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo.CValue); if( @temp == "" ) return; tbCustomerNo.CValue = @temp; ActiveControlEvent("tbCustomerNo", "Enter"); } UpdateForm(false, "cbType"); Search("SearchMethod"); UpdateForm(true, "cbType"); UpdateForm(false,"AmountType"); Search("SearchType"); UpdateForm(true,"AmountType"); UpdateForm(false, "cbReceiver"); Search("SearchReceiver"); UpdateForm(true, "cbReceiver"); UpdateForm(false, "cbComment"); Search("SearchComment"); UpdateForm(true, "cbComment"); AmountType.SelectedName=""; if(Search("SearchPreGetFirst")) { ChangeMode("View"); } AmountType.SelectedName=""; if(Search("SearchPreGetPrevious", tbNo.CValue)) { ChangeMode("View"); } AmountType.SelectedName=""; if(Search("SearchPreGetNext",tbNo.CValue)) { ChangeMode("View"); } AmountType.SelectedName=""; if(Search("SearchPreGetLast")) { ChangeMode("View"); } ChangeMode("Search"); ChangeMode("Modify"); Delete(); ChangeMode("Search"); PrintReport(); BeginAudit(); #PreGet.ID_Assessor=GetLoginUserID(); #PreGet.Assessor=GetCurrentUser(); #PreGet.AssessDate_PreGet=DateTimeNow(); Audit(); ChangeMode("View"); EndAudit(); BeginUnAudit(); #PreGet.ID_Assessor=DBNull(); #PreGet.Assessor=DBNull(); #PreGet.AssessDate_PreGet=DataTimeNow(); UnAudit(); ChangeMode("View"); EndUnAudit(); ; ; ; ;
Empty(); NewInstance(); tbNo.ReadOnly=false; ikCkNoPreGetStrikeBalance.Enabled=false; dtDate.Enabled=false; tbCustomerNo.ReadOnly=true; cbType.Enabled=false; AmountType.Enabled=false; txtVoucherDate.Enabled=false; txtVoucherNo.ReadOnly=true; cbReceiver.Enabled=false; ntbMoney.ReadOnly=true; cbComment.Enabled=false; #PreGet.Creator=""; #PreGet.ID_Creator=DBNull(); #PreGet.Assessor=""; #PreGet.ID_Assessor=DBNull(); #PreGet.AssessDate_PreGet=DBNull(); #PreGet.LastModUser_PreGet=DBNull(); #PreGet.LastModUser=""; #PreGet.LastModDate_PreGet=DBNull(); toolBar.EnableSubmit=false; toolBar.EnableModify=false; toolBar.EnableDelete=false; toolBar.EnableAudit=false; toolBar.EnableUnAudit=false; toolBar.EnableNew=GetRight(@Title,"新增"); toolBar.EnablePrint=false; UpdateForm(true,""); tbNo.Focus(); @Status=0; @sql = 0; Empty(); NewInstance(); tbNo.ReadOnly=true; ikCkNoPreGetStrikeBalance.Enabled=true; dtDate.Enabled=true; tbCustomerNo.ReadOnly=false; cbType.Enabled=true; AmountType.Enabled = true; txtVoucherDate.Enabled=true; txtVoucherNo.ReadOnly=false; cbReceiver.Enabled=true; ntbMoney.ReadOnly=false; cbComment.Enabled=true; #PreGet.ID_PreGet=NewGuid(); #PreGet.GetCurrency_PreGet=@SysCurrency; #PreGet.Currency_PreGet=@SysCurrency; #PreGet.Rate_PreGet=1.00; #PreGet.Creator=GetCurrentUser(); #PreGet.ID_Creator=GetLoginUserID(); #PreGet.Assessor=DBNull(); #PreGet.ID_Assessor=DBNull(); #PreGet.AssessDate_PreGet=DBNull(); #PreGet.LastModUser_PreGet=DBNull(); #PreGet.LastModUser=DBNull(); #PreGet.LastModDate_PreGet=DBNull(); #PreGet.UnPreGetStrikeBalance_PreGet=false; #PreGet.Date_PreGet=GetCurrentTime(); AmountType.SelectedName = "收款"; toolBar.EnableSubmit=GetRight(@Title,"新增"); toolBar.EnableModify=false; toolBar.EnableDelete=false; toolBar.EnableAudit=false; toolBar.EnableUnAudit=false; toolBar.EnableNew=false; toolBar.EnablePrint=false; UpdateForm(true,""); @Status=1; tbNo.ReadOnly=false; ikCkNoPreGetStrikeBalance.Enabled=false; dtDate.Enabled=false; tbCustomerNo.ReadOnly=true; txtVoucherDate.Enabled=false; txtVoucherNo.ReadOnly=true; cbReceiver.Enabled=false; cbType.Enabled=false; AmountType.Enabled = false; ntbMoney.ReadOnly=true; cbComment.Enabled=false; toolBar.EnableSubmit=false; toolBar.EnableNew=GetRight(@Title,"新增"); if(Equals(#PreGet.ID_Assessor, DBNull())) { toolBar.EnableAudit=GetRight(@Title,"审核"); toolBar.EnableUnAudit=false; toolBar.EnableModify=GetRight(@Title,"修改"); toolBar.EnableDelete=GetRight(@Title,"删除"); } else { toolBar.EnableAudit=false; toolBar.EnableUnAudit=GetRight(@Title,"取消审核"); toolBar.EnableModify=false; toolBar.EnableDelete=false; } if(#PreGet.Amount_PreGet>0) { AmountType.SelectedName ="收款"; } else { AmountType.SelectedName ="退款"; } toolBar.EnablePrint=GetRight(@Title,"打印"); UpdateForm(true, ""); @Status=2; @sql = ntbMoney.CValue; tbNo.ReadOnly=true; ikCkNoPreGetStrikeBalance.Enabled=true; dtDate.Enabled=false; tbCustomerNo.ReadOnly=true; txtVoucherDate.Enabled=true; txtVoucherNo.ReadOnly=false; cbReceiver.Enabled=true; cbType.Enabled=true; AmountType.Enabled = true; ntbMoney.ReadOnly=false; cbComment.Enabled=true; #PreGet.LastModUser=GetCurrentUser(); #PreGet.LastModUser_PreGet=GetLoginUserID(); #PreGet.LastModDate_PreGet=GetCurrentTime(); toolBar.EnableSubmit=GetRight(@Title,"修改"); toolBar.EnableModify=false; toolBar.EnableDelete=false; toolBar.EnableAudit=false; toolBar.EnableUnAudit=false; toolBar.EnableNew=false; toolBar.EnablePrint=false; UpdateForm(true, ""); @Status=3; =0) #PreGet.Amount_PreGet=-ntbMoney.CValue; else #PreGet.Amount_PreGet=ntbMoney.CValue; } } else { if(@sql>=0) #PreGet.Amount_PreGet=-@sql; else #PreGet.Amount_PreGet=@sql; } } else { if(ntbMoney.CValue!=@sql) { if(ntbMoney.CValue!=-@sql) { if (ntbMoney.CValue >=0) #PreGet.Amount_PreGet=ntbMoney.CValue; else #PreGet.Amount_PreGet=-ntbMoney.CValue; } } else { if(@sql>=0) #PreGet.Amount_PreGet=@sql; else #PreGet.Amount_PreGet=-@sql; } } Update(); } ChangeMode("View"); ]]>