X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep307.php;h=d9d9c29e29d27b464c30e853d27ef87234b87089;hb=f7093d7dde32fcccbe14b828ccdcf80bc652d7c3;hp=9ac9c822a2920545d1f887d8073c28f4b2775e03;hpb=53d942f2a0d20cce5e9c409c6485867ce0869e4d;p=fa-stable.git diff --git a/reporting/rep307.php b/reporting/rep307.php index 9ac9c822..d9d9c29e 100644 --- a/reporting/rep307.php +++ b/reporting/rep307.php @@ -37,7 +37,7 @@ function fetch_items($category=0) units, cat.description FROM ".TB_PREF."stock_master stock LEFT JOIN ".TB_PREF."stock_category cat ON stock.category_id=cat.category_id - WHERE mb_flag <> 'D'"; + WHERE mb_flag <> 'D' AND mb_flag <>'F'"; if ($category != 0) $sql .= " AND cat.category_id = ".db_escape($category); $sql .= " ORDER BY stock.category_id, stock_id"; @@ -45,7 +45,7 @@ function fetch_items($category=0) return db_query($sql,"No transactions were returned"); } -function trans_qty($stock_id, $location=null, $from_date, $to_date, $inward = true) +function trans_qty($stock_id, $location, $from_date, $to_date, $inward = true) { if ($from_date == null) $from_date = Today(); @@ -104,14 +104,11 @@ function inventory_movements() else $cat = get_category_name($category); -// if ($location == ALL_TEXT) -// $location = ''; if ($location == '') $loc = _('All'); else $loc = get_location_name($location); - //$cols = array(0, 100, 300, 365, 440, 540, 640, 715); $cols = array(0, 60, 220, 240, 310, 380, 450, 520); $headers = array(_('Category'), _('Description'), _('UOM'), _('Opening'), _('Quantity In'), _('Quantity Out'), _('Balance')); @@ -158,11 +155,11 @@ function inventory_movements() $inward += trans_qty($myrow['stock_id'], $location, $from_date, $to_date); $outward += trans_qty($myrow['stock_id'], $location, $from_date, $to_date, false); - $rep->AmountCol(3, 4, $qoh_start, get_qty_dec($myrow['stock_id'])); - $rep->AmountCol(4, 5, $inward, get_qty_dec($myrow['stock_id'])); - $rep->AmountCol(5, 6, $outward, get_qty_dec($myrow['stock_id'])); - $rep->AmountCol(6, 7, $qoh_end, get_qty_dec($myrow['stock_id'])); - + $stock_qty_dec = get_qty_dec($myrow['stock_id']); + $rep->AmountCol(3, 4, $qoh_start, $stock_qty_dec); + $rep->AmountCol(4, 5, $inward, $stock_qty_dec); + $rep->AmountCol(5, 6, $outward, $stock_qty_dec); + $rep->AmountCol(6, 7, $qoh_end, $stock_qty_dec); $rep->NewLine(0, 1); } $rep->Line($rep->row - 4); @@ -171,4 +168,3 @@ function inventory_movements() $rep->End(); } -?> \ No newline at end of file