ddlucky 6 months ago
commit 7d9f753e4c

@ -22492,7 +22492,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement
}
}
MsCwVouitemsGl.ACCALL = DRACCID.ACCNAME + strACCALL;
MsCwVouitemsGl.FCYEXRATE = 1;//汇率
MsCwVouitemsGl.FCYEXRATE = Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["EXCHANGERATE"].ToString().Trim());//汇率
dEXCHANGERATE = MsCwVouitemsGl.FCYEXRATE;//汇率
if (dsCwDesign.Tables[0].Rows[0]["ISVBM"].ToString().Trim() == "True")
{
MsCwVouitemsGl.ISSYS = false;//是否手动录入
@ -22708,7 +22709,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement
}
}
MsCwVouitemsGl.ACCALL = CRACCID.ACCNAME + strACCALL;
MsCwVouitemsGl.FCYEXRATE = 1;//汇率
MsCwVouitemsGl.FCYEXRATE = Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["EXCHANGERATE"].ToString().Trim());//汇率
dEXCHANGERATE = MsCwVouitemsGl.FCYEXRATE;//汇率
if (dsCwDesign.Tables[0].Rows[0]["ISVBM"].ToString().Trim() == "True")
{
MsCwVouitemsGl.ISSYS = false;//是否手动录入

@ -34,7 +34,7 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, {
this.formname = "MsChInvoiceapplicationBLEdit"; //页面名称
this.INVOICEPORT == "HangXin";
this.bsnosql = getUrlParam('bsnosql');
this.bsCurr = getUrlParam('bsCurr');

@ -9339,6 +9339,10 @@ namespace DSWeb.MvcShipping.Controllers
}
MsChFeeDAL.SaveLog(NEWBSNO.BSNO, Convert.ToString(Session["USERID"]),"","发起协同费用", opseae.MBLNO);
MsChFeeDAL.SaveLog(NEWBSNO.BSNO, enter, companyDBNAME, "接受协同费用", opseae.MBLNO);
var Email = MsOpSeaeDAL.getUserEMAIL(" SHOWNAME='自动化'", company.DBNAME);
if (!string.IsNullOrEmpty(Email)) {
var mailtopic = "主提单号:" + opseae.MBLNO + " 此票已协同费用";

@ -697,8 +697,54 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL
return result;
}
public static DBResult SaveLog(string bsno, string userid, string dbname = "",string logtype="",string logcontent="")
{
var result = new DBResult();
Database db = DatabaseFactory.CreateDatabase();
if (dbname != "") db = DatabaseFactory.CreateDatabase(dbname);
using (var conn = db.CreateConnection())
{
conn.Open();
var tran = conn.BeginTransaction();
try
{
var cmdInsertLog = db.GetSqlStringCommand("insert into sys_log(GID,NAME,LOGTYPE,LOGTIME,LOGCONTENT,CREATEUSER) values(NEWID(),@BSNO,@LOGTYPE,'" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',@LOGCONTENT,@USERID)");
cmdInsertLog.Parameters.Clear();
db.AddInParameter(cmdInsertLog, "@BSNO", DbType.String, bsno);
db.AddInParameter(cmdInsertLog, "@LOGTYPE", DbType.String, logtype);
db.AddInParameter(cmdInsertLog, "@LOGCONTENT", DbType.String, logcontent);
db.AddInParameter(cmdInsertLog, "@USERID", DbType.String, userid);
db.ExecuteNonQuery(cmdInsertLog, tran);
//db.ExecuteNonQuery(tran, CommandType.Text, "EXEC p_op_aftersavefee '" + bsno + "'");
tran.Commit();
}
catch (Exception)
{
tran.Rollback();
result.Success = false;
result.Message = "保存出现错误,请重试或联系系统管理员";
return result;
}
}
result.Success = true;
result.Message = "保存成功" + result.Message;
return result;
}
static public int DeleteFee(string tempGId,string bsno,string userid)
{
int iResult = 0;

@ -3054,6 +3054,14 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlDAL
var U8SYSTEM = MsSysParamSetDAL.GetData("PARAMNAME='U8SYSTEM'").PARAMVALUE;
var U8CORP = MsSysParamSetDAL.GetData("PARAMNAME='U8CORP'").PARAMVALUE;
var U8BOOKID = MsSysParamSetDAL.GetData("PARAMNAME='U8BOOKID'").PARAMVALUE;
var CwStart = MsCwDesignStartusingDAL.MsCwDesignStartusingDAL.GetData("GID='" + strCwSTARTGID + "'", companyid, userid);
var cwlist = CwStart.FINANCESOFTCODE.Split('-');
if (cwlist != null && cwlist.Length == 2) {
U8CORP = cwlist[0];
U8BOOKID = CwStart.FINANCESOFTCODE;
}
if (string.IsNullOrEmpty(U8URL) || string.IsNullOrEmpty(U8URL) || string.IsNullOrEmpty(U8CORP) || string.IsNullOrEmpty(U8BOOKID))
{
result.Success = false;

@ -17,6 +17,7 @@ using DSWeb.Areas.Account.Models.MsCwVouchersGl3;
using DSWeb.MvcShipping.Models.MsCwVouchersGl;
using DSWeb.MvcShipping.Models.MsCwVouitemsGl;
using DSWeb.MvcShipping.DAL.MsBaseInfoDAL;
using com.sun.tools.javac.jvm;
namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceHeXiaoDAL
{
@ -890,6 +891,23 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceHeXiaoDAL
if (DRACCID.ACCID != "")
{
var isfind = false;
decimal EXRATE = 1;
if (bodyList != null)
{
if (bodyList.Count > 0)
{
for (int Z = 0; Z < bodyList.Count; Z++)
{
if (bodyList[Z].CURR.ToString().Trim() == dsVWChFeeAR.Tables[0].Rows[i]["CURRENCY"].ToString().Trim())
{
EXRATE = Convert.ToDecimal(bodyList[Z].FCYEXRATE.ToString().Trim());
}
}
}
}
foreach (var items in CwVouitemsEntities)
{
if (items.ACCID == DRACCID.ACCID
@ -908,8 +926,11 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceHeXiaoDAL
{
items.FCYDR = items.FCYDR + Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["AMOUNT"].ToString().Trim());
}
if (dsVWChFeeAR.Tables[0].Rows[i]["CURRENCY"].ToString().Trim()=="RMB")
items.AMTDR = items.AMTDR + Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["AMOUNT"].ToString().Trim());
else
items.AMTDR = items.AMTDR + (Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["AMOUNT"].ToString().Trim())*EXRATE);
items.AMTDR = items.AMTDR + Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["INVAMOUNT"].ToString().Trim());
}
else
@ -918,7 +939,7 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceHeXiaoDAL
{
items.FCYCR = items.FCYCR + Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["AMOUNT"].ToString().Trim());
}
items.AMTCR = items.AMTCR + Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["INVAMOUNT"].ToString().Trim());
items.AMTCR = items.AMTCR + (Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["AMOUNT"].ToString().Trim()) * EXRATE);
}
break;
@ -936,13 +957,13 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceHeXiaoDAL
MsCwVouitemsGl.PROPERTY = 0;//科目属性
MsCwVouitemsGl.GRADE = 0;//科目级别
MsCwVouitemsGl.ACCID = DRACCID.ACCID;//主营业务收入科目贷码
MsCwVouitemsGl.AMTDR = 0;//本位币借方金额(互斥)
MsCwVouitemsGl.AMTDR = Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["INVAMOUNT"].ToString().Trim());//本位币贷方金额(互斥)
MsCwVouitemsGl.AMTDR = 0;
if (DRACCID.ISFCY)
{
MsCwVouitemsGl.ISFCY = true;//是否外币
MsCwVouitemsGl.FCYNO = dsVWChFeeAR.Tables[0].Rows[i]["CURRENCY"].ToString().Trim();//外币
MsCwVouitemsGl.FCYDR = Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["AMOUNT"].ToString().Trim());//本位币贷方金额(互斥)
MsCwVouitemsGl.FCYCR = Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["AMOUNT"].ToString().Trim());//本位币贷方金额(互斥)
MsCwVouitemsGl.FCYDR = 0;//本位币贷方金额(互斥)
}
else
{
@ -952,7 +973,10 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceHeXiaoDAL
MsCwVouitemsGl.FCYDR = 0;//外币借方金额
MsCwVouitemsGl.FCYCR = 0;//外币贷方金额
}
if (dsVWChFeeAR.Tables[0].Rows[i]["CURRENCY"].ToString().Trim() == "RMB")
MsCwVouitemsGl.AMTCR = Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["AMOUNT"].ToString().Trim());//本位币贷方金额(互斥)
else
MsCwVouitemsGl.AMTCR = (Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["AMOUNT"].ToString().Trim())*EXRATE);//本位币贷方金额(互斥)
MsCwVouitemsGl.ACCNAME = DRACCID.ACCLNAME;//科目名称
@ -1008,7 +1032,10 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlInvoiceHeXiaoDAL
}
}
MsCwVouitemsGl.ACCALL = DRACCID.ACCNAME + strACCALL;
MsCwVouitemsGl.FCYEXRATE = Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["INVAMOUNT"].ToString().Trim()) / Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["AMOUNT"].ToString().Trim());//汇率
MsCwVouitemsGl.FCYEXRATE = EXRATE;//汇率
dEXCHANGERATE = MsCwVouitemsGl.FCYEXRATE;//汇率
// MsCwVouitemsGl.FCYEXRATE = Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["INVAMOUNT"].ToString().Trim()) / Decimal.Parse(dsVWChFeeAR.Tables[0].Rows[i]["AMOUNT"].ToString().Trim());//汇率
if (dsCwDesign.Tables[0].Rows[0]["ISVBM"].ToString().Trim() == "True")
{

@ -3034,14 +3034,10 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE
strSql.Append(" select vb.CUSTOMERNAME,(select ISSP from info_client where shortname=vb.CUSTOMERNAME) ISSP ");
strSql.Append(" ,C.ACCTYPE ,(g.RMBDR-g.STLRMBDR) RMBNODR,(g.USDDR-g.STLUSDDR) USDNODR,(g.TTLDR-g.STLTTLDR)TTLNODR , ");
strSql.Append(" isnull(dbo.trimdate(vb.stldate),'') stldate ");
strSql.Append(" ,ISNULL(C.ALLOWAMOUNT,0) ALLOWAMOUNT,'' WFDHT,vb.SALE,vb.OPLBNAME,vb.ETD ");
strSql.Append(" ,ISNULL(C.ALLOWAMOUNT,0) ALLOWAMOUNT,'' WFDHT,vb.SALE,vb.OPLBNAME,vb.ETD,g.CUSTOMERNAME CUSTNAME ");
strSql.Append(" from v_OP_bs VB ");
if (BLISSUENOSHEN.PARAMVALUE == "1")
{
strSql.Append(" left join v_op_gain_sum_shen g on g.BSNO=vb.bsno left join V_Client_ACCDATE C ON (C.SHORTNAME=VB.CUSTOMERNAME and vb.ETD between c.BGNDATE and c.ENDDATE) ");
}
else strSql.Append(" left join v_op_gain_sum_ttl g on g.BSNO=vb.bsno left join V_Client_ACCDATE C ON (C.SHORTNAME=VB.CUSTOMERNAME and vb.ETD between c.BGNDATE and c.ENDDATE) ");
strSql.Append(" left join v_op_gain_cust_sum_shen g on g.BSNO=vb.bsno left join V_Client_ACCDATE C ON (C.SHORTNAME=VB.CUSTOMERNAME and vb.ETD between c.BGNDATE and c.ENDDATE) ");
// strSql.Append(" left join V_CUSTOMER_NODR CN ON (CN.CUSTOMERNAME=VB.CUSTOMERNAME)");
if (!string.IsNullOrEmpty(BSNO))
{
@ -3054,45 +3050,50 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE
var headList = new List<BLINFOmb>();
//var _nomsg = "";
bool isfirst = true;
Database db = DatabaseFactory.CreateDatabase();
using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
{
BLINFOmb data = new BLINFOmb();
while (reader.Read())
{
{
#region Set DB data to Object
#region 结费类型
data. = "";
if (reader["ISSP"] != DBNull.Value)
if (isfirst)
{
if (Convert.ToBoolean(reader["ISSP"]))
#region 结费类型
data. = "";
if (reader["ISSP"] != DBNull.Value)
{
data. = "注意:该客户是特批放单客户!" + "\n";
if (Convert.ToBoolean(reader["ISSP"]))
{
data. = "注意:该客户是特批放单客户!" + "\n";
}
}
if (Convert.ToString(reader["ACCTYPE"]).Trim() == "")
{
data. = data. + "客户结费类型为:现结买单";
}
else
{
data. = data. + "客户结费类型为:" + Convert.ToString(reader["ACCTYPE"]);
}
if (Convert.ToString(reader["ACCTYPE"]) == "约定天数")
{
//data.结费类型 = data.结费类型 + Convert.ToString(reader["stldays"]) + "天 ";
//string CUSTOMERNAME, string OPLBNAME, string BUSDATE, string SALE
var CUSTOMERNAME = Convert.ToString(reader["CUSTOMERNAME"]);
var OPLBNAME = Convert.ToString(reader["OPLBNAME"]);
var BUSDATE = Convert.ToString(reader["ETD"]);
var SALE = Convert.ToString(reader["SALE"]);
data. = data. + MsInfoClientDAL.GetSTLDAYS(CUSTOMERNAME, OPLBNAME, BUSDATE, SALE).STLDAYS + "天 ";
}
data. = data. + ",应结日期为 " + Convert.ToString(reader["stldate"]) + "";
data.STLDATE = Convert.ToString(reader["stldate"]);
#endregion
isfirst = false;
}
if (Convert.ToString(reader["ACCTYPE"]).Trim() == "")
{
data. = data. + "客户结费类型为:现结买单";
}
else
{
data. = data. + "客户结费类型为:" + Convert.ToString(reader["ACCTYPE"]);
}
if (Convert.ToString(reader["ACCTYPE"]) == "约定天数") {
//data.结费类型 = data.结费类型 + Convert.ToString(reader["stldays"]) + "天 ";
//string CUSTOMERNAME, string OPLBNAME, string BUSDATE, string SALE
var CUSTOMERNAME = Convert.ToString(reader["CUSTOMERNAME"]);
var OPLBNAME = Convert.ToString(reader["OPLBNAME"]);
var BUSDATE = Convert.ToString(reader["ETD"]);
var SALE = Convert.ToString(reader["SALE"]);
data. = data. + MsInfoClientDAL.GetSTLDAYS(CUSTOMERNAME, OPLBNAME, BUSDATE, SALE).STLDAYS + "天 ";
}
data. = data. + ",应结日期为 " + Convert.ToString(reader["stldate"]) + "";
data.STLDATE = Convert.ToString(reader["stldate"]);
#endregion
#region 该业务是否 欠费超期
//var TTLNODR=0M;
if (reader["TTLNODR"] != DBNull.Value)
@ -3165,6 +3166,30 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE
#endregion
#endregion
var Rate = 0M;
if (data.TTLNODR > 0 && data.USDNODR > 0)
{
Rate = (data.TTLNODR - data.RMBNODR) / data.USDNODR;
}
var _Rate = Rate.ToString("#0.0000");
data. = data. + Environment.NewLine + Convert.ToString(reader["CUSTNAME"]) + " 未结算费用:"
+ "USD" + Convert.ToString(data.USDNODR)
+ " RMB" + Convert.ToString(data.RMBNODR)
+ ",合计" + Convert.ToString(data.TTLNODR);
if (Rate != 0M)
{
data. = data. + "(" + _Rate + ")";
}
data. = "";
if (data.ZLTTLNODR_All != 0)
{
data. = Convert.ToString(reader["CUSTNAME"]) + " 超期欠费:"
+ "USD" + Convert.ToString(data.ZLUSDNODR_All)
+ " RMB" + Convert.ToString(data.ZLRMBNODR_All)
+ ",合计" + Convert.ToString(data.ZLTTLNODR_All);
}
//headList.Add(data);
}
reader.Close();
@ -3173,28 +3198,7 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE
#region Set DB data to Object
#region 该业务欠费是否超期
var Rate = 0M;
if (data.TTLNODR > 0 && data.USDNODR > 0)
{
Rate = (data.TTLNODR - data.RMBNODR) / data.USDNODR;
}
var _Rate = Rate.ToString("#0.0000");
data. = "未结算费用:"
+ "USD" + Convert.ToString(data.USDNODR)
+ " RMB" + Convert.ToString(data.RMBNODR)
+ ",合计" + Convert.ToString(data.TTLNODR);
if (Rate != 0M)
{
data. = data. + "(" + _Rate + ")";
}
data. = "";
if (data.ZLTTLNODR_All != 0) {
data. = "超期欠费:"
+ "USD" + Convert.ToString(data.ZLUSDNODR_All)
+ " RMB" + Convert.ToString(data.ZLRMBNODR_All)
+ ",合计" + Convert.ToString(data.ZLTTLNODR_All);
}
//data.欠费超期 = data.欠费超期 + "\n";

@ -956,7 +956,7 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, {
fieldLabel: '船名',
name: 'VESSEL'
}, {
fieldLabel: '次',
fieldLabel: '次',
name: 'VOYNO'
},{
fieldLabel: '截港日期', //'截港日期',

@ -348,7 +348,7 @@ Ext.extend(Shipping.MsOpOtherIndex, Ext.Panel, {
}, {
sortable: true,
dataIndex: 'VOYNO',
header: '次',
header: '次',
width: 80
}, {
sortable: true,

@ -1987,7 +1987,7 @@ Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, {
callback: function (r, options, success) {
if (success) {
if (r.length > 0) {
this.gridList.getSelectionModel().select(0);
// this.gridList.getSelectionModel().select(0);
} else {
this.storeLog.removeAll();
@ -2014,7 +2014,7 @@ Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, {
callback: function (r, options, success) {
if (success) {
if (r.length > 0) {
this.gridList.getSelectionModel().select(0);
// this.gridList.getSelectionModel().select(0);
} else {
this.storeLog.removeAll();
@ -2040,7 +2040,7 @@ Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, {
callback: function (r, options, success) {
if (success) {
if (r.length > 0) {
this.gridList.getSelectionModel().select(0);
// this.gridList.getSelectionModel().select(0);
} else {
this.storeLog.removeAll();

Loading…
Cancel
Save