X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep201.php;h=8131e164e1daa6eb9450a6e437bf982878068987;hb=063c5f22068dbbd6adccacaf5bd0f66b2eda8e4f;hp=79cd401f1dbeab815384eb73017412762447e841;hpb=9b1b5c83a37376d2076334952db1d1f739a26d1c;p=fa-stable.git diff --git a/reporting/rep201.php b/reporting/rep201.php index 79cd401f..8131e164 100644 --- a/reporting/rep201.php +++ b/reporting/rep201.php @@ -90,12 +90,14 @@ function print_supplier_balances() $currency = $_POST['PARAM_3']; $no_zeros = $_POST['PARAM_4']; $comments = $_POST['PARAM_5']; - $destination = $_POST['PARAM_6']; + $orientation = $_POST['PARAM_6']; + $destination = $_POST['PARAM_7']; if ($destination) include_once($path_to_root . "/reporting/includes/excel_report.inc"); else include_once($path_to_root . "/reporting/includes/pdf_report.inc"); + $orientation = ($orientation ? 'L' : 'P'); if ($fromsupp == ALL_TEXT) $supp = _('All'); else @@ -126,7 +128,9 @@ function print_supplier_balances() 3 => array( 'text' => _('Currency'),'from' => $currency, 'to' => ''), 4 => array('text' => _('Suppress Zeros'), 'from' => $nozeros, 'to' => '')); - $rep = new FrontReport(_('Supplier Balances'), "SupplierBalances", user_pagesize()); + $rep = new FrontReport(_('Supplier Balances'), "SupplierBalances", user_pagesize(), 9, $orientation); + if ($orientation == 'L') + recalculate_cols($cols); $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); @@ -175,7 +179,7 @@ function print_supplier_balances() $rep->Line($rep->row + 4); while ($trans=db_fetch($res)) { - if ($no_zeros && $trans['TotalAmount'] == 0 && $trans['Allocated'] == 0) continue; + if ($no_zeros && floatcmp(abs($trans['TotalAmount']), $trans['Allocated']) == 0) continue; $rep->NewLine(1, 2); $rep->TextCol(0, 1, $systypes_array[$trans['type']]); $rep->TextCol(1, 2, $trans['reference']);