X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep402.php;h=5cbb6994c08cb1b12fbe7b80f4b723ecf1cdcc1a;hb=b14f304532b7d124e79ee2a03d60a0850c8a417d;hp=00f486d65ffede8ebde1f9fa1c203892bad26025;hpb=98bf5bfc72317d45e356e3909a8cd1fdf5181176;p=fa-stable.git diff --git a/reporting/rep402.php b/reporting/rep402.php index 00f486d6..5cbb6994 100644 --- 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 - 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 - 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) @@ -72,12 +74,12 @@ function print_gl_rows(&$rep, $result, $title) 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->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);