Commit 3c1f93ae by guanzhenshan

修复导出凭证没有显示汇率,去掉#号的问题

parent 1585ff04
...@@ -49,6 +49,8 @@ namespace Bailun.DC.Models.Report ...@@ -49,6 +49,8 @@ namespace Bailun.DC.Models.Report
/// 币种名称 /// 币种名称
/// </summary> /// </summary>
public string currencyname { get; set; } public string currencyname { get; set; }
public string text { get; set; }
} }
......
...@@ -2305,8 +2305,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -2305,8 +2305,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var obj = new Services.FinanceReportServices().ListFinanceManageCost(start, end, "", "", "", paycompanyid); var obj = new Services.FinanceReportServices().ListFinanceManageCost(start, end, "", "", "", paycompanyid);
var colNames = new List<string> {"费用单号","部门名称","付款主体名称","费用类别", "管理成本", var colNames = new List<string> {"费用单号","部门名称","付款主体名称","费用类别", "会计科目",
"金额","币种", "人民币金额","收款单位","收款理由","付款时间" }; "金额","币种", "人民币金额","收款单位","收款理由","付款时间",
"备注" };
var list = new List<string>(); var list = new List<string>();
foreach (var item in obj) foreach (var item in obj)
...@@ -10321,54 +10322,54 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -10321,54 +10322,54 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var listPlatformSettings = new List<mPlatformAccountingSetting> var listPlatformSettings = new List<mPlatformAccountingSetting>
{ {
new mPlatformAccountingSetting{ platform_type="Aliexpress",cert_id="700",creator = "张滢萍",subject_no="1122",customer_no="02054",currency="USD",currencyname="美元",website="Global"}, new mPlatformAccountingSetting{ platform_type="Aliexpress",cert_id="700",creator = "张滢萍",subject_no="1122",customer_no="02054",currency="USD",currencyname="美元",website="Global",text="速卖通平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Lazada",cert_id="701",creator = "张滢萍",subject_no="1122",customer_no="06006",currency="PHP",currencyname="菲律宾比索",website="PH"}, new mPlatformAccountingSetting{ platform_type="Lazada",cert_id="701",creator = "张滢萍",subject_no="1122",customer_no="06006",currency="PHP",currencyname="菲律宾比索",website="PH",text="lazada平台菲律宾站点发货确认收入(PH)"},
new mPlatformAccountingSetting{ platform_type="Lazada",cert_id="702",creator = "张滢萍",subject_no="1122",customer_no="06007",currency="MYR",currencyname="马来西亚-林吉特",website="MY"}, new mPlatformAccountingSetting{ platform_type="Lazada",cert_id="702",creator = "张滢萍",subject_no="1122",customer_no="06007",currency="MYR",currencyname="马来西亚-林吉特",website="MY",text="lazada平台马来西亚站点发货确认收入(MY)"},
new mPlatformAccountingSetting{ platform_type="Lazada",cert_id="703",creator = "张滢萍",subject_no="1122",customer_no="06008",currency="THB",currencyname="泰铢",website="TH"}, new mPlatformAccountingSetting{ platform_type="Lazada",cert_id="703",creator = "张滢萍",subject_no="1122",customer_no="06008",currency="THB",currencyname="泰铢",website="TH",text="lazada平台泰国站点发货确认收入(TH)"},
new mPlatformAccountingSetting{ platform_type="Lazada",cert_id="704",creator = "张滢萍",subject_no="1122",customer_no="06009",currency="SGD",currencyname="新加坡元",website="SG"}, new mPlatformAccountingSetting{ platform_type="Lazada",cert_id="704",creator = "张滢萍",subject_no="1122",customer_no="06009",currency="SGD",currencyname="新加坡元",website="SG",text="lazada平台新加坡站点发货确认收入(SG)"},
new mPlatformAccountingSetting{ platform_type="Lazada",cert_id="705",creator = "张滢萍",subject_no="1122",customer_no="06010",currency="IDR",currencyname="印尼卢比",website="ID"}, new mPlatformAccountingSetting{ platform_type="Lazada",cert_id="705",creator = "张滢萍",subject_no="1122",customer_no="06010",currency="IDR",currencyname="印尼卢比",website="ID",text="lazada平台印尼站点发货确认收入(ID)"},
new mPlatformAccountingSetting{ platform_type="Lazada",cert_id="706",creator = "张滢萍",subject_no="1122",customer_no="06011",currency="VND",currencyname="越南盾",website="VN"}, new mPlatformAccountingSetting{ platform_type="Lazada",cert_id="706",creator = "张滢萍",subject_no="1122",customer_no="06011",currency="VND",currencyname="越南盾",website="VN",text="lazada平台越南站点发货确认收入(VN)"},
new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="707",creator = "张滢萍",subject_no="1122",customer_no="01104",currency="USD",currencyname="美元",website="US"}, new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="707",creator = "张滢萍",subject_no="1122",customer_no="01104",currency="USD",currencyname="美元",website="US",text="亚马逊平台US站点 发货确认收入Seller"},
new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="708",creator = "张滢萍",subject_no="1122",customer_no="01107",currency="GBP",currencyname="英镑",website="UK"}, new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="708",creator = "张滢萍",subject_no="1122",customer_no="01107",currency="GBP",currencyname="英镑",website="UK",text="亚马逊UK站点 发货确认收入seller"},
new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="709",creator = "张滢萍",subject_no="1122",customer_no="01108",currency="EUR",currencyname="欧元",website="DE"}, new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="709",creator = "张滢萍",subject_no="1122",customer_no="01108",currency="EUR",currencyname="欧元",website="DE",text="亚马逊平台DE站点发货确认收入seller(DE)"},
new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="710",creator = "张滢萍",subject_no="1122",customer_no="01109",currency="EUR",currencyname="欧元",website="ES"}, new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="710",creator = "张滢萍",subject_no="1122",customer_no="01109",currency="EUR",currencyname="欧元",website="ES",text="亚马逊ES站点发货确认收入seller(ES)"},
new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="711",creator = "张滢萍",subject_no="1122",customer_no="01110",currency="EUR",currencyname="欧元",website="FR"}, new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="711",creator = "张滢萍",subject_no="1122",customer_no="01110",currency="EUR",currencyname="欧元",website="FR",text="亚马逊FR站点发货确认收入seller(FR)"},
new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="712",creator = "张滢萍",subject_no="1122",customer_no="01111",currency="EUR",currencyname="欧元",website="IT"}, new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="712",creator = "张滢萍",subject_no="1122",customer_no="01111",currency="EUR",currencyname="欧元",website="IT",text="亚马逊IT站点平台 发货确认收入seller(IT)"},
new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="713",creator = "张滢萍",subject_no="1122",customer_no="01112",currency="EUR",currencyname="欧元",website="NL"}, new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="713",creator = "张滢萍",subject_no="1122",customer_no="01112",currency="EUR",currencyname="欧元",website="NL",text="亚马逊NL站点 发货确认收入seller(NL)"},
new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="714",creator = "张滢萍",subject_no="1122",customer_no="01115",currency="SEK",currencyname="瑞士克朗",website="SE"}, new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="714",creator = "张滢萍",subject_no="1122",customer_no="01115",currency="SEK",currencyname="瑞典克朗",website="SE",text="亚马逊SE站点发货确认收入SELLER(SE)"},
new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="715",creator = "张滢萍",subject_no="1122",customer_no="01113",currency="JPY",currencyname="日元",website="JP"}, new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="715",creator = "张滢萍",subject_no="1122",customer_no="01113",currency="JPY",currencyname="日元",website="JP",text="亚马逊JP站点发货确认收入seller"},
new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="716",creator = "张滢萍",subject_no="1122",customer_no="01106",currency="AUD",currencyname="澳元",website="AU"}, new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="716",creator = "张滢萍",subject_no="1122",customer_no="01106",currency="AUD",currencyname="澳元",website="AU",text="亚马逊AU站点发货确认收入seller"},
new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="717",creator = "张滢萍",subject_no="1122",customer_no="01105",currency="CAD",currencyname="加元",website="CA"}, new mPlatformAccountingSetting{ platform_type="Amazon",cert_id="717",creator = "张滢萍",subject_no="1122",customer_no="01105",currency="CAD",currencyname="加元",website="CA",text="亚马逊平台CA站点 发货确认收入SELLER(CA)"},
new mPlatformAccountingSetting{ platform_type="DHgate",cert_id="718",creator = "赵娟",subject_no="1122",customer_no="09006",currency="USD",currencyname="美元",website="Global"}, new mPlatformAccountingSetting{ platform_type="DHgate",cert_id="718",creator = "赵娟",subject_no="1122",customer_no="09006",currency="USD",currencyname="美元",website="Global",text="DHgate发货确认收入"},
new mPlatformAccountingSetting{ platform_type="JD",cert_id="719",creator = "赵娟",subject_no="1122",customer_no="29001",currency="THB",currencyname="泰铢",website="Global"}, new mPlatformAccountingSetting{ platform_type="JD",cert_id="719",creator = "赵娟",subject_no="1122",customer_no="29001",currency="THB",currencyname="泰铢",website="Global",text="JD平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Joom",cert_id="720",creator = "赵娟",subject_no="1122",customer_no="19033",currency="USD",currencyname="美元",website="Global"}, new mPlatformAccountingSetting{ platform_type="Joom",cert_id="720",creator = "赵娟",subject_no="1122",customer_no="19033",currency="USD",currencyname="美元",website="Global",text="joom平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="OpenSky",cert_id="722",creator = "赵娟",subject_no="1122",customer_no="20001",currency="USD",currencyname="美元",website="US"}, new mPlatformAccountingSetting{ platform_type="OpenSky",cert_id="722",creator = "赵娟",subject_no="1122",customer_no="20001",currency="USD",currencyname="美元",website="US",text="opensky平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="PriceMinister",cert_id="723",creator = "赵娟",subject_no="1122",customer_no="16009",currency="EUR",currencyname="欧元",website="Global"}, new mPlatformAccountingSetting{ platform_type="PriceMinister",cert_id="723",creator = "赵娟",subject_no="1122",customer_no="16009",currency="EUR",currencyname="欧元",website="Global",text="PriceMinister平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Sears",cert_id="724",creator = "赵娟",subject_no="1122",customer_no="22001",currency="USD",currencyname="美元",website="US"}, new mPlatformAccountingSetting{ platform_type="Sears",cert_id="724",creator = "赵娟",subject_no="1122",customer_no="22001",currency="USD",currencyname="美元",website="US",text="Sears平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Shopee",cert_id="725",creator = "赵娟",subject_no="1122",customer_no="17032",currency="IDR",currencyname="印尼卢比",website="ID"}, new mPlatformAccountingSetting{ platform_type="Shopee",cert_id="725",creator = "赵娟",subject_no="1122",customer_no="17032",currency="IDR",currencyname="印尼卢比",website="ID",text="Shopee平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Shopee",cert_id="726",creator = "赵娟",subject_no="1122",customer_no="17032",currency="MYR",currencyname="马来西亚-林吉特",website="MY"}, new mPlatformAccountingSetting{ platform_type="Shopee",cert_id="726",creator = "赵娟",subject_no="1122",customer_no="17032",currency="MYR",currencyname="马来西亚-林吉特",website="MY",text="Shopee平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Shopee",cert_id="727",creator = "赵娟",subject_no="1122",customer_no="17032",currency="PHP",currencyname="菲律宾比索",website="PH"}, new mPlatformAccountingSetting{ platform_type="Shopee",cert_id="727",creator = "赵娟",subject_no="1122",customer_no="17032",currency="PHP",currencyname="菲律宾比索",website="PH",text="Shopee平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Shopee",cert_id="728",creator = "赵娟",subject_no="1122",customer_no="17032",currency="SGD",currencyname="新加坡元",website="SG"}, new mPlatformAccountingSetting{ platform_type="Shopee",cert_id="728",creator = "赵娟",subject_no="1122",customer_no="17032",currency="SGD",currencyname="新加坡元",website="SG",text="Shopee平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Shopee",cert_id="729",creator = "赵娟",subject_no="1122",customer_no="17032",currency="THB",currencyname="泰铢",website="TH"}, new mPlatformAccountingSetting{ platform_type="Shopee",cert_id="729",creator = "赵娟",subject_no="1122",customer_no="17032",currency="THB",currencyname="泰铢",website="TH",text="Shopee平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Shopee",cert_id="730",creator = "赵娟",subject_no="1122",customer_no="17032",currency="VND",currencyname="越南盾",website="Global"}, new mPlatformAccountingSetting{ platform_type="Shopee",cert_id="730",creator = "赵娟",subject_no="1122",customer_no="17032",currency="VND",currencyname="越南盾",website="Global",text="Shopee平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Shopify",cert_id="731",creator = "赵娟",subject_no="2203",customer_no="28003",currency="USD",currencyname="美元",website="Global"}, new mPlatformAccountingSetting{ platform_type="Shopify",cert_id="731",creator = "赵娟",subject_no="2203",customer_no="28003",currency="USD",currencyname="美元",website="Global",text="Shopify平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Walmart",cert_id="732",creator = "赵娟",subject_no="1122",customer_no="18006",currency="USD",currencyname="美元",website="US"}, new mPlatformAccountingSetting{ platform_type="Walmart",cert_id="732",creator = "赵娟",subject_no="1122",customer_no="18006",currency="USD",currencyname="美元",website="US",text="Walmart平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="MARKETING",cert_id="733",creator = "赵娟",subject_no="1122",customer_no="14001",currency="CNY",currencyname="人民币",website="Global"}, new mPlatformAccountingSetting{ platform_type="MARKETING",cert_id="733",creator = "赵娟",subject_no="1122",customer_no="14001",currency="CNY",currencyname="人民币",website="Global",text="线下客户发货确认收入"},
new mPlatformAccountingSetting{ platform_type="MARKETING",cert_id="734",creator = "赵娟",subject_no="1122",customer_no="14001",currency="USD",currencyname="美元",website="Global"}, new mPlatformAccountingSetting{ platform_type="MARKETING",cert_id="734",creator = "赵娟",subject_no="1122",customer_no="14001",currency="USD",currencyname="美元",website="Global",text="线下客户发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Wish",cert_id="735",creator = "赵娟",subject_no="1122",customer_no="5021",currency="CNY",currencyname="人民币",website="Global"}, new mPlatformAccountingSetting{ platform_type="Wish",cert_id="735",creator = "赵娟",subject_no="1122",customer_no="5021",currency="CNY",currencyname="人民币",website="Global",text="wish平台发货确认收入"},
//new mPlatformAccountingSetting{ platform_type="Ebay",cert_id="736",creator = "赵娟",subject_no="1122",customer_no="030j4",currency="GBP",currencyname="英镑",website="UK"}, //new mPlatformAccountingSetting{ platform_type="Ebay",cert_id="736",creator = "赵娟",subject_no="1122",customer_no="030j4",currency="GBP",currencyname="英镑",website="UK"},
new mPlatformAccountingSetting{ platform_type="Ebay",cert_id="737",creator = "赵娟",subject_no="2203",customer_no="030j3",currency="AUD",currencyname="澳元",website=""}, new mPlatformAccountingSetting{ platform_type="Ebay",cert_id="737",creator = "赵娟",subject_no="2203",customer_no="030j3",currency="AUD",currencyname="澳元",website="",text="eBay-paypal平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Ebay",cert_id="738",creator = "赵娟",subject_no="2203",customer_no="030j3",currency="EUR",currencyname="欧元",website=""}, new mPlatformAccountingSetting{ platform_type="Ebay",cert_id="738",creator = "赵娟",subject_no="2203",customer_no="030j3",currency="EUR",currencyname="欧元",website="",text="eBay-paypal平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Ebay",cert_id="739",creator = "赵娟",subject_no="2203",customer_no="030j3",currency="GBP",currencyname="英镑",website=""}, new mPlatformAccountingSetting{ platform_type="Ebay",cert_id="739",creator = "赵娟",subject_no="2203",customer_no="030j3",currency="GBP",currencyname="英镑",website="",text="eBay-paypal平台发货确认收入"},
new mPlatformAccountingSetting{ platform_type="Ebay",cert_id="740",creator = "赵娟",subject_no="2203",customer_no="030j3",currency="USD",currencyname="美元",website=""}, new mPlatformAccountingSetting{ platform_type="Ebay",cert_id="740",creator = "赵娟",subject_no="2203",customer_no="030j3",currency="USD",currencyname="美元",website="",text="eBay-paypal平台发货确认收入"},
}; };
...@@ -10413,6 +10414,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -10413,6 +10414,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var CustomerNo = ""; var CustomerNo = "";
var currencyName = ""; var currencyName = "";
decimal rate = 0; decimal rate = 0;
var text = "";
var setting = listPlatformSettings.Where(a => a.platform_type == item.platform_type && a.website == item.website && a.currency == item.currency).FirstOrDefault(); var setting = listPlatformSettings.Where(a => a.platform_type == item.platform_type && a.website == item.website && a.currency == item.currency).FirstOrDefault();
if(setting==null && item.platform_type=="Ebay") if(setting==null && item.platform_type=="Ebay")
...@@ -10431,6 +10433,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -10431,6 +10433,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
SubjectNo = setting.subject_no; SubjectNo = setting.subject_no;
CustomerNo = setting.customer_no; CustomerNo = setting.customer_no;
currencyName = setting.currencyname; currencyName = setting.currencyname;
text = setting.text;
} }
var exchangeRate = listRate.Where(a => a.currency == currencyName).FirstOrDefault(); var exchangeRate = listRate.Where(a => a.currency == currencyName).FirstOrDefault();
...@@ -10445,10 +10449,10 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -10445,10 +10449,10 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
{ {
list.Add($@"{ID}|{Year}|{Month}|{Date}|记| list.Add($@"{ID}|{Year}|{Month}|{Date}|记|
{ID}|{Creator1}|||| {ID}|{Creator1}||||
{SubjectNo}|{item.platform_type}平台发货确认收入|||| {SubjectNo}|{text}||||
{currencyName}||||| {currencyName}|{rate}||||
{item.amount}||{item.amount*rate}||| {item.amount}||{item.amount*rate}|||
||#{CustomerNo}||| ||=""{CustomerNo}""|||
" "
); );
} }
...@@ -10462,10 +10466,10 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -10462,10 +10466,10 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
list.Add($@"{ID}|{Year}|{Month}|{Date}|记| list.Add($@"{ID}|{Year}|{Month}|{Date}|记|
{ID}|{Creator1}|||| {ID}|{Creator1}||||
{SubjectNo}|{item.platform_type}平台发货确认收入|||| {SubjectNo}|{text}||||
{currencyName}||||| {currencyName}|{rate}||||
|{item.amount}||{item.amount*rate}|| |{item.amount}||{item.amount*rate}||
||||#{CustomerNo}| ||||=""{CustomerNo}""|
" "
); );
} }
...@@ -10486,8 +10490,6 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -10486,8 +10490,6 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
ms.Position = 0; ms.Position = 0;
return File(ms, "text/csv", filename + ".csv"); return File(ms, "text/csv", filename + ".csv");
} }
/// <summary> /// <summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment