X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep409.php;h=b2ddd39da55f8598c2953274ac2d5c8ed304ba57;hb=b0c4c9777f9574e9c2805fddc2a12576d75d94ce;hp=a57974260ce9c0f28b7f8d5fd0609b940a1f667a;hpb=f8778441a6380212a4078623d580c5fc41a37ab8;p=fa-stable.git diff --git a/reporting/rep409.php b/reporting/rep409.php index a5797426..b2ddd39d 100644 --- a/reporting/rep409.php +++ b/reporting/rep409.php @@ -36,9 +36,11 @@ function print_workorders() $to = $_POST['PARAM_1']; $email = $_POST['PARAM_2']; $comments = $_POST['PARAM_3']; + $orientation = $_POST['PARAM_4']; if (!$from || !$to) return; + $orientation = ($orientation ? 'L' : 'P'); $fno = explode("-", $from); $tno = explode("-", $to); $from = min($fno[0], $tno[0]); @@ -54,13 +56,9 @@ function print_workorders() $cur = get_company_Pref('curr_default'); if ($email == 0) - { - $rep = new FrontReport(_('WORK ORDER'), "WorkOrderBulk", user_pagesize()); - $rep->SetHeaderType('Header2'); - $rep->currency = $cur; - $rep->Font(); - $rep->Info($params, $cols, null, $aligns); - } + $rep = new FrontReport(_('WORK ORDER'), "WorkOrderBulk", user_pagesize(), 9, $orientation); + if ($orientation == 'L') + recalculate_cols($cols); for ($i = $from; $i <= $to; $i++) { @@ -70,16 +68,14 @@ function print_workorders() $date_ = sql2date($myrow["date_"]); if ($email == 1) { - $rep = new FrontReport("", "", user_pagesize()); - $rep->SetHeaderType('Header2'); - $rep->currency = $cur; - $rep->Font(); - $rep->title = _('WORK ORDER'); - $rep->filename = "WorkOrder" . $myrow['wo_ref'] . ".pdf"; - $rep->Info($params, $cols, null, $aligns); - } - else + $rep = new FrontReport("", "", user_pagesize(), 9, $orientation); $rep->title = _('WORK ORDER'); + $rep->filename = "WorkOrder" . $myrow['wo_ref'] . ".pdf"; + } + $rep->SetHeaderType('Header2'); + $rep->currency = $cur; + $rep->Font(); + $rep->Info($params, $cols, null, $aligns); $contact = array('email' =>$myrow['email'],'lang' => $dflt_lang, // ??? 'name' => $myrow['contact'], 'name2' => '', 'contact'); @@ -149,4 +145,3 @@ function print_workorders() $rep->End(); } -?> \ No newline at end of file