X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep201.php;h=0e5f774e79599b43b0fe51dfcc8f104e56207e44;hb=e29ab37ef51f39c200c3772e07eeceef0ce39214;hp=380af70de90695a291a7237e9ec257671aeb3605;hpb=d567a10b7925c8bb97c734e213d6651a979af29d;p=fa-stable.git diff --git a/reporting/rep201.php b/reporting/rep201.php index 380af70d..0e5f774e 100644 --- a/reporting/rep201.php +++ b/reporting/rep201.php @@ -99,7 +99,7 @@ function print_supplier_balances() $sql = "SELECT supplier_id, supp_name AS name, curr_code FROM ".TB_PREF."suppliers "; if ($fromsupp != reserved_words::get_all_numeric()) - $sql .= "WHERE supplier_id=$fromsupp "; + $sql .= "WHERE supplier_id=".db_escape($fromsupp)." "; $sql .= "ORDER BY supp_name"; $result = db_query($sql, "The customers could not be retrieved"); @@ -149,7 +149,7 @@ function print_supplier_balances() else $item[3] = ($trans['TotalAmount'] + $trans['Allocated']) * $rate; */ - if ($trans['type'] == 20) + if ($trans['type'] == 20 || $trans['type'] == 2) $item[3] = $item[0] + $item[1] - $item[2]; else $item[3] = $item[0] - $item[1] + $item[2];