From: <vv...@us...> - 2012-04-07 18:09:15
|
Revision: 5230 http://web-erp.svn.sourceforge.net/web-erp/?rev=5230&view=rev Author: vvs2012 Date: 2012-04-07 18:09:09 +0000 (Sat, 07 Apr 2012) Log Message: ----------- Fixed page breaks in PDF Balance Sheet and Outstanding GRNs Modified Paths: -------------- trunk/GLBalanceSheet.php trunk/OutstandingGRNs.php trunk/includes/PDFOstdgGRNsPageHeader.inc Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2012-04-06 09:46:25 UTC (rev 5229) +++ trunk/GLBalanceSheet.php 2012-04-07 18:09:09 UTC (rev 5230) @@ -188,6 +188,9 @@ $GroupTotal[$Level]=0; $LYGroupTotal[$Level]=0; $Level--; + if ($YPos < $Bottom_Margin){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } } $YPos -= $line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin+(10 * ($Level+1)),$YPos,200,$FontSize,_('Total') . ' ' . $ParentGroups[$Level]); @@ -197,6 +200,9 @@ $GroupTotal[$Level]=0; $LYGroupTotal[$Level]=0; $YPos -= $line_height; + if ($YPos < $Bottom_Margin){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } } } @@ -209,6 +215,9 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_number_format($SectionBalance,$_SESSION['CompanyRecord']['decimalplaces']),'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_number_format($SectionBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']),'right'); $YPos -= (2 * $line_height); + if ($YPos < $Bottom_Margin){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } } $SectionBalanceLY = 0; $SectionBalance = 0; @@ -218,11 +227,16 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,$Sections[$myrow['sectioninaccounts']]); $YPos -= (2 * $line_height); - + if ($YPos < $Bottom_Margin){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } } } if ($myrow['groupname']!= $ActGrp){ + if ($YPos < $Bottom_Margin + $line_height){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } $FontSize =8; $pdf->setFont('','B'); if ($myrow['parentgroupname']==$ActGrp AND $ActGrp!=''){ Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2012-04-06 09:46:25 UTC (rev 5229) +++ trunk/OutstandingGRNs.php 2012-04-07 18:09:09 UTC (rev 5230) @@ -84,6 +84,9 @@ if ($Supplier!=''){ /*Then it's NOT the first time round */ /* need to print the total of previous supplier */ + if ($YPos < $Bottom_Margin + $line_height * 5){ + include('includes/PDFOstdgGRNsPageHeader.inc'); + } $YPos -= (2*$line_height); $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,260-$Left_Margin,$FontSize,_('Total for') . ' ' . $Supplier . ' - ' . $SupplierName); $DisplaySuppTotVal = locale_number_format($SuppTot_Val,$GRNs['currdecimalplaces']); Modified: trunk/includes/PDFOstdgGRNsPageHeader.inc =================================================================== --- trunk/includes/PDFOstdgGRNsPageHeader.inc 2012-04-06 09:46:25 UTC (rev 5229) +++ trunk/includes/PDFOstdgGRNsPageHeader.inc 2012-04-07 18:09:09 UTC (rev 5230) @@ -26,9 +26,9 @@ /*Draw a rectangle to put the details in */ -$pdf->line($Left_Margin, $Page_Height-$YPos-$line_height,$Page_Width-$Right_Margin, $Page_Height-$YPos-$line_height); -$pdf->line($Left_Margin, $Page_Height-$YPos-$line_height,$Left_Margin, $YPos+10); -$pdf->line($Page_Width-$Right_Margin, $Page_Height-$YPos-$line_height,$Page_Width-$Right_Margin, $YPos+10); +$pdf->line($Left_Margin, $Bottom_Margin, $Page_Width-$Right_Margin, $Bottom_Margin); +$pdf->line($Left_Margin, $Bottom_Margin, $Left_Margin, $YPos+10); +$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin, $Page_Width-$Right_Margin, $YPos+10); /*set up the headings */ $Xpos = $Left_Margin+1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |