/// <summary> /// 计入借款 /// </summary> /// <param name="payList"></param> /// <returns></returns> public string CreatPDRecord(List <T_DeclareCustomer> payList) { bool result = false; string msg = string.Empty; foreach (T_DeclareCustomer dc in payList) { dc.C_GUID = Session["CurrentCompanyGuid"].ToString(); //dc.Profit_GUID = "79C23856-8E3C-4AC8-905C-7681C1D1F565"; DateTime EditThreshold = DateTime.Parse(Session["EditThreshold"].ToString()); if (DateTime.Parse(dc.Date) <= DateTime.Now && DateTime.Parse(dc.Date) >= EditThreshold) { result = new DeclareCustomerSvc().UpdDCostSpending(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)); }
public string GetDCVoucher(string rows, string page, string GUID) { int count = 0; List <T_DeclareCustomer> List = new DeclareCustomerSvc().GetDCVoucher(1, -1, out count, GUID); string json = new JavaScriptSerializer().Serialize(List); return(json); }
/// <summary> /// 获取申报 /// </summary> /// <param name="rows">页大小</param> /// <param name="page">页索引</param> /// <returns></returns> public string GetReceivablesDeclareCustomerList(string rows, string page, string invtype = null, string state = null) { int count = 0; string C_GUID = Session["CurrentCompany"].ToString(); string strFormatter = "{{\"total\":\"{0}\",\"rows\":{1}}}"; StringBuilder strJson = new StringBuilder(); List <T_DeclareCustomer> List = new List <T_DeclareCustomer>(); List = new DeclareCustomerSvc().GetReceivablesDeclareCustomerList(C_GUID, int.Parse(page), int.Parse(rows), out count, invtype, state); strJson.AppendFormat(strFormatter, count, new JavaScriptSerializer().Serialize(List)); return(strJson.ToString()); }
/// <summary> /// 获取收款纪录列表 /// </summary> /// <returns></returns> public string GetRevenueCollectionRecordList(string rows, string page, string BA_GUID) { int count = 0; string C_GUID = Session["CurrentCompanyGuid"].ToString(); StringBuilder strJson = new StringBuilder(); List <T_DeclareCustomer> RecPayRecord = new List <T_DeclareCustomer>(); RecPayRecord = new DeclareCustomerSvc().GetRevenueCollectionRecordList(C_GUID, 1, -1, out count, BA_GUID); string json = new JavaScriptSerializer().Serialize(RecPayRecord); return(json); }
public string ChooseReceivablesDeclareCustomerList(string rows, string page, string state, string invtype, string flag, string customer, string record) { int count = 0; string C_GUID = Session["CurrentCompanyGuid"].ToString(); //string strFormatter = "{{\"total\":\"{0}\",\"rows\":{1}}}"; StringBuilder strJson = new StringBuilder(); List <T_DeclareCustomer> List = new List <T_DeclareCustomer>(); List = new DeclareCustomerSvc().ChooseReceivablesDeclareCustomerList(C_GUID, 1, -1, out count, state, invtype, flag, customer, record); string json = new JavaScriptSerializer().Serialize(List); return(json); }
public string GetReceivablesDeclareCustomerList(string dateBegin, string dateEnd, string customer, string state, string incomeGrp, string currency, string business_GUID, string subBusiness_GUID) { int count = 0; string C_GUID = Session["CurrentCompanyGuid"].ToString(); //string strFormatter = "{{\"total\":\"{0}\",\"rows\":{1}}}"; StringBuilder strJson = new StringBuilder(); List <T_DeclareCustomer> List = new List <T_DeclareCustomer>(); List = new DeclareCustomerSvc().GetReceivablesDeclareCustomerList(C_GUID, 1, -1, out count, dateBegin, dateEnd, customer, state, incomeGrp, currency, business_GUID, subBusiness_GUID); string json = new JavaScriptSerializer().Serialize(List); //strJson.AppendFormat(strFormatter, count, new JavaScriptSerializer().Serialize(List)); // return strJson.ToString(); return(json); }
public string GetReceivablesDeclareCustomerListTop() { int count = 0; string C_GUID = Session["CurrentCompanyGuid"].ToString(); //string strFormatter = "{{\"total\":\"{0}\",\"rows\":{1}}}"; StringBuilder strJson = new StringBuilder(); List <T_DeclareCustomer> List = new List <T_DeclareCustomer>(); List = new DeclareCustomerSvc().GetReceivablesDeclareCustomerListTop(C_GUID, out count); string json = new JavaScriptSerializer().Serialize(List); //strJson.AppendFormat(strFormatter, count, new JavaScriptSerializer().Serialize(List)); // return strJson.ToString(); return(json); }
/// <summary> /// 更改状态 /// </summary> /// <param name="id">收入纪录标识</param> /// <returns></returns> public string UpdState(string id, string state) { bool result = new DeclareCustomerSvc().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 UpdaDeclareCustomer(T_DeclareCustomer form) { bool result = false; string msg = string.Empty; result = new DeclareCustomerSvc().UpdaDeclareCustomer(form); if (result) { msg = General.Resource.Common.Success; } else { msg = General.Resource.Common.Failed; } return(msg); }
/// <summary> /// 新增申报预收客户款记录 /// </summary> /// <param name="form"></param> /// <returns></returns> public string UpdReceivablesDeclareCustomer(T_DeclareCustomer form) { bool result = false; string msg = string.Empty; form.C_GUID = Session["CurrentCompany"].ToString(); result = new DeclareCustomerSvc().UpdReceivablesDeclareCustomer(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 CreateIntRecord(List <T_DeclareCustomer> DCustomerList) { bool result = false; string msg = string.Empty; foreach (T_DeclareCustomer form in DCustomerList) { form.C_GUID = Session["CurrentCompanyGuid"].ToString(); form.Currency = Session["Currency"].ToString(); result = new DeclareCustomerSvc().UpdPayDCFL(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 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)); }
public string CreatRDRecord(List <T_DeclareCustomer> payList) { bool result = false; string msg = string.Empty; foreach (T_DeclareCustomer 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_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.Profit_Name = "短期借款"; } if (dc.InvType == "长期借款所获得的收款") { dc.Profit_Name = "长期借款"; } DateTime EditThreshold = DateTime.Parse(Session["EditThreshold"].ToString()); if (DateTime.Parse(dc.Date) <= DateTime.Now && DateTime.Parse(dc.Date) >= EditThreshold) { result = new DeclareCustomerSvc().UpdReceivablesDeclareCustomer(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)); }
/// <summary> /// 新增申报预收客户款记录 /// </summary> /// <param name="form"></param> /// <returns></returns> public string UpdReceivablesDeclareCustomer(T_DeclareCustomer 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.Profit_Name = "长期借款"; } if (form.InvType == "其他与筹资活动有关的收款") { form.Profit_Name = "其他应付款"; } result = new DeclareCustomerSvc().UpdReceivablesDeclareCustomer(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)); }