/// <summary>
        /// 判断是否可以反结账结账
        /// </summary>
        /// <returns></returns>
        /// <remarks>
        ///
        /// </remarks>
        public string isFinish(string repDate, string status)
        {
            int        count = 0;
            ExceResult res   = new ExceResult();
            string     CId   = CompanyId();
            List <Co_Tr_ThirdAccount> rep = new List <Co_Tr_ThirdAccount>();

            rep = new IESvc().isFinish(repDate, status, out count, CId);
            string msg    = string.Empty;
            bool   result = false;

            if (rep.Count == 0)
            {
                msg    = General.Resource.Common.Success;
                result = true;
            }
            else
            {
                msg    = General.Resource.Common.Failed;
                result = false;
            }

            return(string.Format("{{\"Result\":{0},\"Msg\":\"{1}\"}}"
                                 , result.ToString().ToLower(), msg));
        }
        public string CreateTaxSettlement(string repDate, string Amount, string Rep_status, string GUID, string Flag, string State)
        {
            bool       result = false;
            ExceResult res    = new ExceResult();
            string     msg    = string.Empty;

            if (string.IsNullOrEmpty(GUID))
            {
                GUID = Guid.NewGuid().ToString();
            }
            string C_GUID = Session["CurrentCompanyGuid"].ToString();

            result = new IESvc().CreateTaxSettlement(GUID, repDate, Amount, Rep_status, C_GUID, Flag, State, "非期初");
            if (result)
            {
                res.success = true;
                msg         = General.Resource.Common.Success;
            }
            else
            {
                res.success = false;
                msg         = General.Resource.Common.Failed;
            }
            return(Newtonsoft.Json.JsonConvert.SerializeObject(res));
        }
Пример #3
0
        public String CreateTaxRecord(List <T_IERecord> TaxList)
        {
            bool       result = false;
            ExceResult res    = new ExceResult();
            string     msg    = string.Empty;

            foreach (T_IERecord form in TaxList)
            {
                form.C_GUID   = Session["CurrentCompanyGuid"].ToString();
                form.Creator  = base.userData.LoginFullName;
                form.Currency = Session["Currency"].ToString();
                if (form.IEGroup == "增值税")
                {
                    form.IE_Flag = "E";
                }

                result = new IESvc().UpdVoucherFL(form, "NV");

                if (result)
                {
                    msg = General.Resource.Common.Success;
                }
                else
                {
                    msg = General.Resource.Common.Failed;
                }
            }

            return(string.Format("{{\"Result\":{0},\"Msg\":\"{1}\"}}"
                                 , result.ToString().ToLower(), msg));
        }
        public string UpdWcRecord(string id, decimal total, string Currency, string name, string RPType, string Profit_Name)
        {
            bool       result = false;
            ExceResult res    = new ExceResult();
            string     msg    = string.Empty;
            T_WageCost wag    = new T_WageCost();

            wag.PayType     = RPType;
            wag.C_GUID      = Session["CurrentCompanyGuid"].ToString();
            wag.W_GUID      = id;
            wag.Total       = total;
            wag.Currency    = Currency;
            wag.Employee    = name;
            wag.Date        = DateTime.Now;
            wag.State       = "未付";
            wag.Profit_Name = Profit_Name;
            wag.SalaryType  = 1;
            string strVouchID = Guid.NewGuid().ToString();

            result = new IESvc().UpdWageCost(wag, strVouchID);
            if (result)
            {
                res.success = true;
                msg         = General.Resource.Common.Success;
            }
            else
            {
                res.success = false;
                msg         = General.Resource.Common.Failed;
            }
            return(JsonConvert.SerializeObject(res));
        }
        /// <summary>
        /// 更新费用数据
        /// </summary>
        /// <param name="head">费用主数据</param>
        /// <param name="list">费用明细数据</param>
        /// <returns></returns>
        public string UpdTaxProvisionRecord(T_IERecord form)
        {
            bool   result = false;
            string msg    = string.Empty;

            form.C_GUID     = Session["CurrentCompanyGuid"].ToString();
            form.Creator    = base.userData.LoginFullName;
            form.CreateDate = GetNowDate();
            if (form.IEGroup == "ac23eded-9c74-4781-8d14-797a5bccdc79" || form.IEGroup == "234218e9-87c5-4854-814a-7d5671bf1fd9" || form.IEGroup == "8e777b91-f3f9-4907-ba1a-2e0842967500")
            {
                form.Profit_GUID = "51BFDD3E-2253-4FBF-A946-19C18C25C6FC";
            }
            if (form.IEGroup == "d136bf9c-c3a3-4f33-ab1e-820526dcbc24")
            {
                form.Profit_GUID = "082CD9EB-9947-43C4-A7C6-F2B7FAB6EE54";
            }
            result = new IESvc().UpdExpenseRecord(form);
            if (result)
            {
                msg = General.Resource.Common.Success;
            }
            else
            {
                msg = General.Resource.Common.Failed;
            }
            return(string.Format("{{\"Result\":{0},\"Msg\":\"{1}\"}}"
                                 , result.ToString().ToLower(), msg));
        }
        public string GetSalaryCollectByID(string strPar)
        {
            string            C_GUID          = Session["CurrentCompanyGuid"].ToString();
            List <T_WageCost> wageCollectList = new List <T_WageCost>();

            wageCollectList = new IESvc().GetSalaryCollectById(strPar);
            return(new JavaScriptSerializer().Serialize(wageCollectList));
        }
        /// <summary>
        /// 获取一级费用科目分类的成本与费用比较
        /// </summary>
        /// <returns></returns>
        ///

        public string GetOnceClassifyCompareList(string InvType, string dateBegin, string dateEnd)
        {
            string            C_GUID = Session["CurrentCompanyGuid"].ToString();
            List <T_IERecord> Record = new List <T_IERecord>();

            Record = new IESvc().GetOnceClassifyCompareList(InvType, C_GUID, dateBegin, dateEnd);
            return(new JavaScriptSerializer().Serialize(Record));
        }
        public string GetIEVoucher(string rows, string page, string IE_GUID)
        {
            int count = 0;
            List <T_IERecord> List = new IESvc().GetVoucher(1, -1, out count, IE_GUID, "I");
            string            json = new JavaScriptSerializer().Serialize(List);

            return(json);
        }
        /// <summary>
        /// 获取已结转增值税数据
        /// </summary>
        /// <returns></returns>
        /// <remarks>
        /// </remarks>

        public string GetTaxReportIsend(string reportDate, string period, string isend)
        {
            string CId = CompanyId();

            List <Co_Tr_ThirdAccount> lst = IESvc.GetTaxReportIsend(CId, reportDate, period, isend);

            return(JsonConvert.SerializeObject(lst));
        }
        public string GetDetailZZHShui(string strPar)
        {
            string C_GUID = Session["CurrentCompanyGuid"].ToString();
            List <T_DetailTaxSettle> TaxDetailList = new List <T_DetailTaxSettle>();

            TaxDetailList = new IESvc().GetDetailZZHShui(strPar);
            return(new JavaScriptSerializer().Serialize(TaxDetailList));
        }
        public string GetTaxDetailInfoByRecID(string strPar, string taskDetailID)
        {
            string C_GUID = Session["CurrentCompanyGuid"].ToString();
            List <T_DetailTaxSettle> TaxDetailList = new List <T_DetailTaxSettle>();

            TaxDetailList = new IESvc().GetDetailTaxByRecID(strPar, taskDetailID);
            return(new JavaScriptSerializer().Serialize(TaxDetailList));
        }
        public string GetIETaxList(string Flag, string MounthDate)
        {
            string            C_GUID  = Session["CurrentCompanyGuid"].ToString();
            List <T_IERecord> IERcord = new List <T_IERecord>();

            IERcord = new IESvc().GetIETaxList(Flag, MounthDate, C_GUID);
            return(new JavaScriptSerializer().Serialize(IERcord));
        }
        public string GetTaxSettlement(string repDate, string Flag)
        {
            string C_GUID = Session["CurrentCompanyGuid"].ToString();
            List <T_TaxSettlement> TaxSetList = new List <T_TaxSettlement>();

            TaxSetList = new IESvc().GetTaxSettlement(repDate, C_GUID, Flag);
            return(new JavaScriptSerializer().Serialize(TaxSetList));
        }
        /// <summary>
        /// 获取增值税
        /// </summary>
        /// <returns></returns>
        /// <remarks>
        /// </remarks>
        public string GetTaxReportList(string reportDate, string type)
        {
            string CId = CompanyId();

            List <Co_Tr_ThirdAccount> lst = IESvc.GetTaxReportList(CId, reportDate, type);

            return(JsonConvert.SerializeObject(lst));
        }
        public string GetComIETaxList(string Year, string Quarter)
        {
            string            C_GUID  = Session["CurrentCompanyGuid"].ToString();
            List <T_IERecord> IERcord = new List <T_IERecord>();

            IERcord = new IESvc().GetComIETaxList(Year, Quarter, C_GUID);
            return(new JavaScriptSerializer().Serialize(IERcord));
        }
Пример #16
0
        public string GetIncomeRecord(string id)
        {
            string     C_GUID = Session["CurrentCompanyGuid"].ToString();
            T_IERecord rec    = new IESvc().GetIE(id, C_GUID);
            string     json   = new JavaScriptSerializer().Serialize(rec);

            return(json);
        }
        /// <summary>
        /// 获取营业税子类别特殊类别
        /// </summary>
        /// <param name="repDate"></param>
        /// <param name="Flag"></param>
        /// <returns></returns>
        public string GetSalesTaxDetail(string name)
        {
            string C_GUID = Session["CurrentCompanyGuid"].ToString();
            List <T_DetailedAccount> TaxSetList = new List <T_DetailedAccount>();

            TaxSetList = new IESvc().GetSalesTaxDetail(C_GUID, name);
            return(new JavaScriptSerializer().Serialize(TaxSetList));
        }
        public string CreatTaxSettlement(List <T_TaxSettlement> TaxList)
        {
            bool       result = false;
            ExceResult res    = new ExceResult();
            string     msg    = string.Empty;
            string     Flag   = null;
            string     C_GUID = Session["CurrentCompanyGuid"].ToString();

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required))
            {
                foreach (T_TaxSettlement tax in TaxList)
                {
                    if (string.IsNullOrEmpty(tax.GUID))
                    {
                        tax.GUID = Guid.NewGuid().ToString();
                    }
                    switch (tax.Flag)
                    {
                    case "增值税":
                        Flag = "TA";
                        break;

                    case "营业税金及附加":
                        Flag = "YT";
                        break;

                    case "所得税费用":
                        Flag = "CT";
                        break;

                    case "个人所得税":
                        Flag = "SA";
                        break;

                    default:
                        break;
                    }


                    result = new IESvc().CreateTaxSettlement(tax.GUID, tax.Rep_date, tax.Amount.ToString(), tax.Rep_status, C_GUID, Flag, tax.State, "期初");
                }
                if (result)
                {
                    scope.Complete();
                }
            }
            if (result)
            {
                res.success = true;
                msg         = General.Resource.Common.Success;
            }
            else
            {
                res.success = false;
                msg         = General.Resource.Common.Failed;
            }
            return(Newtonsoft.Json.JsonConvert.SerializeObject(res));
        }
Пример #19
0
        /// <summary>
        /// 获取收入纪录列表数据
        /// </summary>
        /// <param name="page">页索引</param>
        /// <param name="rows">页大小</param>
        /// <returns></returns>
        public string CancelIncomeList(string page, string rows, string dateBegin, string dateEnd, string customer, string state, string incomeGrp)
        {
            int count = 0;
            List <T_IERecord> recs = new IESvc().GetAllExpenseList(Session["CurrentCompanyGuid"].ToString(), int.Parse(page), int.Parse(rows), out count,
                                                                   dateBegin, dateEnd, customer, state, incomeGrp);

            return(string.Format("{{\"count\":{0},\"rows\":{1}}}",
                                 count, new JavaScriptSerializer().Serialize(recs)));
        }
        public string GetIEVoucher(string rows, string page, string IE_GUID)
        {
            string            C_GUID = Session["CurrentCompanyGuid"].ToString();
            int               count  = 0;
            List <T_IERecord> List   = new IESvc().GetVoucher(1, -1, out count, IE_GUID, "E");
            string            json   = new JavaScriptSerializer().Serialize(List);

            return(json);
        }
        public String GetIERecord(string rows, string page, string id)
        {
            string            C_GUID = Session["CurrentCompanyGuid"].ToString();
            int               count  = 0;
            List <T_IERecord> DC     = new List <T_IERecord>();

            DC = new IESvc().GetIERecord(1, -1, out count, id, C_GUID);
            return(new JavaScriptSerializer().Serialize(DC));
        }
        /// <summary>
        /// 查询供应商成本与费用汇总
        /// </summary>
        /// <returns></returns>
        public string GetSupplierTotalCollectList(int pageIndex = 1, int pageSize = 10)
        {
            int               count  = 0;
            string            C_GUID = Session["CurrentCompanyGuid"].ToString();
            List <T_IERecord> Record = new List <T_IERecord>();

            Record = new IESvc().GetSupplierTotalCollectList(C_GUID, pageIndex, -1, out count);
            return(new JavaScriptSerializer().Serialize(Record));
        }
        public string UpdWageCostsRecord(string id, string rper, decimal money, decimal money1, decimal money2, decimal money3, string invtype, string remark, string currency, string addstyle, DateTime date)
        {
            bool       result = false;
            string     msg    = string.Empty;
            T_IERecord Record = new T_IERecord();

            Record.Creator        = base.userData.LoginFullName;
            Record.C_GUID         = Session["CurrentCompany"].ToString();
            Record.IE_GUID        = id;
            Record.RPer           = rper;
            Record.AffirmDate     = date;
            Record.Date           = date;
            Record.SumAmount      = money;
            Record.InvType        = invtype;
            Record.IEGroup        = "1544d862-b1ab-42b8-9e97-9c2e1704665c";//工资类别guid
            Record.Remark         = remark;
            Record.Currency       = currency;
            Record.CreateDate     = DateTime.Now;
            Record.TaxationAmount = 0;
            Record.TaxationType   = "";
            Record.State          = "应付";
            Record.Profit_GUID    = "51BFDD3E-2253-4FBF-A946-19C18C25C6FC";

            T_WageCost WageCostRecord = new T_WageCost();

            WageCostRecord.W_GUID         = id;
            WageCostRecord.C_GUID         = Session["CurrentCompany"].ToString();
            WageCostRecord.Date           = date;
            WageCostRecord.Employee       = remark;
            WageCostRecord.Cash           = money1;
            WageCostRecord.PersonalTaxes  = money2;
            WageCostRecord.SocialSecurity = money3;
            WageCostRecord.Total          = money1 + money2 + money3;
            new IESvc().UpdWageCost(WageCostRecord);

            DateTime EditThreshold = DateTime.Parse(Session["EditThreshold"].ToString());

            if (Record.Date <= DateTime.Now && Record.Date >= EditThreshold)
            {
                result = new IESvc().UpdExpenseRecord(Record);
                if (result)
                {
                    msg = General.Resource.Common.Success;
                }
                else
                {
                    msg = General.Resource.Common.Failed;
                }
            }
            else
            {
                result = false;
                msg    = FMS.Resource.Finance.Finance.DateError;
            }
            return(string.Format("{{\"Result\":{0},\"Msg\":\"{1}\"}}"
                                 , result.ToString().ToLower(), msg));
        }
        /// <summary>
        /// 获取二级费用科目分类的成本与费用汇总行
        /// </summary>
        /// <returns></returns>
        public string GetSecondClassifyTotalCollectList(string IEGroup, string dateBegin, string dateEnd, int pageIndex = 1, int pageSize = 10)
        {
            int               count  = 0;
            string            C_GUID = Session["CurrentCompanyGuid"].ToString();
            List <T_IERecord> Record = new List <T_IERecord>();

            Record = new IESvc().GetSecondClassifyTotalCollectList(IEGroup, dateBegin, dateEnd, C_GUID, pageIndex, -1, out count);
            return(new JavaScriptSerializer().Serialize(Record));
        }
        /// <summary>
        /// 20180622 zm添加,获取工资明细
        /// </summary>
        /// <param name="rows"></param>
        /// <param name="page"></param>
        /// <param name="state"></param>
        /// <param name="id"></param>
        /// <returns></returns>

        public string GetWageCostInfonew(string SalaryName, string Name)
        {
            string                C_GUID  = Session["CurrentCompanyGuid"].ToString();
            StringBuilder         strJson = new StringBuilder();
            List <T_DetailSalary> List    = new List <T_DetailSalary>();

            List = new IESvc().GetWageCostInfonew(C_GUID, SalaryName, Name);
            return(new JavaScriptSerializer().Serialize(List));
        }
Пример #26
0
        /// <summary>
        /// 获取应收款列表数据
        /// </summary>
        /// <param name="page">页索引</param>
        /// <param name="rows">页大小</param>
        /// <returns></returns>
        public string GetReceivableList(string page, string rows)
        {
            int               count        = 0;
            string            strFormatter = "{{\"total\":\"{0}\",\"rows\":{1}}}";
            StringBuilder     strJson      = new StringBuilder();
            List <T_IERecord> recs         = new IESvc().GetReceivableList(Session["CurrentCompanyGuid"].ToString(), int.Parse(page), int.Parse(rows), out count);

            strJson.AppendFormat(strFormatter, count, new JavaScriptSerializer().Serialize(recs));
            return(strJson.ToString());
        }
        public string GetWageCostList(string rows, string page, string state, string id)
        {
            int               count   = 0;
            string            C_GUID  = Session["CurrentCompanyGuid"].ToString();
            StringBuilder     strJson = new StringBuilder();
            List <T_WageCost> List    = new List <T_WageCost>();

            List = new IESvc().GetWageCost(C_GUID, 1, -1, out count, state, id);
            return(new JavaScriptSerializer().Serialize(List));
        }
Пример #28
0
        /// <summary>
        /// 获取费用列表数据
        /// </summary>
        /// <param name="page">页索引</param>
        /// <param name="rows">页大小</param>
        /// <returns></returns>
        public string GetExpenseList(string page, string rows, string dateBegin, string dateEnd, string customer, string state, string incomeGrp, string IncomeGrpDts)
        {
            int               count        = 0;
            StringBuilder     strJson      = new StringBuilder();
            string            strFormatter = "{{\"total\":\"{0}\",\"rows\":{1}}}";
            List <T_IERecord> recs         = new IESvc().GetAllExpenseList(Session["CurrentCompany"].ToString(), int.Parse(page), int.Parse(rows), out count, dateBegin, dateEnd, customer, state, incomeGrp, IncomeGrpDts);

            strJson.AppendFormat(strFormatter, count, new JavaScriptSerializer().Serialize(recs));
            return(strJson.ToString());
        }
        public string GetDetailTaxList(string AffirmDate, string period)
        {
            int           count   = 0;
            StringBuilder strJson = new StringBuilder();

            List <T_DetailTaxSettle> List = new IESvc().GetDetailTaxList(Session["CurrentCompanyGuid"].ToString(), 1, -1, out count, AffirmDate, period);
            string json = new JavaScriptSerializer().Serialize(List);

            return(json);
        }
Пример #30
0
        /// <summary>
        /// 获取收入纪录列表数据Bootstraptable
        /// </summary>
        /// <param name="page">页索引</param>
        /// <param name="rows">页大小</param>
        /// <returns></returns>
        public string GetIncomeList_Bootstraptable(string dateBegin, string dateEnd, string zdateBegin, string zdateEnd, string customer, string state, string incomeGrp, string currency, string business_GUID, string subBusiness_GUID, string TaxationGUID, string MounthDate)
        {
            int           count   = 0;
            StringBuilder strJson = new StringBuilder();
            //string strFormatter = "{{\"total\":\"{0}\",\"rows\":{1}}}";//"{{\"count\":{0},\"rows\":{1}}}"
            List <T_IERecord> List = new IESvc().GetAllIncomeList(Session["CurrentCompanyGuid"].ToString(), 1, -1, out count, dateBegin, dateEnd, zdateBegin, zdateEnd, customer, state, incomeGrp, currency, business_GUID, subBusiness_GUID, TaxationGUID, MounthDate);
            string            json = new JavaScriptSerializer().Serialize(List);

            return(json);
        }