Пример #1
0
        protected override void RunCommand()
        {
            TaxCard taxCard = TaxCardFactory.CreateTaxCard();

            new InvSplitPara().GetInvSplitPara(InvType.Special);
            SPFLService service = new SPFLService();

            if (CommonTool.isSPBMVersion() && (service.GetMaxBMBBBH() == "0.0"))
            {
                MessageBox.Show("商品和服务税收分类编码表为空,请先更新商品和服务税收分类编码表后,再开具发票!");
            }
            else
            {
                GenerateFP efp  = new GenerateFP(InvType.Special);
                string     code = "";
                if (!efp.CanInvoice(0, 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();
                        }
                    }
                }
            }
        }
Пример #3
0
 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);
     }
 }
Пример #4
0
 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);
     }
 }
Пример #5
0
 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);
     }
 }
Пример #6
0
        protected override void RunCommand()
        {
            SPFLService service = new SPFLService();

            if (CommonTool.isSPBMVersion() && (service.GetMaxBMBBBH() == "0.0"))
            {
                MessageBox.Show("商品和服务税收分类编码表为空,请先更新商品和服务税收分类编码表后,再开具发票!");
            }
            else
            {
                GenerateFP efp  = new GenerateFP(InvType.transportation);
                string     code = "";
                if (!efp.CanInvoice(11, out code))
                {
                    MessageManager.ShowMsgBox(code);
                }
                else
                {
                    efp.ShowDialog();
                }
            }
        }
Пример #7
0
        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);
            }
        }