Rerun of implemented Selectable Print Orientation (Portrait, Landscape) for all repor...
[fa-stable.git] / reporting / rep112.php
index d9297b870a17afd1bd3a8760fdf6f5b1dcc66081..d60d56e973e20d300413a019f8050115ecf09fc7 100644 (file)
@@ -60,9 +60,9 @@ function print_receipts()
        $comments = $_POST['PARAM_3'];
        $orientation = $_POST['PARAM_4'];
 
-       $orientation = ($orientation ? 'L' : 'P');
        if (!$from || !$to) return;
 
+       $orientation = ($orientation ? 'L' : 'P');
        $dec = user_price_dec();
 
        $fno = explode("-", $from);
@@ -81,7 +81,7 @@ function print_receipts()
 
        $rep = new FrontReport(_('RECEIPT'), "ReceiptBulk", user_pagesize(), 9, $orientation);
     if ($orientation == 'L')
-       $rep->recalculate_cols($cols);
+       recalculate_cols($cols);
        $rep->SetHeaderType('Header2');
        $rep->currency = $cur;
        $rep->Font();
@@ -102,7 +102,6 @@ function print_receipts()
                        $baccount = db_fetch($res);
                        $params['bankaccount'] = $baccount['bank_act'];
 
-                       $rep->title = _('RECEIPT');
                        $contacts = get_branch_contacts($myrow['branch_code'], 'invoice', $myrow['debtor_no']);
                        $rep->SetCommonData($myrow, null, $myrow, $baccount, ST_CUSTPAYMENT, $contacts);
                        $rep->NewPage();