Commit 902e8db8 authored by solho's avatar solho

取得關帳日期 日期範圍修正

parent 7daf86af
...@@ -122,10 +122,12 @@ namespace WebAPI.Controllers ...@@ -122,10 +122,12 @@ namespace WebAPI.Controllers
where 1=1 "); where 1=1 ");
JObject objPermission_furtherSql = JObject.Parse(obj_input["Permission_furtherSql"].ToString()); JObject objPermission_furtherSql = JObject.Parse(obj_input["Permission_furtherSql"].ToString());
if (obj_input["Settle_Date"]!=null && String.IsNullOrEmpty(obj_input["Settle_Date"].ToString()) ) if (obj_input["Settle_Date"]!=null && !String.IsNullOrEmpty(obj_input["Settle_Date"].ToString()) )
{ {
strsql += " and Settle_Date between @Settle_Date and @Settle_Date "; strsql += " and Settle_Date between @Settle_Date_begin and @Settle_Date_end ";
cmd.Parameters.Add("@Settle_Date", obj_input["Settle_Date"].ToString()); DateTime Settle_Date = Convert.ToDateTime(obj_input["Settle_Date"].ToString());
cmd.Parameters.Add("@Settle_Date_begin", Settle_Date );
cmd.Parameters.Add("@Settle_Date_end", Settle_Date.AddMonths(1).AddDays(-1) );
} }
if (obj_input["isClosed"] != null ) if (obj_input["isClosed"] != null )
{ {
......
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