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();
                        }
                    }
                }
            }
        }
Пример #2
0
        internal override BaseResult DoService()
        {
            JSFPJSelect         form = new JSFPJSelect(CommonMethods.ParseFplx(_args.FpType));
            List <InvVolumeApp> list = form.TaxCardInstance.GetInvStock();
            List <TianKaiQueRenResultEntity> resultList = new List <TianKaiQueRenResultEntity>();
            InvVolumeApp iva;

            if (form.mfplx == Aisino.Fwkp.BusinessObject.FPLX.JSFP && (iva = list.Find(p => p.InvType == 0x29)) != null)
            {
                resultList.Add(new TianKaiQueRenResultEntity("增值税普通发票(卷票)", iva.TypeCode, JSFPJSelect.FPHMTo8Wei(iva.HeadCode), iva.Number));
            }
            if (form.mfplx == Aisino.Fwkp.BusinessObject.FPLX.PTFP && (iva = list.Find(p => p.InvType == 2)) != null)
            {
                resultList.Add(new TianKaiQueRenResultEntity("增值税普通发票", iva.TypeCode, JSFPJSelect.FPHMTo8Wei(iva.HeadCode), iva.Number));
            }
            return(new TianKaiQueRenResult(_args, resultList));
        }