public string GetDSVoucher(string rows, string page, string GUID)
        {
            int count = 0;
            List <T_DeclareCostSpending> List = new DeclareCostSpendingSvc().GetDSVoucher(1, -1, out count, GUID);
            string json = new JavaScriptSerializer().Serialize(List);

            return(json);
        }
        public string GetPaymentDeclareCostSpending(string id)
        {
            string C_GUID             = Session["CurrentCompanyGuid"].ToString();
            T_DeclareCostSpending rev = new DeclareCostSpendingSvc().GetPaymentDeclareCostSpending(C_GUID, id);
            string json = new JavaScriptSerializer().Serialize(rev);

            return(json);
        }
        public string ChoosePaymentDeclareSupplierList(string rows, string page, string invtype)
        {
            int           count               = 0;
            string        C_GUID              = Session["CurrentCompany"].ToString();
            string        strFormatter        = "{{\"total\":\"{0}\",\"rows\":{1}}}";
            StringBuilder strJson             = new StringBuilder();
            List <T_DeclareCostSpending> List = new List <T_DeclareCostSpending>();

            List = new DeclareCostSpendingSvc().ChoosePaymentDeclare(C_GUID, int.Parse(page), int.Parse(rows), out count, invtype);
            strJson.AppendFormat(strFormatter, count, new JavaScriptSerializer().Serialize(List));
            return(strJson.ToString());
        }
        public string GetList(string rows, string page, string dateBegin, string dateEnd, string paymentGrp, string state = null)
        {
            int           count               = 0;
            string        C_GUID              = Session["CurrentCompany"].ToString();
            string        strFormatter        = "{{\"total\":\"{0}\",\"rows\":{1}}}";
            StringBuilder strJson             = new StringBuilder();
            List <T_DeclareCostSpending> List = new List <T_DeclareCostSpending>();

            List = new DeclareCostSpendingSvc().GetList(int.Parse(page), int.Parse(rows), C_GUID, dateBegin, dateEnd, paymentGrp, state, out count);
            strJson.AppendFormat(strFormatter, count, new JavaScriptSerializer().Serialize(List));
            return(strJson.ToString());
        }
Exemplo n.º 5
0
        /// <summary>
        /// 获取费用列表
        /// </summary>
        /// <param name="rows">页大小</param>
        /// <param name="page">页索引</param>
        /// <returns></returns>
        public string GetPaymentDeclareCostSpendingList(string rows, string page, string dateBegin, string dateEnd, string customer, string incomeGrp, string currency, string state, string invtype, string record, string business_GUID, string subBusiness_GUID, string remark)
        {
            int    count  = 0;
            string C_GUID = Session["CurrentCompanyGuid"].ToString();
            // string strFormatter = "{{\"total\":\"{0}\",\"rows\":{1}}}";
            StringBuilder strJson             = new StringBuilder();
            List <T_DeclareCostSpending> List = new List <T_DeclareCostSpending>();

            List = new DeclareCostSpendingSvc().GetPaymentDeclareCostSpendingList(C_GUID, 1, -1, out count, dateBegin, dateEnd, customer, incomeGrp, currency, state, invtype, record, business_GUID, subBusiness_GUID, remark);
            strJson.Append(new JavaScriptSerializer().Serialize(List));
            return(strJson.ToString());
        }
        /// <summary>
        /// 获取收款纪录列表
        /// </summary>
        /// <returns></returns>
        public string GetDeclareCostSpendingRecordList(string rows, string page, string BA_GUID)
        {
            int           count   = 0;
            string        C_GUID  = Session["CurrentCompanyGuid"].ToString();
            StringBuilder strJson = new StringBuilder();
            List <T_DeclareCostSpending> RecPayRecord = new List <T_DeclareCostSpending>();

            RecPayRecord = new DeclareCostSpendingSvc().GetDeclareCostSpendingRecordList(C_GUID, 1, -1, out count, BA_GUID);
            string json = new JavaScriptSerializer().Serialize(RecPayRecord);

            return(json);
        }
        /// <summary>
        /// 更改状态
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public string UpdState(string id, string state)
        {
            bool   result = new DeclareCostSpendingSvc().UpdState(id, state);
            string msg    = string.Empty;

            if (result)
            {
                msg = General.Resource.Common.Success;
            }
            else
            {
                msg = General.Resource.Common.Failed;
            }
            return(string.Format("{{\"Result\":{0},\"Msg\":\"{1}\"}}"
                                 , result.ToString().ToLower(), msg));
        }
        /// <summary>
        /// 新增申报预收客户款记录
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        public string UpdPaymentDeclareCostSpending(T_DeclareCostSpending form)
        {
            bool   result = false;
            string msg    = string.Empty;

            form.C_GUID = Session["CurrentCompany"].ToString();
            result      = new DeclareCostSpendingSvc().UpdPaymentDeclareCostSpending(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));
        }
Exemplo n.º 9
0
        /// <summary>
        /// 修改申报成本外支出记录
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        public string UpdaDeclareCostSpending(T_DeclareCostSpending form)
        {
            bool   result = false;
            string msg    = string.Empty;

            if (form.InvType == "预付供应商")
            {
                form.Profit_GUID = "88C60FC8-2FCB-41CD-B721-C58A981961B0";
            }
            if (form.InvType == "支付押金和暂支借款")
            {
                form.Profit_GUID = "4F380EB2-C1BC-483C-B229-A7FAEA03D054";
            }
            if (form.InvType == "分配股利、利润")
            {
                form.Profit_GUID = "1F500FDD-1460-45DC-BE8F-39F5ACCE5D95";
            }
            if (form.InvType == "投资支出")
            {
                form.Profit_GUID = "6AE7EF4C-1E46-4839-951A-6514CAF6F6A1";
            }
            if (form.InvType == "直接物料采购" || form.InvType == "间接物料采购")
            {
                form.Profit_GUID = "41C968F2-7D51-4F9F-83B6-EC0F4381ECD0";
            }
            if (form.InvType == "资产采购")
            {
                form.Profit_GUID = "B1F44906-51D6-47F4-B6EC-7B678B5E7CD5";
            }
            result = new DeclareCostSpendingSvc().UpdaDeclareCostSpending(form);
            if (result)
            {
                msg = General.Resource.Common.Success;
            }
            else
            {
                msg = General.Resource.Common.Failed;
            }
            return(msg);
        }
Exemplo n.º 10
0
        public string CreateIntRecord(List <T_DeclareCostSpending> DeclareCostList)
        {
            bool   result = false;
            string msg    = string.Empty;

            foreach (T_DeclareCostSpending form in DeclareCostList)
            {
                form.C_GUID   = Session["CurrentCompanyGuid"].ToString();
                form.Currency = Session["Currency"].ToString();
                result        = new DeclareCostSpendingSvc().UpdPayDSFL(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));
        }
Exemplo n.º 11
0
        public string UpdInCome(List <T_IERecord> IEList)
        {
            bool   result = false;
            string msg    = string.Empty;

            foreach (T_IERecord ieRecord in IEList)
            {
                ieRecord.C_GUID   = Session["CurrentCompanyGuid"].ToString();
                ieRecord.Creator  = base.userData.LoginFullName;
                ieRecord.Currency = Session["Currency"].ToString();
                switch (ieRecord.InvType)
                {
                case "主营业务收入":
                    ieRecord.Profit_Name = "主营业务收入";
                    ieRecord.RPInvType   = "经营活动收款";
                    ieRecord.InvTypeDts  = "销售商品/提供服务的收款";
                    ieRecord.CFItemGuid  = "97B181C8-D807-4BF0-8D8D-B23273E7FEFE";
                    break;

                case "其他业务收入":
                    ieRecord.Profit_Name = "其他业务收入";
                    ieRecord.RPInvType   = "经营活动收款";
                    ieRecord.InvTypeDts  = "其他业务收入的收款";
                    ieRecord.CFItemGuid  = "F6330595-F588-46B0-8998-752C7A1D774B";
                    break;

                case "营业外收入":
                    ieRecord.Profit_Name = "营业外收入";
                    ieRecord.RPInvType   = "经营活动收款";
                    ieRecord.InvTypeDts  = "营业外收入的收款";
                    ieRecord.CFItemGuid  = "F6330595-F588-46B0-8998-752C7A1D774B";
                    break;

                case "预收客户款":
                    ieRecord.Profit_Name = "预收账款";
                    ieRecord.RPInvType   = "经营活动收款";
                    ieRecord.InvTypeDts  = "预收客户账款";
                    ieRecord.CFItemGuid  = "F6330595-F588-46B0-8998-752C7A1D774B";
                    break;

                case "收回公司支出的暂支借款":
                    ieRecord.Profit_Name = "备用金";
                    ieRecord.RPInvType   = "经营活动收款";
                    ieRecord.InvTypeDts  = "收回公司支出的暂支借款";
                    ieRecord.CFItemGuid  = "F6330595-F588-46B0-8998-752C7A1D774B";
                    break;

                case "收回公司支出的押金":
                    ieRecord.Profit_Name = "其他应收款";
                    ieRecord.RPInvType   = "经营活动收款";
                    ieRecord.InvTypeDts  = "收回公司支出的押金";
                    ieRecord.CFItemGuid  = "F6330595-F588-46B0-8998-752C7A1D774B";
                    break;

                case "收到的其它公司支付的押金":
                    ieRecord.Profit_Name = "其他应付款";
                    ieRecord.RPInvType   = "经营活动收款";
                    ieRecord.InvTypeDts  = "收到的其它公司支付的押金";
                    ieRecord.CFItemGuid  = "F6330595-F588-46B0-8998-752C7A1D774B";
                    break;

                case "投资收益":
                    ieRecord.Profit_Name = "投资收益";
                    ieRecord.RPInvType   = "投资活动收款";
                    if (ieRecord.DetailInvtype == "利息")
                    {
                        ieRecord.InvTypeDts = "取得投资收益的利息的收款";
                    }
                    if (ieRecord.DetailInvtype == "股利")
                    {
                        ieRecord.InvTypeDts = "取得投资收益的股利的收款";
                    }
                    ieRecord.CFItemGuid = "C55B2A4E-129B-407B-AC0B-14C091587D45";
                    break;

                case "主营业务成本":
                    ieRecord.Profit_Name = "主营业务成本";
                    ieRecord.InvType     = "营业成本";
                    ieRecord.RPInvType   = "经营活动付款";
                    ieRecord.InvTypeDts  = "购买商品、接受服务所支付的款";
                    ieRecord.CFItemGuid  = "0526C862-F238-4301-A198-E7EC83A645D5";
                    break;

                case "销售费用":
                    ieRecord.Profit_Name = "销售费用";
                    ieRecord.RPInvType   = "经营活动付款";
                    ieRecord.InvTypeDts  = "支付销售费用";
                    ieRecord.CFItemGuid  = "DE7D81B9-680B-4011-A771-C8B327A549E7";
                    break;

                case "财务费用":
                    ieRecord.Profit_Name = "财务费用";
                    ieRecord.RPInvType   = "经营活动付款";
                    ieRecord.InvTypeDts  = "支付财务费用";
                    ieRecord.CFItemGuid  = "DE7D81B9-680B-4011-A771-C8B327A549E7";
                    break;

                case "管理费用":
                    ieRecord.Profit_Name = "管理费用";
                    ieRecord.RPInvType   = "经营活动付款";
                    ieRecord.InvTypeDts  = "支付管理费用";
                    ieRecord.CFItemGuid  = "DE7D81B9-680B-4011-A771-C8B327A549E7";
                    break;

                case "其他业务成本":
                    ieRecord.Profit_Name = "其他业务成本";
                    ieRecord.RPInvType   = "经营活动付款";
                    ieRecord.InvTypeDts  = "支付其他业务成本";
                    ieRecord.CFItemGuid  = "DE7D81B9-680B-4011-A771-C8B327A549E7";
                    break;

                case "营业外支出":
                    ieRecord.Profit_Name = "营业外支出";
                    ieRecord.RPInvType   = "经营活动付款";
                    ieRecord.InvTypeDts  = "支付营业外支出";
                    ieRecord.CFItemGuid  = "DE7D81B9-680B-4011-A771-C8B327A549E7";
                    break;

                case "预付供应商":
                    ieRecord.Profit_Name = "预付账款";
                    ieRecord.RPInvType   = "经营活动付款";
                    ieRecord.InvTypeDts  = "预付供应商账款";
                    ieRecord.CFItemGuid  = "DE7D81B9-680B-4011-A771-C8B327A549E7";
                    break;

                case "支付押金":
                    ieRecord.Profit_Name = "其他应收款";
                    ieRecord.RPInvType   = "经营活动付款";
                    ieRecord.InvTypeDts  = "支付押金";
                    ieRecord.CFItemGuid  = "DE7D81B9-680B-4011-A771-C8B327A549E7";
                    break;

                case "支付暂支借款":
                    ieRecord.Profit_Name = "备用金";
                    ieRecord.RPInvType   = "经营活动付款";
                    ieRecord.InvTypeDts  = "支付暂支借款";
                    ieRecord.CFItemGuid  = "DE7D81B9-680B-4011-A771-C8B327A549E7";
                    break;

                case "归还其它公司支付的押金":
                    ieRecord.Profit_Name = "其他应付款";
                    ieRecord.RPInvType   = "经营活动付款";
                    ieRecord.InvTypeDts  = "归还其它公司支付的押金";
                    ieRecord.CFItemGuid  = "DE7D81B9-680B-4011-A771-C8B327A549E7";
                    break;

                case "分配股利、利润":
                    ieRecord.Profit_Name = "预付账款";
                    ieRecord.RPInvType   = "经营活动付款";
                    ieRecord.InvTypeDts  = "支付其他与经营活动有关的款";
                    ieRecord.CFItemGuid  = "DE7D81B9-680B-4011-A771-C8B327A549E7";
                    break;

                case "短期投资支出":
                    ieRecord.Profit_Name = "短期投资";
                    ieRecord.RPInvType   = "投资活动付款";
                    ieRecord.InvTypeDts  = "短期投资支出";
                    ieRecord.CFItemGuid  = "049F1C6D-49EA-4E2D-93FD-2DABEBED666C";
                    break;

                case "收回短期投资的本金金额内的款":
                    ieRecord.Profit_Name = "短期投资";
                    ieRecord.RPInvType   = "投资活动收款";
                    ieRecord.InvTypeDts  = "收回短期投资的本金金额内的款";
                    ieRecord.CFItemGuid  = "496F9D4D-F71B-437A-9EA0-26107D3449C3";
                    break;

                case "长期股权投资支出":
                    ieRecord.Profit_Name = "长期股权投资";
                    ieRecord.RPInvType   = "投资活动付款";
                    ieRecord.InvTypeDts  = "投资所支付款";
                    ieRecord.CFItemGuid  = "049F1C6D-49EA-4E2D-93FD-2DABEBED666C";
                    break;

                case "长期债权投资支出":
                    ieRecord.Profit_Name = "长期债权投资";
                    ieRecord.RPInvType   = "投资活动付款";
                    ieRecord.InvTypeDts  = "长期债权投资支出";
                    ieRecord.CFItemGuid  = "049F1C6D-49EA-4E2D-93FD-2DABEBED666C";
                    break;

                case "收回长期债券投资的本金金额内的款":
                    ieRecord.Profit_Name = "长期债权投资";
                    ieRecord.RPInvType   = "投资活动收款款";
                    ieRecord.InvTypeDts  = "收回长期债券投资的本金金额内的款";
                    ieRecord.CFItemGuid  = "496F9D4D-F71B-437A-9EA0-26107D3449C3";
                    break;

                case "归还短期借款所支付的款":
                    ieRecord.Profit_Name = "短期借款";
                    ieRecord.RPInvType   = "筹资活动付款";
                    ieRecord.InvTypeDts  = "归还短期借款所支付的款";
                    ieRecord.CFItemGuid  = "DD7BCD86-150E-4E62-B6CC-21EF341B41F1";
                    break;

                case "归还长期借款所支付的款":
                    ieRecord.Profit_Name = "长期借款";
                    ieRecord.RPInvType   = "筹资活动付款";
                    ieRecord.InvTypeDts  = "归还长期借款所支付的款";
                    ieRecord.CFItemGuid  = "DD7BCD86-150E-4E62-B6CC-21EF341B41F1";
                    break;

                case "收取投资款(注册资本金额以内部分)":
                    ieRecord.Profit_Name = "实收资本";
                    ieRecord.RPInvType   = "筹资活动收款";
                    ieRecord.InvTypeDts  = "吸收投资的收款(注册资本金额以内部分)";
                    ieRecord.CFItemGuid  = "77A24D5F-3E0C-4211-A552-191FEE0E06FD";
                    break;

                case "收取投资款(超出注册资本金额部分)":
                    ieRecord.Profit_Name = "资本公积";
                    ieRecord.RPInvType   = "筹资活动收款";
                    ieRecord.InvTypeDts  = "吸收投资的收款(超出注册资本金额部分)";
                    ieRecord.CFItemGuid  = "77A24D5F-3E0C-4211-A552-191FEE0E06FD";
                    break;

                case "短期借款所获得的收款":
                    ieRecord.Profit_Name = "短期借款";
                    ieRecord.RPInvType   = "筹资活动收款";
                    ieRecord.InvTypeDts  = "短期借款所获得的收款";
                    ieRecord.CFItemGuid  = "AD2E5437-0917-43E1-807C-41CA6751360F";
                    break;

                case "长期借款所获得的收款":
                    ieRecord.Profit_Name = "长期借款";
                    ieRecord.RPInvType   = "筹资活动收款";
                    ieRecord.InvTypeDts  = "长期借款所获得的收款";
                    ieRecord.CFItemGuid  = "AD2E5437-0917-43E1-807C-41CA6751360F";
                    break;

                case "其他与筹资活动有关的收款":
                    ieRecord.Profit_Name = "其他应付款";
                    ieRecord.RPInvType   = "筹资活动收款";
                    ieRecord.InvTypeDts  = "其他与筹资活动有关的收款";
                    ieRecord.CFItemGuid  = "106B9F2C-24A5-48B5-9621-418D00A7A75A";
                    break;


                default:
                    break;
                }



                if (string.IsNullOrEmpty(ieRecord.RP_GUID))
                {
                    if (ieRecord.IE_Flag == "I")
                    {
                        result = new IESvc().UpdIncomeRecord(ieRecord);
                    }
                    if (ieRecord.IE_Flag == "E")
                    {
                        result = new IESvc().UpdExpenseRecord(ieRecord);
                    }
                    if (ieRecord.IE_Flag == "DS")
                    {
                        ieRecord.Record = "未记录";
                        result          = new DeclareCostSpendingSvc().UpdV(ieRecord);
                    }
                    if (ieRecord.IE_Flag == "DC")
                    {
                        if (ieRecord.Profit_Name == "长期借款" || ieRecord.Profit_Name == "短期借款")
                        {
                            ieRecord.Record = "未还款";
                        }
                        else
                        {
                            ieRecord.Record = "未记录";
                        }
                        result = new DeclareCustomerSvc().UpdV(ieRecord);
                    }


                    if (result)
                    {
                        msg = General.Resource.Common.Success;
                    }
                    else
                    {
                        msg = General.Resource.Common.Failed;
                    }
                }
                else
                {
                    if (ieRecord.IE_Flag == "I")
                    {
                        result = new IESvc().UpdIncomeRecord(ieRecord);
                    }
                    if (ieRecord.IE_Flag == "E")
                    {
                        result = new IESvc().UpdExpenseRecord(ieRecord);
                    }
                    if (ieRecord.IE_Flag == "DS")
                    {
                        result = new DeclareCostSpendingSvc().UpdV(ieRecord);
                    }
                    if (ieRecord.IE_Flag == "DC")
                    {
                        result = new DeclareCustomerSvc().UpdV(ieRecord);
                    }
                    if (result)
                    {
                        ieRecord.Record    = "已销账";
                        ieRecord.DisAmount = 0;
                        if (ieRecord.IE_Flag == "I" || ieRecord.IE_Flag == "DC")
                        {
                            ieRecord.RP_Flag = "R";
                        }
                        if (ieRecord.IE_Flag == "E" || ieRecord.IE_Flag == "DS")
                        {
                            ieRecord.RP_Flag = "P";
                        }

                        ieRecord.Creator = base.userData.LoginFullName;
                        ieRecord.C_GUID  = Session["CurrentCompanyGuid"].ToString();
                        if (!string.IsNullOrEmpty(ieRecord.BA_GUID))
                        {
                            if (ieRecord.BA_GUID != "1")
                            {
                                T_BankAccount ba = new BankAccountSvc().GetBank(Session["CurrentCompanyGuid"].ToString(), null, ieRecord.BA_GUID, null);
                                ieRecord.B_GUID  = ba.B_GUID;
                                ieRecord.BA_GUID = ba.BA_GUID;
                            }
                        }
                        result = new RecPayRecordSvc().UpdVoucherIERP(ieRecord.IE_GUID, ieRecord.RP_GUID, ieRecord.bankAmount, ieRecord.RP_Flag, ieRecord.IE_Flag, ieRecord.RPLA_GUID.Trim(), ieRecord.IELA_GUID, ieRecord.C_GUID);
                        if (result)
                        {
                            result = new IESvc().UpdRecPayRecord(ieRecord);
                            if (result)
                            {
                                msg = General.Resource.Common.Success;
                            }
                            else
                            {
                                msg = General.Resource.Common.Failed;
                            }
                        }
                    }
                }
            }

            return(string.Format("{{\"Result\":{0},\"Msg\":\"{1}\"}}"
                                 , result.ToString().ToLower(), msg));
        }
Exemplo n.º 12
0
        public string CreatPDRecord(List <T_DeclareCostSpending> payList)
        {
            bool   result = false;
            string msg    = string.Empty;

            foreach (T_DeclareCostSpending dc in payList)
            {
                dc.C_GUID = Session["CurrentCompanyGuid"].ToString();
                if (dc.InvType == "预付供应商账款")
                {
                    dc.Profit_Name = "预付账款";
                }
                if (dc.InvType == "支付押金")
                {
                    dc.Profit_Name = "其他应收款";
                }
                if (dc.InvType == "支付暂支借款")
                {
                    dc.Profit_GUID = "备用金";
                }
                if (dc.InvType == "归还短期借款所支付的款")
                {
                    dc.Profit_Name = "短期借款";
                }
                if (dc.InvType == "归还长期借款所支付的款")
                {
                    dc.Profit_Name = "长期借款";
                }
                if (dc.InvType == "归还其它公司支付的押金")
                {
                    dc.Profit_Name = "其他应付款";
                }
                if (dc.InvType == "分配利润、股利所支付的款")
                {
                    dc.Profit_Name = "应付利润";
                }
                if (dc.InvType == "短期投资支出")
                {
                    dc.Profit_Name = "短期投资支出";
                }
                if (dc.InvType == "长期股权投资支出")
                {
                    dc.Profit_Name = "长期股权投资支出";
                }
                if (dc.InvType == "长期债券投资支出")
                {
                    dc.Profit_Name = "长期债券投资支出";
                }
                if (dc.InvType == "直接物料采购" || dc.InvType == "间接物料采购")
                {
                    dc.Profit_GUID = "41C968F2-7D51-4F9F-83B6-EC0F4381ECD0";
                }
                if (dc.InvType == "资产采购")
                {
                    dc.Profit_GUID = "B1F44906-51D6-47F4-B6EC-7B678B5E7CD5";
                }
                DateTime EditThreshold = DateTime.Parse(Session["EditThreshold"].ToString());
                if (DateTime.Parse(dc.Date) <= DateTime.Now && DateTime.Parse(dc.Date) >= EditThreshold)
                {
                    result = new DeclareCostSpendingSvc().UpdPaymentDeclareCostSpending(dc);
                    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));
        }
Exemplo n.º 13
0
        /// <summary>
        /// 新增申报成本外支出记录
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        public string UpdPaymentDeclareCostSpending(T_DeclareCostSpending form)
        {
            bool   result = false;
            string msg    = string.Empty;

            form.C_GUID = Session["CurrentCompanyGuid"].ToString();
            if (form.InvType == "预付供应商账款")
            {
                form.Profit_Name = "预付账款";
            }
            if (form.InvType == "支付押金")
            {
                form.Profit_Name = "其他应收款";
            }
            if (form.InvType == "支付暂支借款")
            {
                form.Profit_Name = "备用金";
            }
            if (form.InvType == "归还短期借款所支付的款")
            {
                form.Profit_Name = "短期借款";
            }
            if (form.InvType == "归还长期借款所支付的款")
            {
                form.Profit_Name = "长期借款";
            }
            if (form.InvType == "归还其它公司支付的押金")
            {
                form.Profit_Name = "其他应付款";
            }
            if (form.InvType == "分配利润、股利所支付的款")
            {
                form.Profit_Name = "应付利润";
            }
            if (form.InvType == "短期投资支出")
            {
                form.Profit_Name = "短期投资支出";
            }
            if (form.InvType == "长期股权投资支出")
            {
                form.Profit_Name = "长期股权投资支出";
            }
            if (form.InvType == "长期债券投资支出")
            {
                form.Profit_Name = "长期债券投资支出";
            }
            if (form.InvType == "直接物料采购" || form.InvType == "间接物料采购")
            {
                form.Profit_Name = "41C968F2-7D51-4F9F-83B6-EC0F4381ECD0";
            }
            if (form.InvType == "资产采购")
            {
                form.Profit_Name = "B1F44906-51D6-47F4-B6EC-7B678B5E7CD5";
            }
            result = new DeclareCostSpendingSvc().UpdPaymentDeclareCostSpending(form);
            if (result)
            {
                msg = General.Resource.Common.Success;
            }
            else
            {
                msg = General.Resource.Common.Failed;
            }
            return(msg);
        }