projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 5490: qty_done is not updated correctly when partial invoice is voided. Fixed...
[fa-stable.git]
/
reporting
/
rep402.php
diff --git
a/reporting/rep402.php
b/reporting/rep402.php
index 00f486d65ffede8ebde1f9fa1c203892bad26025..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)
@@
-72,12
+74,12
@@
function print_gl_rows(&$rep, $result, $title)
if (db_num_rows($result))
{
if (db_num_rows($result))
{
- $rep->Line($rep->row -
2
);
+ $rep->Line($rep->row -
= 4
);
$rep->NewLine();
$rep->Font('italic');
$rep->TextCol(3, 11, $title);
$rep->Font();
$rep->NewLine();
$rep->Font('italic');
$rep->TextCol(3, 11, $title);
$rep->Font();
- $rep->Line($rep->row -
2
);
+ $rep->Line($rep->row -
= 4
);
while($myrow = db_fetch($result)) {
$rep->NewLine();
$rep->TextCol(0, 2, $systypes_array[$myrow['type']] . ' ' . $myrow['type_no'], -2);
while($myrow = db_fetch($result)) {
$rep->NewLine();
$rep->TextCol(0, 2, $systypes_array[$myrow['type']] . ' ' . $myrow['type_no'], -2);