Преглед изворни кода

订单统计查询条件增加

hu пре 4 година
родитељ
комит
1a5beff508

+ 1 - 1
src/rest/openapi/restcontroller/wechatapp/orderform/SQL/订单出货未付款账期统计查询.sql

@@ -52,4 +52,4 @@ inner join sainvoice t3 on t4.siteid=t3.siteid and t4.fparentid=t3.sainvoiceid
 where t1.fstatus in('ÉóºË','¹Ø±Õ') and t3.fstatus='¹Ø±Õ' and t1.siteid=@siteid
 and CONVERT(VARCHAR(10),t3.fdate,120)<=CONVERT(VARCHAR(10),DATEADD(mm,-12,getdate()),120) and isnull(t4.famount,0)-isnull(t4.FWRITEOFFAMOUNT1,0)>0  group by t1.fagentnum,t1.fsaler) t6 on t7.fagentnum=t6.fagentnum and t7.fsaler=t6.fsaler and isnull(t6.famount5,0)>=0
 
-left join pp_hr on pp_hr.hrid=t7.fsaler   order by  ftotalamount desc
+left join pp_hr on pp_hr.hrid=t7.fsaler where $where$  order by  ftotalamount desc

+ 1 - 1
src/rest/openapi/restcontroller/wechatapp/orderform/SQL/订单出货未开票账期统计查询.sql

@@ -52,4 +52,4 @@ inner join sainvoice t3 on t4.siteid=t3.siteid and t4.fparentid=t3.sainvoiceid
 where t1.fstatus in('ÉóºË','¹Ø±Õ') and t3.fstatus='¹Ø±Õ' and t1.siteid=@siteid
 and CONVERT(VARCHAR(10),t3.fdate,120)<=CONVERT(VARCHAR(10),DATEADD(mm,-12,getdate()),120) and isnull(t4.famount,0)-isnull(t4.finvoiceamount,0)>0  group by t1.fagentnum,t1.fsaler) t6 on t7.fagentnum=t6.fagentnum and t7.fsaler=t6.fsaler and isnull(t6.famount5,0)>=0
 
-left join pp_hr on pp_hr.hrid=t7.fsaler   order by  ftotalamount desc
+left join pp_hr on pp_hr.hrid=t7.fsaler where $where$ order by  ftotalamount desc