|
@@ -8,13 +8,10 @@ select convert(varchar(10), t1.recheckdate, 120) fdate,
|
|
|
t2.fspec,
|
|
t2.fspec,
|
|
|
t2.fmodel,
|
|
t2.fmodel,
|
|
|
t2.fqty,
|
|
t2.fqty,
|
|
|
- t4.frateprice,
|
|
|
|
|
- t4.frateamount ,
|
|
|
|
|
- t2.famount
|
|
|
|
|
|
|
+ t3.fprojectnotes
|
|
|
from sainvoice t1
|
|
from sainvoice t1
|
|
|
inner join sainvoicedetail t2 on t1.siteid = t2.siteid and t1.sainvoiceid = t2.fparentid
|
|
inner join sainvoicedetail t2 on t1.siteid = t2.siteid and t1.sainvoiceid = t2.fparentid
|
|
|
inner join saorder t3 on t1.siteid = t3.siteid and t1.fsonum = t3.fsonum
|
|
inner join saorder t3 on t1.siteid = t3.siteid and t1.fsonum = t3.fsonum
|
|
|
- inner join saorderdetail t4 on t4.siteid = t2.siteid and t4.saorderdetailid = t2.fsourceid
|
|
|
|
|
where t1.fstatus in ('¸´ºË', '¹Ø±Õ')
|
|
where t1.fstatus in ('¸´ºË', '¹Ø±Õ')
|
|
|
and t3.ftype != '¹¤¾ß½è³öµ¥'
|
|
and t3.ftype != '¹¤¾ß½è³öµ¥'
|
|
|
and t1.siteid =$siteid$
|
|
and t1.siteid =$siteid$
|