X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep601.php;h=db85e6686015a1f1be3c82e2bb891d88bf1842a9;hb=13367be8aaf5175295f7aab7160370458dad1824;hp=4690ac615981c8d97287a28cbb8798abf1f99274;hpb=2109927b5e0f11694e425a3a40ddd78b91478e5f;p=fa-stable.git diff --git a/reporting/rep601.php b/reporting/rep601.php index 4690ac61..db85e668 100644 --- a/reporting/rep601.php +++ b/reporting/rep601.php @@ -61,13 +61,15 @@ function print_bank_transactions() $to = $_POST['PARAM_2']; $zero = $_POST['PARAM_3']; $comments = $_POST['PARAM_4']; - $destination = $_POST['PARAM_5']; + $orientation = $_POST['PARAM_5']; + $destination = $_POST['PARAM_6']; if ($destination) include_once($path_to_root . "/reporting/includes/excel_report.inc"); else include_once($path_to_root . "/reporting/includes/pdf_report.inc"); - $rep = new FrontReport(_('Bank Statement'), "BankStatement", user_pagesize()); + $orientation = ($orientation ? 'L' : 'P'); + $rep = new FrontReport(_('Bank Statement'), "BankStatement", user_pagesize(), 9, $orientation); $dec = user_price_dec(); $cols = array(0, 90, 110, 170, 225, 350, 400, 460, 520); @@ -83,6 +85,8 @@ function print_bank_transactions() 1 => array('text' => _('Period'), 'from' => $from, 'to' => $to), 2 => array('text' => _('Bank Account'),'from' => $act,'to' => '')); + if ($orientation == 'L') + recalculate_cols($cols); $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); $rep->NewPage(); @@ -121,7 +125,7 @@ function print_bank_transactions() $rep->TextCol(1, 2, $myrow['trans_no']); $rep->TextCol(2, 3, $myrow['ref']); $rep->DateCol(3, 4, $myrow["trans_date"], true); - $rep->TextCol(4, 5, payment_person_name($myrow["person_type_id"],$myrow["person_id"], false)); + $rep->TextCol(4, 5, get_counterparty_name($myrow["type"], $myrow["trans_no"], false)); if ($myrow['amount'] > 0.0) { $rep->AmountCol(5, 6, abs($myrow['amount']), $dec);