X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep409.php;h=7db6a4ef2b7255408371f20be0a49d56aeb28981;hb=53d942f2a0d20cce5e9c409c6485867ce0869e4d;hp=57ed978d603d8d340024bc2518df4f4ed7d1c292;hpb=6af220a67674c827a1970fe601a4c04e8d07cded;p=fa-stable.git diff --git a/reporting/rep409.php b/reporting/rep409.php index 57ed978d..7db6a4ef 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,18 +68,16 @@ 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, + $contact = array('email' =>$myrow['email'],'lang' => $dflt_lang, // ??? 'name' => $myrow['contact'], 'name2' => '', 'contact'); $rep->SetCommonData($myrow, null, null, '', 26, $contact);