X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep409.php;h=218f07faa59191b84f20cdda2c54c61325e2bb59;hb=9451db1760036985de791ba24c442801e37f37de;hp=57ed978d603d8d340024bc2518df4f4ed7d1c292;hpb=90b3d069d96b99671af51726e2953352738abb75;p=fa-stable.git diff --git a/reporting/rep409.php b/reporting/rep409.php index 57ed978d..218f07fa 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,21 +68,19 @@ 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->currency = $cur; + $rep->Font(); + $rep->Info($params, $cols, null, $aligns); - $contact[] = array('email' =>$myrow['email'],'lang' => $dflt_lang, + $contact = array('email' =>$myrow['email'],'lang' => $dflt_lang, // ??? 'name' => $myrow['contact'], 'name2' => '', 'contact'); $rep->SetCommonData($myrow, null, null, '', 26, $contact); + $rep->SetHeaderType('Header2'); $rep->NewPage(); $result = get_wo_requirements($i); @@ -149,4 +145,3 @@ function print_workorders() $rep->End(); } -?> \ No newline at end of file