Пример #1
0
        public List <InvTypeEntity> GetInvTypeCollect(bool bool_0, int int_0, int int_1, int int_2)
        {
            TaxCard card = TaxCardFactory.CreateTaxCard();

            if (card == null)
            {
                return(null);
            }
            List <InvTypeEntity> list = new List <InvTypeEntity>();
            TaxStatisData        data = null;

            if (bool_0)
            {
                data = card.GetMonthStatistics(int_0, int_1, int_2);
            }
            else
            {
                data = card.GetYearStatistics(int_0, int_1, int_1);
            }
            if (data == null)
            {
                return(null);
            }
            for (int i = 0; i < data.Count; i++)
            {
                InvAmountTaxStati stati = data[i];
                if (stati == null)
                {
                    return(null);
                }
                if (stati.InvTypeStr.Length > 0)
                {
                    string str = stati.InvTypeStr.Trim();
                    if (str.Equals("专用发票"))
                    {
                        InvTypeEntity item = new InvTypeEntity {
                            m_invType    = INV_TYPE.INV_SPECIAL,
                            m_strInvName = "增值税专用发票"
                        };
                        list.Add(item);
                    }
                    else if (str.Equals("普通发票"))
                    {
                        InvTypeEntity entity2 = new InvTypeEntity {
                            m_invType    = INV_TYPE.INV_COMMON,
                            m_strInvName = "增值税普通发票"
                        };
                        list.Add(entity2);
                    }
                    else if (str.Equals("货物运输业增值税专用发票"))
                    {
                        InvTypeEntity entity3 = new InvTypeEntity {
                            m_invType    = INV_TYPE.INV_TRANSPORTATION,
                            m_strInvName = "货物运输业增值税专用发票"
                        };
                        list.Add(entity3);
                    }
                    else if (str.Equals("机动车销售统一发票"))
                    {
                        InvTypeEntity entity4 = new InvTypeEntity {
                            m_invType    = INV_TYPE.INV_VEHICLESALES,
                            m_strInvName = "机动车销售统一发票"
                        };
                        list.Add(entity4);
                    }
                    else
                    {
                        InvTypeEntity entity5 = new InvTypeEntity {
                            m_invType    = INV_TYPE.INV_OTHER,
                            m_strInvName = str
                        };
                        list.Add(entity5);
                    }
                }
            }
            return(list);
        }
Пример #2
0
        public List <InvTypeEntity> GetInvTypeCollect(bool bMonth, int nYear, int nMonth, int nTaxPeriod)
        {
            TaxCard card = TaxCardFactory.CreateTaxCard();

            if (card == null)
            {
                return(null);
            }
            List <InvTypeEntity> list = new List <InvTypeEntity>();
            TaxStatisData        data = null;

            if (bMonth)
            {
                data = card.GetMonthStatistics(nYear, nMonth, nTaxPeriod);
            }
            else
            {
                data = card.GetYearStatistics(nYear, nMonth, nMonth);
            }
            if (data == null)
            {
                return(null);
            }
            for (int i = 0; i < data.get_Count(); i++)
            {
                InvAmountTaxStati stati = data.get_Item(i);
                if (stati == null)
                {
                    return(null);
                }
                if (stati.get_InvTypeStr().Length > 0)
                {
                    string str = stati.get_InvTypeStr().Trim();
                    if (str.Equals("专用发票"))
                    {
                        InvTypeEntity item = new InvTypeEntity {
                            m_invType    = INV_TYPE.INV_SPECIAL,
                            m_strInvName = "增值税专用发票"
                        };
                        list.Add(item);
                    }
                    else if (str.Equals("普通发票"))
                    {
                        InvTypeEntity entity2 = new InvTypeEntity {
                            m_invType    = INV_TYPE.INV_COMMON,
                            m_strInvName = "增值税普通发票"
                        };
                        list.Add(entity2);
                    }
                    else if (str.Equals("货物运输业增值税专用发票"))
                    {
                        InvTypeEntity entity3 = new InvTypeEntity {
                            m_invType    = INV_TYPE.INV_TRANSPORTATION,
                            m_strInvName = "货物运输业增值税专用发票"
                        };
                        list.Add(entity3);
                    }
                    else if (str.Equals("机动车销售统一发票"))
                    {
                        InvTypeEntity entity4 = new InvTypeEntity {
                            m_invType    = INV_TYPE.INV_VEHICLESALES,
                            m_strInvName = "机动车销售统一发票"
                        };
                        list.Add(entity4);
                    }
                    else if (str.Equals("电子增值税普通发票"))
                    {
                        InvTypeEntity entity5 = new InvTypeEntity {
                            m_invType    = INV_TYPE.INV_PTDZ,
                            m_strInvName = "电子增值税普通发票"
                        };
                        list.Add(entity5);
                    }
                    else if (str.Equals("增值税普通发票(卷票)"))
                    {
                        InvTypeEntity entity6 = new InvTypeEntity {
                            m_invType    = INV_TYPE.INV_JSFP,
                            m_strInvName = "增值税普通发票(卷票)"
                        };
                        list.Add(entity6);
                    }
                    else
                    {
                        InvTypeEntity entity7 = new InvTypeEntity {
                            m_invType    = INV_TYPE.INV_OTHER,
                            m_strInvName = str
                        };
                        list.Add(entity7);
                    }
                }
            }
            return(list);
        }