Fixed newlines in js submit dialogs.
[fa-stable.git] / purchasing / inquiry / supplier_inquiry.php
index 6db3ef91ac0841056f48f2e56c7a2f10cbf1981d..7de2319c5402ec106ec5c2165f804458ab0980fd 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security=2;
-$path_to_root="../..";
+$page_security = 'SA_SUPPTRANSVIEW';
+$path_to_root = "../..";
 include($path_to_root . "/includes/db_pager.inc");
 include($path_to_root . "/includes/session.inc");
 
@@ -175,7 +175,8 @@ function check_overdue($row)
        FROM ".TB_PREF."supp_trans as trans, ".TB_PREF."suppliers as supplier
        WHERE supplier.supplier_id = trans.supplier_id
        AND trans.tran_date >= '$date_after'
-       AND trans.tran_date <= '$date_to'";
+       AND trans.tran_date <= '$date_to'
+               AND trans.ov_amount != 0";      // exclude voided transactions
        if ($_POST['supplier_id'] != reserved_words::get_all())
                $sql .= " AND trans.supplier_id = '" . $_POST['supplier_id'] . "'";
        if (isset($_POST['filterType']) && $_POST['filterType'] != reserved_words::get_all())