佣金导入,改回成费用锁定后无法导入的逻辑

DS7_JinGang
ddlucky 2 years ago
parent 27d0f0b5e9
commit d99c992d95

@ -1858,7 +1858,10 @@ namespace DSWeb.MvcShipping.Controllers
var USERID = Convert.ToString(Session["USERID"]).ToString();
Helper Helper = new Helper(USERID, Convert.ToString(Session["SHOWNAME"]).ToString(), Convert.ToString(Session["COMPANYID"]).ToString());
//新增更改单Helper 新增更改单Helper = new 新增更改单Helper(USERID, Convert.ToString(Session["SHOWNAME"]).ToString(), Convert.ToString(Session["COMPANYID"]).ToString());
foreach (DataRow row in table.Rows) {
@ -1876,51 +1879,54 @@ namespace DSWeb.MvcShipping.Controllers
if (head.FEESTATUS == 1)
{
//建立一个费用更改单
Helper.AddHead(head, USERID, filename + "佣金导入");
message = message + " 提单号:" + MBLNO + " 无法导入,请确认提单号正确并未费用封账!";
break;
//建立一个费用更改单
var mblno=Convert.ToString(row["主提单号"]);
var DRCRStr = Convert.ToString(row["收/付"]);
//var DRCR = DRCRStr == "收" ? 1 : 2;
var FEENAME = Convert.ToString(row["费用名称"]).Trim();
var CUSTNAME = Convert.ToString(row["结算对象"]).Trim();
var BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select COUNT(*) BLCOUNT from info_client where SHORTNAME='" + CUSTNAME + "'");
if (BLCOUNT == "0")
{
isSucess = false;
message = message + " 提单号:" + MBLNO + " 无法导入,请确认客户名称:" + CUSTNAME + ",是否正确!";
//jsonRespose.Success = false;
//jsonRespose.Message = message;
//return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select COUNT(*) BLCOUNT from code_fee where [NAME]='" + FEENAME + "'");
if (BLCOUNT == "0")
{
isSucess = false;
//if (i != 0) message = "已导入" + i.ToString() + "条费用。";
message = message + " 提单号:" + MBLNO + " 无法导入,请确认费用名称:" + FEENAME + ",是否正确!";
break;
}
var AMOUNTSTR = Convert.ToString(row["金额"]);
var EXRATESTR = Convert.ToString(row["汇率"]);
var CURR = Convert.ToString(row["币种"]);
var ISOPEN = Convert.ToString(row["是否机密"]);
decimal amount = 0M;
decimal exrate = 0M;
try {
amount = Convert.ToDecimal(AMOUNTSTR);
exrate = Convert.ToDecimal(EXRATESTR);
}
catch (Exception e) {
}
Helper.AddFee(mblno, DRCRStr, FEENAME, CUSTNAME, amount,exrate,CURR, ISOPEN);
//新增更改单Helper.AddHead(head, USERID, filename + "佣金导入");
//var mblno=Convert.ToString(row["主提单号"]);
//var DRCRStr = Convert.ToString(row["收/付"]);
////var DRCR = DRCRStr == "收" ? 1 : 2;
//var FEENAME = Convert.ToString(row["费用名称"]).Trim();
//var CUSTNAME = Convert.ToString(row["结算对象"]).Trim();
//var BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select COUNT(*) BLCOUNT from info_client where SHORTNAME='" + CUSTNAME + "'");
//if (BLCOUNT == "0")
//{
// isSucess = false;
// message = message + " 提单号:" + MBLNO + " 无法导入,请确认客户名称:" + CUSTNAME + ",是否正确!";
// //jsonRespose.Success = false;
// //jsonRespose.Message = message;
// //return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
//}
//BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select COUNT(*) BLCOUNT from code_fee where [NAME]='" + FEENAME + "'");
//if (BLCOUNT == "0")
//{
// isSucess = false;
// //if (i != 0) message = "已导入" + i.ToString() + "条费用。";
// message = message + " 提单号:" + MBLNO + " 无法导入,请确认费用名称:" + FEENAME + ",是否正确!";
// break;
//}
//var AMOUNTSTR = Convert.ToString(row["金额"]);
//var EXRATESTR = Convert.ToString(row["汇率"]);
//var CURR = Convert.ToString(row["币种"]);
//var ISOPEN = Convert.ToString(row["是否机密"]);
//decimal amount = 0M;
//decimal exrate = 0M;
//try {
// amount = Convert.ToDecimal(AMOUNTSTR);
// exrate = Convert.ToDecimal(EXRATESTR);
//}
//catch (Exception e) {
//}
//新增更改单Helper.AddFee(mblno, DRCRStr, FEENAME, CUSTNAME, amount,exrate,CURR, ISOPEN);
}
}
}
@ -1931,7 +1937,7 @@ namespace DSWeb.MvcShipping.Controllers
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
else {
Helper.DoSave();
//新增更改单Helper.DoSave();
}
var i = 0;

Loading…
Cancel
Save