projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
4869: Work order listing and print work orders reports should omit voided orders...
[fa-stable.git]
/
reporting
/
rep402.php
diff --git
a/reporting/rep402.php
b/reporting/rep402.php
index 447a730573273d6a3e57215bfedca5b7160aa066..5cbb6994c08cb1b12fbe7b80f4b723ecf1cdcc1a 100644
(file)
--- a/
reporting/rep402.php
+++ b/
reporting/rep402.php
@@
-43,10
+43,12
@@
function getTransactions($items, $open_only, $location)
workorder.required_by,
workorder.closed,
workorder.stock_id
workorder.required_by,
workorder.closed,
workorder.stock_id
- FROM ".TB_PREF."workorders as workorder,"
- .TB_PREF."stock_master as item,"
+ FROM ".TB_PREF."workorders as workorder
+ LEFT JOIN ".TB_PREF."voided v ON v.id=workorder.id and v.type=".ST_WORKORDER.","
+ .TB_PREF."stock_master as item,"
.TB_PREF."locations as location
.TB_PREF."locations as location
- WHERE workorder.stock_id=item.stock_id
+ WHERE ISNULL(v.id)
+ AND workorder.stock_id=item.stock_id
AND workorder.loc_code=location.loc_code";
if ($open_only != 0)
AND workorder.loc_code=location.loc_code";
if ($open_only != 0)