DS7Zhanhao
hanxuntao 2 years ago
parent 2234cee050
commit 0125ca9a32

@ -675,22 +675,27 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL
static public int DeleteFee(string tempGId)
{
int iResult = 0;
var feeidlist = tempGId.Split(',');
using (SqlTransaction sqlTran = SqlHelper.BeginTransaction(SqlHelper.ConnectionStringLocalTransaction))
{
try
{
var strSql3 = new StringBuilder();
strSql3.Append("update ch_fee set WmsOutBsNo='',SETTLEMENT=0,INVOICE=0,ORDERAMOUNT=0,ORDERINVOICE=0,FEESTATUS=0,ORDERSETTLEMENT=0,ORDERINVSETTLEMENT=0 where GID IN (SELECT WmsOutBsNo FROM CH_FEE WHERE ");
strSql3.Append(" GID in (" + tempGId + "))");
SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, strSql3.ToString());
var strSql = new StringBuilder();
strSql.Append("Delete from ch_fee where ");
strSql.Append(" GId in (" + tempGId + ")");
SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, strSql.ToString());
var strSql2 = new StringBuilder();
strSql2.Append("Delete from ch_fee_do_service where ");
strSql2.Append(" FEEID in (" + tempGId + ")");
SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, strSql2.ToString());
foreach (var feeid in feeidlist)
{
var strSql3 = new StringBuilder();
strSql3.Append("update ch_fee set WmsOutBsNo='',SETTLEMENT=0,INVOICE=0,ORDERAMOUNT=0,ORDERINVOICE=0,FEESTATUS=0,ORDERSETTLEMENT=0,ORDERINVSETTLEMENT=0 where GID IN (SELECT WmsOutBsNo FROM CH_FEE WHERE ");
strSql3.Append(" GID=" + feeid + ")");
SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, strSql3.ToString());
var strSql = new StringBuilder();
strSql.Append("Delete from ch_fee where ");
strSql.Append(" GId=" + feeid);
SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, strSql.ToString());
var strSql2 = new StringBuilder();
strSql2.Append("Delete from ch_fee_do_service where ");
strSql2.Append(" FEEID=" + feeid);
SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, strSql2.ToString());
}
sqlTran.Commit();

@ -621,6 +621,9 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceDAL
Decimal strJie = 0;
Decimal strDai = 0;
if (dsVWChFeeAR != null)
{
@ -630,6 +633,9 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceDAL
{
if (dsVWChFeeAR.Tables[0].Rows[i]["GID"].ToString().Trim() == invgid) {
var sqlARFCEXCHANGE = "select distinct ORIGCURRENCY,EXCHANGERATE from ch_fee_do WHERE BILLNO='" + dsVWChFeeAR.Tables[0].Rows[i]["BILLNO"].ToString().Trim() + "'";
DataSet dsVWChFeeARExChange = T_ALL_DA.GetAllSQL(sqlARFCEXCHANGE);
#region 摘要内容
strEXPLAN = "";
strEXPLAN = DREXPLAN;
@ -639,6 +645,7 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceDAL
{
strEXPLAN = strEXPLAN.Replace("[发票抬头]", dsVWChFeeAR.Tables[0].Rows[i]["INVOICECUSTNAME"].ToString().Trim());
strEXPLAN = strEXPLAN.Replace("[发票号]", dsVWChFeeAR.Tables[0].Rows[i]["INVOICENO"].ToString().Trim());
strEXPLAN = strEXPLAN.Replace("[客户名称]", dsVWChFeeAR.Tables[0].Rows[i]["CUSTOMERNAME"].ToString().Trim());
}
else
{
@ -657,7 +664,7 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceDAL
MsCwVouitemsGl.GRADE = 0;//科目级别
#region 应收账款
if (dsVWChFeeAR.Tables[0].Rows[i]["OTCURRAMOUNT"].ToString().Trim() == "0")
if (Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["OTCURRAMOUNT"].ToString().Trim()) == 0)
{
iAMTDR = iAMTDR + Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["INVAMOUNT"].ToString().Trim());
//
@ -682,6 +689,8 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceDAL
{
MsCwVouitemsGl.DC = "C";//贷方向
}
MsCwVouitemsGl.FCYEXRATE = 1;//汇率
}
else
{
@ -709,6 +718,22 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceDAL
MsCwVouitemsGl.DC = "C";//贷方向
}
if (dsVWChFeeARExChange != null)
{
for (int j = 0; j < dsVWChFeeARExChange.Tables[0].Rows.Count; j++)
{
if (dsVWChFeeARExChange.Tables[0].Rows[j]["ORIGCURRENCY"].ToString().Trim() == dsVWChFeeAR.Tables[0].Rows[i]["RECVCURR"].ToString())
{
MsCwVouitemsGl.FCYEXRATE = Decimal.Parse(dsVWChFeeARExChange.Tables[0].Rows[j]["EXCHANGERATE"].ToString().Trim());//汇率
}
}
}
}
strJie = strJie + MsCwVouitemsGl.AMTCR;
//
@ -724,7 +749,6 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceDAL
}
MsCwVouitemsGl.EXPLAN = strEXPLAN;//摘要
MsCwVouitemsGl.FCYEXRATE = 1;//汇率
dEXCHANGERATE = 1;//汇率
MsCwVouitemsGl.BLNO = "";
//string strBLNONAME = dsCwDesign.Tables[0].Rows[0]["PiaoHao"].ToString().Trim();
@ -740,7 +764,7 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceDAL
{
MsCwVouitemsGl.ISSYS = true;//是否手动录入
}
if (dsVWChFeeAR.Tables[0].Rows[i]["OTCURRAMOUNT"].ToString().Trim() == "0")
if (Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["OTCURRAMOUNT"].ToString().Trim()) == 0)
{
MsCwVouitemsGl.ACCALL = BasicDataRefDAL.setCAGA(dsAR.Tables[0].Rows[0]["PACCGID"].ToString(), MsCwVouitemsGl.ACCNAME.ToString().Trim()) + strACCALL;
@ -788,6 +812,8 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceDAL
{
strEXPLAN = strEXPLAN.Replace("[发票抬头]", dsVWChFeeAR.Tables[0].Rows[i]["INVOICECUSTNAME"].ToString().Trim());
strEXPLAN = strEXPLAN.Replace("[发票号]", dsVWChFeeAR.Tables[0].Rows[i]["INVOICENO"].ToString().Trim());
strEXPLAN = strEXPLAN.Replace("[客户名称]", dsVWChFeeAR.Tables[0].Rows[i]["CUSTOMERNAME"].ToString().Trim());
}
else
{
@ -806,39 +832,103 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceDAL
MsCwVouitemsGl.PACCID = "";//父级科目贷码
MsCwVouitemsGl.PROPERTY = 0;//科目属性
MsCwVouitemsGl.GRADE = 0;//科目级别
MsCwVouitemsGl.ACCID = dsCwDesign.Tables[0].Rows[0]["MBINCOME"].ToString().Trim();//主营业务收入科目贷码
MsCwVouitemsGl.AMTDR = 0;//本位币借方金额(互斥)
MsCwVouitemsGl.AMTCR = Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["INVAMOUNT"].ToString().Trim());//本位币贷方金额(互斥)
strDai = strDai + MsCwVouitemsGl.AMTCR;
MsCwVouitemsGl.ISFCY = false;//是否外币
MsCwVouitemsGl.FCYNO = "RMB";//外币
MsCwVouitemsGl.FCYDR = 0;//外币借方金额
MsCwVouitemsGl.FCYCR = 0;//外币贷方金额
MsCwVouitemsGl.ACCNAME = dsMBINCOME.Tables[0].Rows[0]["ACCNAME"].ToString().Trim();//科目名称
MsCwVouitemsGl.ISDEPTACC = Boolean.Parse(dsMBINCOME.Tables[0].Rows[0]["ISDEPTACC"].ToString().Trim());//核算部门,按规则设置生成
MsCwVouitemsGl.ISEMPLACC = Boolean.Parse(dsMBINCOME.Tables[0].Rows[0]["ISEMPLACC"].ToString().Trim());//核算人员,按规则设置生成
MsCwVouitemsGl.ISCORPACC = Boolean.Parse(dsMBINCOME.Tables[0].Rows[0]["ISCORPACC"].ToString().Trim());//核算客户,按规则设置生成
MsCwVouitemsGl.ISITEMACC = Boolean.Parse(dsMBINCOME.Tables[0].Rows[0]["ISITEMACC"].ToString().Trim());//核算项目,按规则设置生成
if (dsMBINCOME.Tables[0].Rows[0]["DC"].ToString().Trim() == "借")
if (Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["OTCURRAMOUNT"].ToString().Trim()) == 0)
{
MsCwVouitemsGl.DC = "D";//借方向
MsCwVouitemsGl.ACCID = dsCwDesign.Tables[0].Rows[0]["MBINCOME"].ToString().Trim();//主营业务收入科目贷码
MsCwVouitemsGl.AMTDR = 0;//本位币借方金额(互斥)
MsCwVouitemsGl.AMTCR = Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["INVAMOUNT"].ToString().Trim());//本位币贷方金额(互斥)
strDai = strDai + MsCwVouitemsGl.AMTCR;
MsCwVouitemsGl.ISFCY = false;//是否外币
MsCwVouitemsGl.FCYNO = "RMB";//外币
MsCwVouitemsGl.FCYDR = 0;//外币借方金额
MsCwVouitemsGl.FCYCR = 0;//外币贷方金额
MsCwVouitemsGl.ACCNAME = dsMBINCOME.Tables[0].Rows[0]["ACCNAME"].ToString().Trim();//科目名称
MsCwVouitemsGl.FCYEXRATE = 1;//汇率
MsCwVouitemsGl.ISDEPTACC = Boolean.Parse(dsMBINCOME.Tables[0].Rows[0]["ISDEPTACC"].ToString().Trim());//核算部门,按规则设置生成
MsCwVouitemsGl.ISEMPLACC = Boolean.Parse(dsMBINCOME.Tables[0].Rows[0]["ISEMPLACC"].ToString().Trim());//核算人员,按规则设置生成
MsCwVouitemsGl.ISCORPACC = Boolean.Parse(dsMBINCOME.Tables[0].Rows[0]["ISCORPACC"].ToString().Trim());//核算客户,按规则设置生成
MsCwVouitemsGl.ISITEMACC = Boolean.Parse(dsMBINCOME.Tables[0].Rows[0]["ISITEMACC"].ToString().Trim());//核算项目,按规则设置生成
if (dsMBINCOME.Tables[0].Rows[0]["DC"].ToString().Trim() == "借")
{
MsCwVouitemsGl.DC = "D";//借方向
}
else
{
MsCwVouitemsGl.DC = "C";//贷方向
}
//
strACCALL = "";
MsCwVouitemsGl.CORPID = "";// strEMPLID;//人员(系统)本来应该放客户
MsCwVouitemsGl.CUSTOMERNAME = "";// strSALE;//人员(系统)本来应该放客户
if (dsMBINCOME.Tables[0].Rows[0]["ISCORPACC"].ToString().Trim() == "True")
{
MsCwVouitemsGl.CORPID = "";//客户(系统)
MsCwVouitemsGl.CUSTOMERNAME = dsVWChFeeAR.Tables[0].Rows[i]["CUSTOMERNAME"].ToString().Trim();//客户(系统)
strACCALL += "▁" + MsCwVouitemsGl.CUSTOMERNAME;
}
}
else
else {
MsCwVouitemsGl.ACCID = dsCwDesign.Tables[0].Rows[0]["TMFCI"].ToString().Trim();//主营业务收入科目贷码
MsCwVouitemsGl.AMTDR = 0;//本位币借方金额(互斥)
MsCwVouitemsGl.AMTCR = Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["INVAMOUNT"].ToString().Trim());//本位币贷方金额(互斥)
strDai = strDai + MsCwVouitemsGl.AMTCR;
MsCwVouitemsGl.ISFCY = true;//是否外币
MsCwVouitemsGl.FCYNO = dsVWChFeeAR.Tables[0].Rows[i]["RECVCURR"].ToString();//外币编号usd
MsCwVouitemsGl.FCYCR = Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["OTCURRAMOUNT"].ToString().Trim());//外币借方金额
MsCwVouitemsGl.FCYDR = 0;//外币贷方金额
MsCwVouitemsGl.ACCNAME = dsTMFCI.Tables[0].Rows[0]["ACCNAME"].ToString().Trim();//科目名称
if (dsVWChFeeARExChange != null)
{
for (int j = 0; j < dsVWChFeeARExChange.Tables[0].Rows.Count; j++)
{
if (dsVWChFeeARExChange.Tables[0].Rows[j]["ORIGCURRENCY"].ToString().Trim() == dsVWChFeeAR.Tables[0].Rows[i]["RECVCURR"].ToString())
{
MsCwVouitemsGl.FCYEXRATE = Decimal.Parse(dsVWChFeeARExChange.Tables[0].Rows[j]["EXCHANGERATE"].ToString().Trim());//汇率
}
}
}
MsCwVouitemsGl.ISDEPTACC = Boolean.Parse(dsTMFCI.Tables[0].Rows[0]["ISDEPTACC"].ToString().Trim());//核算部门,按规则设置生成
MsCwVouitemsGl.ISEMPLACC = Boolean.Parse(dsTMFCI.Tables[0].Rows[0]["ISEMPLACC"].ToString().Trim());//核算人员,按规则设置生成
MsCwVouitemsGl.ISCORPACC = Boolean.Parse(dsTMFCI.Tables[0].Rows[0]["ISCORPACC"].ToString().Trim());//核算客户,按规则设置生成
MsCwVouitemsGl.ISITEMACC = Boolean.Parse(dsTMFCI.Tables[0].Rows[0]["ISITEMACC"].ToString().Trim());//核算项目,按规则设置生成
if (dsTMFCI.Tables[0].Rows[0]["DC"].ToString().Trim() == "借")
{
MsCwVouitemsGl.DC = "D";//借方向
}
else
{
MsCwVouitemsGl.DC = "C";//贷方向
}
//
strACCALL = "";
MsCwVouitemsGl.CORPID = "";// strEMPLID;//人员(系统)本来应该放客户
MsCwVouitemsGl.CUSTOMERNAME = "";// strSALE;//人员(系统)本来应该放客户
if (dsTMFCI.Tables[0].Rows[0]["ISCORPACC"].ToString().Trim() == "True")
{
MsCwVouitemsGl.CORPID = "";//客户(系统)
MsCwVouitemsGl.CUSTOMERNAME = dsVWChFeeAR.Tables[0].Rows[i]["CUSTOMERNAME"].ToString().Trim();//客户(系统)
strACCALL += "▁" + MsCwVouitemsGl.CUSTOMERNAME;
}
}
if (Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["OTCURRAMOUNT"].ToString().Trim()) == 0)
{
MsCwVouitemsGl.DC = "C";//贷方向
MsCwVouitemsGl.ACCALL = BasicDataRefDAL.setCAGA(dsMBINCOME.Tables[0].Rows[0]["PACCGID"].ToString(), MsCwVouitemsGl.ACCNAME.ToString().Trim()) + strACCALL;
}
//
strACCALL = "";
MsCwVouitemsGl.CORPID = "";// strEMPLID;//人员(系统)本来应该放客户
MsCwVouitemsGl.CUSTOMERNAME = "";// strSALE;//人员(系统)本来应该放客户
if (dsMBINCOME.Tables[0].Rows[0]["ISCORPACC"].ToString().Trim() == "True")
else
{
MsCwVouitemsGl.CORPID = "";//客户(系统)
MsCwVouitemsGl.CUSTOMERNAME = dsVWChFeeAR.Tables[0].Rows[i]["CUSTOMERNAME"].ToString().Trim();//客户(系统)
strACCALL += "▁" + MsCwVouitemsGl.CUSTOMERNAME;
MsCwVouitemsGl.ACCALL = BasicDataRefDAL.setCAGA(dsTMFCI.Tables[0].Rows[0]["PACCGID"].ToString(), MsCwVouitemsGl.ACCNAME.ToString().Trim()) + strACCALL;
}
MsCwVouitemsGl.ACCALL = BasicDataRefDAL.setCAGA(dsMBINCOME.Tables[0].Rows[0]["PACCGID"].ToString(), MsCwVouitemsGl.ACCNAME.ToString().Trim()) + strACCALL;
MsCwVouitemsGl.FCYEXRATE = 1;//汇率
if (dsCwDesign.Tables[0].Rows[0]["ISVBM"].ToString().Trim() == "True")
{
MsCwVouitemsGl.ISSYS = false;//是否手动录入

@ -4919,8 +4919,11 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
for (var i = 0; i < EdiRemarkList.Length; i++)
{
r.WriteLine("FTX+AAI+++" + EdiRemarkList[i] + "'");
icount = icount + 1;
if (!string.IsNullOrEmpty(EdiRemarkList[i]))
{
r.WriteLine("FTX+AAI+++" + EdiRemarkList[i] + "'");
icount = icount + 1;
}
}
}
@ -19615,7 +19618,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
var DESTINATIONID = GetPortEDICode(OpBill.DESTINATIONID, type);
var DESTINATION = OpBill.DESTINATION;
if (carrier == "ONE"||carrier=="ZIM")
if (carrier == "ONE")
{
DESTINATIONID = "";
DESTINATION = "";
@ -19644,7 +19647,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
var DESTINATIONID = GetPortEDICode(bill.DESTINATIONID, type);
var DESTINATION = bill.DESTINATION;
if (carrier == "ONE" || carrier == "ZIM")
if (carrier == "ONE")
{
DESTINATIONID = "";
DESTINATION = "";

@ -14611,7 +14611,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
};
var n = this.storeBodyList.getCount();
this.gridListCellEditing.startEditByPosition({ row: n - 1, column: 2 });
this.gridListCellEditing.startEditByPosition({ row: n - 1, column: 3 });
},
onUpDetailTruckClick: function () {

Loading…
Cancel
Save