X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep304.php;h=971c7e20553c246bd79625f6e9724f27e23f9125;hb=6bcd87642330092910f5d6977845a76ac59350ac;hp=a3a87daefbdd25d584b11c98c19662c8704fbade;hpb=8ffddf50ffbe93672c769e2cf0501d0f9125e2a0;p=fa-stable.git diff --git a/reporting/rep304.php b/reporting/rep304.php index a3a87dae..971c7e20 100644 --- a/reporting/rep304.php +++ b/reporting/rep304.php @@ -45,7 +45,7 @@ function getTransactions($category, $location, $fromcust, $from, $to, $show_serv move.tran_date, SUM(-move.qty) AS qty, SUM(-move.qty*move.price) AS amt, - SUM(-IF(move.standard_cost <> 0, move.qty * move.standard_cost, move.qty *(item.material_cost + item.labour_cost + item.overhead_cost))) AS cost + SUM(-IF(move.standard_cost <> 0, move.qty * move.standard_cost, move.qty *item.material_cost)) AS cost FROM ".TB_PREF."stock_master item, ".TB_PREF."stock_category category, ".TB_PREF."debtor_trans trans, @@ -62,7 +62,8 @@ function getTransactions($category, $location, $fromcust, $from, $to, $show_serv if (!$show_service) $sql .= " AND (item.mb_flag='B' OR item.mb_flag='M')"; - + else + $sql .= " AND item.mb_flag<>'F'"; if ($category != 0) $sql .= " AND item.category_id = ".db_escape($category);