X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep203.php;h=27eef02b5dd538a10c2975d8f47bdf98dbe7b6e0;hb=0bf933423b9645bcb57390c478d4fdaf0c895049;hp=ffe28416f75f70167b43550c00872677e3a630e3;hpb=80dd97a37f674cc3691fa04af4c29607067566b2;p=fa-stable.git diff --git a/reporting/rep203.php b/reporting/rep203.php index ffe28416..27eef02b 100644 --- a/reporting/rep203.php +++ b/reporting/rep203.php @@ -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"); @@ -133,11 +133,11 @@ function print_payment_report() $rep->NewLine(1, 2); $rep->TextCol(0, 1, $systypes_array[$trans['type']]); $rep->TextCol(1, 2, $trans['supp_reference']); - if ($trans['type'] == 20) + if ($trans['type'] == ST_SUPPINVOICE) $rep->DateCol(2, 3, $trans['due_date'], true); else $rep->DateCol(2, 3, $trans['tran_date'], true); - if ($trans['type'] != 20) + if ($trans['type'] != ST_SUPPINVOICE) { $trans['TranTotal'] = -$trans['TranTotal']; $trans['Balance'] = -$trans['Balance'];