Bug. WHERE clause version=1 in rep304.php should be skipped.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 13 Mar 2012 08:18:41 +0000 (09:18 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 13 Mar 2012 08:18:41 +0000 (09:18 +0100)
reporting/rep304.php

index 7a91a4a1ee9226bcf6ac38bf34d5628f409e64ec..054a12d613b19c1d90c10d32bf6599151b8d1699 100644 (file)
@@ -56,7 +56,7 @@ function getTransactions($category, $location, $fromcust, $from, $to)
                AND ".TB_PREF."stock_moves.trans_no=".TB_PREF."debtor_trans.trans_no
                AND ".TB_PREF."stock_moves.tran_date>='$from'
                AND ".TB_PREF."stock_moves.tran_date<='$to'
-               AND ((".TB_PREF."debtor_trans.type=".ST_CUSTDELIVERY." AND ".TB_PREF."debtor_trans.version=1) OR ".TB_PREF."stock_moves.type=".ST_CUSTCREDIT.")
+               AND (".TB_PREF."debtor_trans.type=".ST_CUSTDELIVERY." OR ".TB_PREF."stock_moves.type=".ST_CUSTCREDIT.")
                AND (".TB_PREF."stock_master.mb_flag='B' OR ".TB_PREF."stock_master.mb_flag='M')";
                if ($category != 0)
                        $sql .= " AND ".TB_PREF."stock_master.category_id = ".db_escape($category);