; ; ShowSearchBox("BillSearch","NODEPOT", "tbNo", tbNo.CValue); UpdateForm(false, "cbPayer"); Search("SearchPayer"); UpdateForm(true, "cbPayer"); 0) { for (@i=0; @i MessageBox("校验已通过!",@Title); 0 && RowCount("#PayablesStrikeBills") > 0) { @AllStrikeAmount = SumOfCol("#PayablesStrikeMethod.Amount_PayablesStrikeMethod"); SuspendLayout(); for (@j=0; @j= #PayablesStrikeBills.ToPayAmount_PayablesStrikeBills) { @AllStrikeAmount -= #PayablesStrikeBills.ToPayAmount_PayablesStrikeBills; #PayablesStrikeBills.Strike_PayablesStrikeBills = #PayablesStrikeBills.ToPayAmount_PayablesStrikeBills; } else { #PayablesStrikeBills.Strike_PayablesStrikeBills = @AllStrikeAmount; @AllStrikeAmount = 0; } } ResumeLayout(); } ]]> Search("SearchPayablesStrikeMethod"); SetDataGridColumnDataSource(1,"dgReceiveMoney"); if (Search("SearchPayablesStrikeFirst", tbNo.CValue)) { ChangeMode("View",#PayablesStrike.ID_Assessor); } if (Search("SearchPayablesStrikePrevious", tbNo.CValue)) { ChangeMode("View",#PayablesStrike.ID_Assessor); } if (Search("SearchPayablesStrikeNext", tbNo.CValue)) { ChangeMode("View",#PayablesStrike.ID_Assessor); } if (Search("SearchPayablesStrikeLast", tbNo.CValue)) { ChangeMode("View",#PayablesStrike.ID_Assessor); } ChangeMode("Search"); ChangeMode("Modify"); Delete(); ChangeMode("Search"); PrintReport(); BeginAudit(); #PayablesStrike.ID_Assessor = GetLoginUserID(); #PayablesStrike.Name_Assessor = GetCurrentUser(); #PayablesStrike.AssessDate_PayablesStrike = DateTimeNow(); Audit(); ChangeMode("View",#PayablesStrike.ID_Assessor); EndAudit(); BeginUnAudit(); #PayablesStrike.ID_Assessor = DBNull(); #PayablesStrike.Name_Assessor = ""; UnAudit(); ChangeMode("View",#PayablesStrike.ID_Assessor); EndUnAudit(); ; ; ; if (toolBar.ExpandForm==true) { pnRight.Visible=true; } else { pnRight.Visible=false; } #PayablesStrikeBills.ToPayAmount_PayablesStrikeBills=#PayablesStrikeBills.Amount_FromBill-#PayablesStrikeBills.StrikedAmount_PayablesStrikeBills-#PayablesStrikeBills.Discount_PayablesStrikeBills;
Empty(); NewInstance(); dtDate.Enabled = false; tbNo.ReadOnly = false; tbSupplierNo.ReadOnly = true; cbPayer.Enabled = false; txtComment.ReadOnly = true; txtSumPay.CValue = 0.00; dtStart.Enabled = false; dtEnd.Enabled = false; dgReceiveMoney.ReadOnly = true; dgBill.ReadOnly = true; toolBar.EnableNew = GetRight(@Title,"新增"); toolBar.EnableSubmit = false; toolBar.EnableModify = false; toolBar.EnableDelete = false; toolBar.EnableAudit = false; toolBar.EnableUnAudit = false; toolBar.EnablePrint = false; cbPrev.Enabled = false; btnSearchByInvoice.Enabled = false; btnAutoStrike.Enabled = false; btnVerify.Enabled = false; #PayablesStrike.GetCurrency_PayablesStrike = ""; #PayablesStrike.BillCurrency_PayablesStrike = ""; #PayablesStrike.Rate_PayablesStrike = 0; #PayablesStrike.AssessDate_PayablesStrike = DBNull(); #PayablesStrike.LastModDate_PayablesStrike = DBNull(); UpdateForm(true, ""); tbNo.Focus(); @Status = 0; Empty(); NewInstance(); dtDate.Enabled = true; tbNo.ReadOnly = true; tbSupplierNo.ReadOnly = false; cbPayer.Enabled = true; txtComment.ReadOnly = false; txtSumPay.CValue = 0.00; dtStart.Enabled = true; dtEnd.Enabled = true; dgReceiveMoney.ReadOnly = false; dgBill.ReadOnly = false; toolBar.EnableNew = false; toolBar.EnableSubmit = GetRight(@Title,"新增"); toolBar.EnableModify = false; toolBar.EnableDelete = false; toolBar.EnableAudit = false; toolBar.EnableUnAudit = false; toolBar.EnablePrint = false; cbPrev.Enabled = true; btnSearchByInvoice.Enabled = true; btnAutoStrike.Enabled = true; btnVerify.Enabled = true; dgReceiveMoney.AllowNew(true); dgReceiveMoney.AllowDelete(true); dgReceiveMoney.SetColumnReadOnly(1, false); dgReceiveMoney.RowHeaderCheck = true; dgBill.AllowNew(true); dgBill.AllowDelete(true); dgBill.SetColumnReadOnly(1, false); dgBill.RowHeaderCheck = true; #PayablesStrike.ID_PayablesStrike = NewGuid(); #PayablesStrike.ID_Creator = GetLoginUserID(); #PayablesStrike.Name_Creator = GetCurrentUser(); #PayablesStrike.ID_Assessor = DBNull(); #PayablesStrike.AssessDate_PayablesStrike = DBNull(); #PayablesStrike.LastModUser_PayablesStrike = DBNull(); #PayablesStrike.LastModDate_PayablesStrike = DBNull(); #PayablesStrike.GetCurrency_PayablesStrike = @SysCurrency; #PayablesStrike.BillCurrency_PayablesStrike = @SysCurrency; #PayablesStrike.Rate_PayablesStrike = 1; SetColumnDefaultValue("PayablesStrikeBills", "PayDate_PayablesStrikeBills", DBNull()); UpdateForm(true, ""); @Status = 1; dtDate.Enabled = false; tbNo.ReadOnly = true; tbSupplierNo.ReadOnly = true; cbPayer.Enabled = false; txtComment.ReadOnly = true; dgReceiveMoney.ReadOnly = true; dgBill.ReadOnly = true; dtStart.Enabled = false; dtEnd.Enabled = false; toolBar.EnableNew = GetRight(@Title,"新增"); toolBar.EnableSubmit = false; if (Equals(#PayablesStrike.ID_Assessor, DBNull())) { toolBar.EnableModify = GetRight(@Title,"修改"); toolBar.EnableDelete = GetRight(@Title,"删除"); toolBar.EnableAudit = GetRight(@Title,"审核"); toolBar.EnableUnAudit = false; } else { toolBar.EnableModify = false; toolBar.EnableDelete = false; toolBar.EnableAudit = false; toolBar.EnableUnAudit = GetRight(@Title,"取消审核"); } toolBar.EnablePrint = GetRight(@Title,"打印"); cbPrev.Enabled = false; btnSearchByInvoice.Enabled = false; btnAutoStrike.Enabled = false; btnVerify.Enabled = false; UpdateForm(true, ""); @Status = 2; dtDate.Enabled = false; tbNo.ReadOnly = true; tbSupplierNo.ReadOnly = true; cbPayer.Enabled = true; txtComment.ReadOnly = false; dgReceiveMoney.ReadOnly = false; dgBill.ReadOnly = false; toolBar.EnableNew = false; toolBar.EnableSubmit = GetRight(@Title,"修改"); toolBar.EnableModify = false; toolBar.EnableDelete = false; toolBar.EnableAudit = false; toolBar.EnableUnAudit = false; toolBar.EnablePrint = false; @NotAssess = Equals(#PayablesStrike.AssessDate_PayablesStrike, DBNull()); cbPrev.Enabled = @NotAssess; if (cbPrev.Checked) { btnSearchByInvoice.Enabled = false; btnAutoStrike.Enabled = false; dtStart.Enabled = false; dtEnd.Enabled = false; } else { btnSearchByInvoice.Enabled = @NotAssess; btnAutoStrike.Enabled = true; dtStart.Enabled = true; dtEnd.Enabled = true; } btnVerify.Enabled = true; dgReceiveMoney.AllowNew(@NotAssess); dgReceiveMoney.AllowDelete(@NotAssess); dgReceiveMoney.SetColumnReadOnly(1, !@NotAssess); dgReceiveMoney.RowHeaderCheck = @NotAssess; dgBill.AllowNew(@NotAssess); dgBill.AllowDelete(@NotAssess); dgBill.SetColumnReadOnly(1, !@NotAssess); dgBill.RowHeaderCheck = @NotAssess; #PayablesStrike.LastModUser_PayablesStrike = GetLoginUserID(); #PayablesStrike.Name_LastModUser = GetCurrentUser(); #PayablesStrike.LastModDate_PayablesStrike = DateTimeNow(); SetColumnDefaultValue("PayablesStrikeBills", "PayDate_PayablesStrikeBills", DBNull()); UpdateForm(true, ""); @Status = 3; #PayablesStrikeBills.ToPayAmount_PayablesStrikeBills ) { MessageBox("本次冲账不得大于本次应付!",@Title); dgBill.Focus(); ResumeLayout(); tbDetail.SelectedIndex = 1; dgBill.CurrentRowIndex = @i; return; } } ResumeLayout(); if (SumOfCol("#PayablesStrikeMethod.Amount_PayablesStrikeMethod")!=SumOfCol("#PayablesStrikeBills.Strike_PayablesStrikeBills")) { MessageBox("本次冲帐金额和出帐金额不相等!",@Title); dgBill.Focus(); tbDetail.SelectedIndex = 1; return; } ]]>