diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsRptNoTotalController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsRptNoTotalController.cs index 1d9dab17..e11d1ff9 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsRptNoTotalController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsRptNoTotalController.cs @@ -375,6 +375,11 @@ namespace DSWeb.MvcShipping.Controllers } + if (!strSql.ToString().Contains(" A ")) + { + strSql = strSql.Replace(" A.ACCDATE", " B.ACCDATE"); + } + var jsonRespose = new JsonResponse { Success = true, @@ -628,7 +633,10 @@ namespace DSWeb.MvcShipping.Controllers strSql.Append(" Where " + condition); } - + if (!strSql.ToString().Contains(" A ")) + { + strSql = strSql.Replace(" A.ACCDATE", " B.ACCDATE"); + } if ((!string.IsNullOrEmpty(printstr)) && (printstr == "true")) { @@ -812,7 +820,10 @@ namespace DSWeb.MvcShipping.Controllers } strSql.Append(" Group by B.SALE "); - + if (!strSql.ToString().Contains(" A ")) + { + strSql = strSql.Replace(" A.ACCDATE", " B.ACCDATE"); + } if ((!string.IsNullOrEmpty(printstr)) && (printstr == "true")) { @@ -1007,7 +1018,10 @@ namespace DSWeb.MvcShipping.Controllers } strSql.Append(" Group by F.CUSTOMERNAME,C.[DESCRIPTION],P.PRMBDR,P.PUSDDR,P.PRMBCR,P.PUSDCR "); - + if (!strSql.ToString().Contains(" A ")) + { + strSql = strSql.Replace(" A.ACCDATE", " B.ACCDATE"); + } if ((!string.IsNullOrEmpty(printstr)) && (printstr == "true")) { diff --git a/DSWeb/Web.config b/DSWeb/Web.config index ba0b3ed6..c31b9036 100644 --- a/DSWeb/Web.config +++ b/DSWeb/Web.config @@ -45,7 +45,7 @@ - +