Integration of fpdi class.
[fa-stable.git] / reporting / rep203.php
index 91fdfde62b5356cc9f1a287ef13532ecf0a132b2..0a5ccca64105b6d418d1ead44273fea5088da9b6 100644 (file)
@@ -96,7 +96,7 @@ function print_payment_report()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $total = array();
        $grandtotal = array(0,0);
@@ -104,7 +104,7 @@ function print_payment_report()
        $sql = "SELECT supplier_id, supp_name AS name, curr_code, ".TB_PREF."payment_terms.terms FROM ".TB_PREF."suppliers, ".TB_PREF."payment_terms
                WHERE ";
        if ($fromsupp != ALL_NUMERIC)
-               $sql .= "supplier_id=$fromsupp AND ";
+               $sql .= "supplier_id=".db_escape($fromsupp)." AND ";
        $sql .= "".TB_PREF."suppliers.payment_terms = ".TB_PREF."payment_terms.terms_indicator
                ORDER BY supp_name";
        $result = db_query($sql, "The customers could not be retrieved");