Report fixed according to changed headers API in FrontReport class.
[fa-stable.git] / reporting / rep409.php
index bf6bb3d466fe0b75ac78b170a37df1718a8477bd..24d2cd82deb3f191c46e194677dbe268e85a4a5b 100644 (file)
@@ -63,6 +63,7 @@ function print_workorders()
        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);
@@ -77,6 +78,7 @@ function print_workorders()
                if ($email == 1)
                {
                        $rep = new FrontReport("", "", user_pagesize());
+                       $rep->SetHeaderType('Header2');
                        $rep->currency = $cur;
                        $rep->Font();
                                $rep->title = _('WORK ORDER');
@@ -85,7 +87,8 @@ function print_workorders()
                }
                else
                        $rep->title = _('WORK ORDER');
-               $rep->Header2($myrow, null, null, '', 26);
+               $rep->SetCommonData($myrow, null, null, '', 26);
+               $rep->NewPage();
 
                $result = get_wo_requirements($i);
                $rep->TextCol(0, 5,_("Work Order Requirements"), -2);
@@ -126,7 +129,7 @@ function print_workorders()
                        $rep->AmountCol(6, 7,   $myrow2['units_issued'], $dec, -2);
                        $rep->NewLine(1);
                        if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))
-                               $rep->Header2($myrow, null, null,'',26);
+                               $rep->NewPage();
                }
                $rep->NewLine(1);
                $rep->TextCol(0, 5," *** = "._("Insufficient stock"), -2);