X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep106.php;h=c8a5538533278bb0ad3273d03b28881915256d8d;hb=c08e2d4d2733819fb3ce4afbafd4381ad35b330c;hp=4aac08ab275ad665a614d3e960c9e44c51daae63;hpb=ebc600101ceab69c06eac4b1bd4d1782af45de05;p=fa-stable.git diff --git a/reporting/rep106.php b/reporting/rep106.php index 4aac08ab..c8a55385 100644 --- a/reporting/rep106.php +++ b/reporting/rep106.php @@ -63,11 +63,13 @@ function print_salesman_list() $to = $_POST['PARAM_1']; $summary = $_POST['PARAM_2']; $comments = $_POST['PARAM_3']; - $destination = $_POST['PARAM_4']; + $orientation = $_POST['PARAM_4']; + $destination = $_POST['PARAM_5']; 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 ($summary == 0) $sum = _("No"); @@ -90,14 +92,16 @@ function print_salesman_list() 1 => array( 'text' => _('Period'), 'from' => $from, 'to' => $to), 2 => array( 'text' => _('Summary Only'),'from' => $sum,'to' => '')); - $cols2 = $cols; $aligns2 = $aligns; - $rep = new FrontReport(_('Salesman Listing'), "SalesmanListing", user_pagesize()); + $rep = new FrontReport(_('Salesman Listing'), "SalesmanListing", user_pagesize(), 9, $orientation); + if ($orientation == 'L') + recalculate_cols($cols); + $cols2 = $cols; $rep->Font(); $rep->Info($params, $cols, $headers, $aligns, $cols2, $headers2, $aligns2); - $rep->Header(); + $rep->NewPage(); $salesman = 0; $subtotal = $total = $subprov = $provtotal = 0; @@ -105,11 +109,6 @@ function print_salesman_list() while ($myrow=db_fetch($result)) { - if ($rep->row < $rep->bottomMargin + (2 * $rep->lineHeight)) - { - $salesman = 0; - $rep->Header(); - } $rep->NewLine(0, 2, false, $salesman); if ($salesman != $myrow['salesman_code']) { @@ -152,11 +151,6 @@ function print_salesman_list() $rep->AmountCol(5, 6, $amt, $dec); $rep->AmountCol(6, 7, $prov, $dec); $rep->NewLine(); - if ($rep->row < $rep->bottomMargin + (2 * $rep->lineHeight)) - { - $salesman = 0; - $rep->Header(); - } } $subtotal += $amt; $subprov += $prov;