} if ($YPos <= $Bottom_Margin) { /* head up a new invoice/credit note page */ /*draw the vertical column lines right to the bottom */ PrintLinesToBottom(); include 'includes/PDFTransPageHeader.inc'; } //end if need a new page headed up } //end while there are line items to print out } /*end if there are stock movements to show on the invoice or credit note*/ $YPos -= $line_height; /* check to see enough space left to print the 4 lines for the totals/footer */ if ($YPos - $Bottom_Margin < 2 * $line_height) { PrintLinesToBottom(); include 'includes/PDFTransPageHeader.inc'; } /*Print a column vertical line with enough space for the footer*/ /*draw the vertical column lines to 4 lines shy of the bottom to leave space for invoice footer info ie totals etc*/ $pdf->line($Left_Margin + 97, $TopOfColHeadings + 12, $Left_Margin + 97, $Bottom_Margin + 4 * $line_height); /*Print a column vertical line */ $pdf->line($Left_Margin + 350, $TopOfColHeadings + 12, $Left_Margin + 350, $Bottom_Margin + 4 * $line_height); /*Print a column vertical line */ $pdf->line($Left_Margin + 450, $TopOfColHeadings + 12, $Left_Margin + 450, $Bottom_Margin + 4 * $line_height); /*Print a column vertical line */ $pdf->line($Left_Margin + 550, $TopOfColHeadings + 12, $Left_Margin + 550, $Bottom_Margin + 4 * $line_height); /*Print a column vertical line */ $pdf->line($Left_Margin + 587, $TopOfColHeadings + 12, $Left_Margin + 587, $Bottom_Margin + 4 * $line_height); $pdf->line($Left_Margin + 640, $TopOfColHeadings + 12, $Left_Margin + 640, $Bottom_Margin + 4 * $line_height);
if ($YPos <= $Bottom_Margin) { /* head up a new invoice/credit note page */ /*draw the vertical column lines right to the bottom */ PrintLinesToBottom($pdf, $Page_Height, $PageNumber, $FormDesign); include 'includes/PDFTransPageHeader.inc'; } //end if need a new page headed up $Line++; } //end while there are line items to print out } /*end if there are stock movements to show on the invoice or credit note*/ $YPos -= $line_height; /* check to see enough space left to print the 4 lines for the totals/footer */ if ($YPos - $Bottom_Margin < 2 * $line_height) { PrintLinesToBottom($pdf, $Page_Height, $PageNumber, $FormDesign); include 'includes/PDFTransPageHeader.inc'; } /* Print a column vertical line with enough space for the footer */ /* draw the vertical column lines to 4 lines shy of the bottom to leave space for invoice footer info ie totals etc */ $pdf->line($FormDesign->DataLines->Line1->startx, $Page_Height - $FormDesign->DataLines->Line1->starty, $FormDesign->DataLines->Line1->endx, $Page_Height - $FormDesign->DataLines->Line1->endy); /* Print a column vertical line */ $pdf->line($FormDesign->DataLines->Line2->startx, $Page_Height - $FormDesign->DataLines->Line2->starty, $FormDesign->DataLines->Line2->endx, $Page_Height - $FormDesign->DataLines->Line2->endy); /* Print a column vertical line */ $pdf->line($FormDesign->DataLines->Line3->startx, $Page_Height - $FormDesign->DataLines->Line3->starty, $FormDesign->DataLines->Line3->endx, $Page_Height - $FormDesign->DataLines->Line3->endy); /* Print a column vertical line */ $pdf->line($FormDesign->DataLines->Line4->startx, $Page_Height - $FormDesign->DataLines->Line4->starty, $FormDesign->DataLines->Line4->endx, $Page_Height - $FormDesign->DataLines->Line4->endy); /* Print a column vertical line */ $pdf->line($FormDesign->DataLines->Line5->startx, $Page_Height - $FormDesign->DataLines->Line5->starty, $FormDesign->DataLines->Line5->endx, $Page_Height - $FormDesign->DataLines->Line5->endy); $pdf->line($FormDesign->DataLines->Line6->startx, $Page_Height - $FormDesign->DataLines->Line6->starty, $FormDesign->DataLines->Line6->endx, $Page_Height - $FormDesign->DataLines->Line6->endy); /* Rule off at bottom of the vertical lines */