public GenerateInvSetForm(InvType typeFP) { this.InitializeComponent(); this.invType = typeFP; this.para = new InvSplitPara(); if (typeFP == InvType.Special) { this.label1.Text = "汉字防伪开具专用发票设置"; this.label3.Text = "提示:此设置只对汉字防伪用户开具“清单行商品名称”为空的超过汉字防伪限制的专用发票单据起作用"; this.ckShow.Text = "在专用发票生成之前显示"; } else if (typeFP == InvType.Common) { this.label1.Text = "汉字防伪开具普通发票设置"; this.label3.Text = "提示:此设置只对汉字防伪用户开具“清单行商品名称”为空的超过汉字防伪限制的普通发票单据起作用"; this.ckShow.Text = "在普通发票生成之前显示"; } this.para.GetInvSplitPara(typeFP); this.rdForbidden.Checked = this.para.below7ForbiddenInv; this.rdSplit.Checked = this.para.below7Split; this.rdGenerlist.Checked = this.para.below7Generlist; this.rdForbidden2.Checked = this.para.above7ForbiddenInv; this.rdSplit2.Checked = this.para.above7Split; this.rdGenerlist2.Checked = this.para.above7Generlist; this.ckShow.Checked = this.para.ShowSetForm; if (WbjkEntry.RegFlag_ST || WbjkEntry.RegFlag_KT) { this.rdSplit2.Visible = false; } else if (WbjkEntry.RegFlag_JT) { this.rdGenerlist2.Visible = true; } }
protected override void RunCommand() { TaxCard taxCard = TaxCardFactory.CreateTaxCard(); InvSplitPara para = new InvSplitPara(); para.GetInvSplitPara(InvType.Common); bool flag = taxCard.get_StateInfo().CompanyType != 0; if (para.ShowSetForm && flag) { GenerateInvSetForm form2 = new GenerateInvSetForm(InvType.Common) { NCPBZ = 1 }; form2.ShowDialog(); } else { GenerateFP efp = new GenerateFP(InvType.Common, 1); string code = ""; if (!efp.CanInvoice(2, out code)) { MessageManager.ShowMsgBox(code); } else if (!this.CanXTInv(taxCard)) { MessageManager.ShowMsgBox("INP-242132"); } else { efp.ShowDialog(); } } }
protected override void RunCommand() { SPFLService service; TaxCard taxCard = TaxCardFactory.CreateTaxCard(); InvSplitPara para = new InvSplitPara(); para.GetInvSplitPara(InvType.Common); bool flag = taxCard.get_StateInfo().CompanyType != 0; if (para.ShowSetForm && flag) { service = new SPFLService(); if (CommonTool.isSPBMVersion() && (service.GetMaxBMBBBH() == "0.0")) { MessageBox.Show("商品和服务税收分类编码表为空,请先更新商品和服务税收分类编码表后,再开具发票!"); } else { GenerateInvSetForm form2 = new GenerateInvSetForm(InvType.Common) { NCPBZ = 2 }; form2.ShowDialog(); } } else { service = new SPFLService(); if (CommonTool.isSPBMVersion() && (service.GetMaxBMBBBH() == "0.0")) { MessageBox.Show("商品和服务税收分类编码表为空,请先更新商品和服务税收分类编码表后,再开具发票!"); } else { GenerateFP efp = new GenerateFP(InvType.Common, 2); string code = ""; if (!efp.CanInvoice(2, out code)) { MessageManager.ShowMsgBox(code); } else if (!this.CanXTInv(taxCard)) { MessageManager.ShowMsgBox("INP-242132"); } else { JSFPJSelect select = new JSFPJSelect(2); if (select.ShowDialog() == DialogResult.OK) { if (efp.GetCurrent(0x29) != null) { } efp.ShowDialog(); } } } } }