protected override void RunCommand() { try { if ((commonIfm == null) || !commonIfm.HasShow()) { SPFLService service = new SPFLService(); if (FLBM_lock.isFlbm() && (service.GetMaxBMBBBH() == "0.0")) { MessageManager.ShowMsgBox("INP-242133"); } else { IFpManager manager = new FpManager(); if (manager.CanInvoice((FPLX)0x29)) { if (manager.GetCurrent((FPLX)0x29) != null) { if (new JSFPJSelect((FPLX)0x29).ShowDialog() == DialogResult.OK) { string[] current = manager.GetCurrent((FPLX)0x29); if (current != null) { if (new StartConfirmForm((FPLX)0x29, current).ShowDialog() == DialogResult.OK) { commonIfm = new InvoiceForm_JS((FPLX)0x29, (ZYFP_LX)0, current[0], current[1]); if (commonIfm.InitSuccess) { commonIfm.ShowDialog(); } } } else { MessageManager.ShowMsgBox(manager.Code()); } } } else { MessageManager.ShowMsgBox(manager.Code()); } } else { MessageManager.ShowMsgBox(manager.Code()); } } } } catch (Exception exception) { this.log.Error("电子增值税普通发票开具功能加载异常:" + exception.ToString()); string[] textArray1 = new string[] { exception.ToString() }; MessageManager.ShowMsgBox("INP-242114", textArray1); } }
protected override void RunCommand() { try { if ((commonIfm == null) || !commonIfm.HasShow()) { SPFLService service = new SPFLService(); if (FLBM_lock.isFlbm() && (service.GetMaxBMBBBH() == "0.0")) { MessageManager.ShowMsgBox("INP-242133"); } else if ((NCPXSInvEntry.ncpxsIfm != null) && NCPXSInvEntry.ncpxsIfm.HasShow()) { string[] textArray1 = new string[] { "农产品销售发票", "一般普通发票" }; MessageManager.ShowMsgBox("INP-242165", textArray1); } else if ((NCPSGInvEntry.ncpsgIfm != null) && NCPSGInvEntry.ncpsgIfm.HasShow()) { string[] textArray2 = new string[] { "收购发票", "一般普通发票" }; MessageManager.ShowMsgBox("INP-242165", textArray2); } else { IFpManager manager = new FpManager(); if (manager.CanInvoice((FPLX)0x33)) { string[] current = manager.GetCurrent((FPLX)0x33); if (current != null) { if (new StartConfirmForm((FPLX)0x33, current).ShowDialog() == DialogResult.OK) { commonIfm = new InvoiceForm_DZ((FPLX)0x33, 0, current[0], current[1]); if (commonIfm.InitSuccess) { commonIfm.ShowDialog(); } } } else { MessageManager.ShowMsgBox(manager.Code()); } } else { MessageManager.ShowMsgBox(manager.Code()); } } } } catch (Exception exception) { this.log.Error("电子增值税普通发票开具功能加载异常:" + exception.ToString()); string[] textArray3 = new string[] { exception.ToString() }; MessageManager.ShowMsgBox("INP-242114", textArray3); } }
private void _ShowDataGrid(CustomStyleDataGrid parent, Dictionary <SPXX, string> spxx, int index) { while ((parent.Rows.Count - 1) < index) { parent.Rows.Add(); } FPLX fplx = this._fpxx.Fplx; string str = this._GetSLv(fplx, spxx[(SPXX)8], 0).ShowValue; if (((str != "") && (str == "0%")) && FLBM_lock.isFlbm()) { if ((spxx[(SPXX)0x17] == "") || (spxx[(SPXX)0x17] == "3")) { str = "0%"; } if (spxx[(SPXX)0x17] == "1") { str = "免税"; } if (spxx[(SPXX)0x17] == "2") { str = "不征税"; } } else if (((str != "") && (str == "0%")) && !FLBM_lock.isFlbm()) { str = "免税"; } string str2 = ((spxx[(SPXX)9].Length > 0) && (Math.Abs(double.Parse(spxx[(SPXX)9])) < 0.009)) ? "" : spxx[(SPXX)9]; DataGridViewRow row = parent.Rows[index]; for (int i = 0; i < row.Cells.Count; i++) { string name = parent.Columns[i].Name; try { if (name.Equals("SLV")) { row.Cells["SLV"].Value = str; } else if (name.Equals("SE")) { row.Cells["SE"].Value = str2; } else { row.Cells[name].Value = spxx[(SPXX)Enum.Parse(typeof(SPXX), name)]; } } catch (ArgumentException exception) { this.log.Error("设置数据表格内容异常", exception); } } this._SetHzxx(); }
protected override void RunCommand() { try { if ((zyfpIfm == null) || !zyfpIfm.HasShow()) { SPFLService service = new SPFLService(); if (FLBM_lock.isFlbm() && (service.GetMaxBMBBBH() == "0.0")) { MessageManager.ShowMsgBox("INP-242133"); } else if ((SNYInvEntry.snyIfm != null) && SNYInvEntry.snyIfm.HasShow()) { MessageManager.ShowMsgBox("INP-242163"); } else { IFpManager manager = new FpManager(); if (manager.CanInvoice(0)) { string[] current = manager.GetCurrent(0); if (current != null) { if (new StartConfirmForm(0, current).ShowDialog() == DialogResult.OK) { zyfpIfm = new InvoiceForm_ZZS(0, 0, current[0], current[1]); if (zyfpIfm.InitSuccess) { zyfpIfm.ShowDialog(); } } } else { MessageManager.ShowMsgBox(manager.Code()); } } else { MessageManager.ShowMsgBox(manager.Code()); } } } } catch (Exception exception) { this.log.Error("专用发票开具功能加载异常:" + exception.ToString()); string[] textArray1 = new string[] { exception.ToString() }; MessageManager.ShowMsgBox("INP-242115", textArray1); } }
protected override object[] doService(object[] param) { if (param.Length != 1) { return(null); } Invoice invoice = param[0] as Invoice; if (invoice == null) { return(null); } IFpManager manager = new FpManager(); if ((((invoice.Fplx == (FPLX)2) || (invoice.Fplx == (FPLX)0x33)) || (invoice.Fplx == (FPLX)0x29)) && (invoice.Zyfplx == (ZYFP_LX)9)) { invoice.Gfsh = manager.GetXfsh(); invoice.Gfmc = manager.GetXfmc(); } else { invoice.Xfsh = manager.GetXfsh(); invoice.Xfmc = manager.GetXfmc(); } if (!FLBM_lock.isFlbm()) { invoice.Bmbbbh = ""; } Fpxx fpData = invoice.GetFpData(); if (fpData != null) { if ((invoice.IsRed && (fpData.fplx == 0)) && !manager.CheckRedNum(fpData.redNum, fpData.fplx)) { return(new object[] { "INP-242106", fpData.redNum }); } if (invoice.MakeCardInvoice(fpData, false)) { if (manager.SaveXxfp(fpData)) { return(new object[] { "0000", fpData.fpdm, fpData.fphm }); } return(new object[] { "INP-242111" }); } } return(new object[] { invoice.GetCode() }); }
protected override void RunCommand() { try { if (((oldJdcfpfm == null) || !oldJdcfpfm.HasShow()) && ((newJdcfpfm == null) || !newJdcfpfm.HasShow())) { SPFLService service = new SPFLService(); if (FLBM_lock.isFlbm() && (service.GetMaxBMBBBH() == "0.0")) { MessageManager.ShowMsgBox("INP-242133"); } else { IFpManager manager = new FpManager(); if (manager.CanInvoice((FPLX)12)) { string[] current = manager.GetCurrent((FPLX)12); if (current != null) { if (new StartConfirmForm((FPLX)12, current).ShowDialog() == DialogResult.OK) { string jdcVerSelect = this.GetJdcVerSelect(); switch ("1") { case "": new JDCVersionSet(current[0], current[1], JDCVersion.NULL).ShowDialog(); return; case "0": oldJdcfpfm = new JDCInvoiceForm_old((FPLX)12, current[0], current[1]); if (oldJdcfpfm.InitSuccess) { oldJdcfpfm.ShowDialog(); } break; case "1": newJdcfpfm = new JDCInvoiceForm_new((FPLX)12, current[0], current[1]); if (newJdcfpfm.InitSuccess) { newJdcfpfm.ShowDialog(); } break; } } } else { MessageManager.ShowMsgBox(manager.Code()); } } else { MessageManager.ShowMsgBox(manager.Code()); } } } } catch (Exception exception) { this.log.Error("机动车销售统一发票开具功能加载异常:" + exception.ToString()); string[] textArray1 = new string[] { exception.ToString() }; MessageManager.ShowMsgBox("INP-242156", textArray1); } }