[Weberp-svn] SF.net SVN: weberp:[4575] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-02-09 17:18:47
|
Revision: 4575 http://weberp.svn.sourceforge.net/weberp/?rev=4575&view=rev Author: tim_schofield Date: 2011-02-09 17:18:40 +0000 (Wed, 09 Feb 2011) Log Message: ----------- Phil - Ricards multi-line issue on PDFQuotation narrative Modified Paths: -------------- trunk/PDFQuotation.php trunk/includes/PDFQuotationPageHeader.inc Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2011-02-08 16:21:45 UTC (rev 4574) +++ trunk/PDFQuotation.php 2011-02-09 17:18:40 UTC (rev 4575) @@ -86,7 +86,7 @@ $pdf->addInfo('Subject', _('Quotation') . ' ' . $_GET['QuotationNo']); $FontSize=12; $PageNumber = 1; -$line_height=24; +$line_height=15; // $pdf->selectFont('./fonts/Helvetica.afm'); /* Now ... Has the order got any line items still outstanding to be invoiced */ @@ -171,11 +171,11 @@ $LeftOvers = $pdf->addTextWrap(650,$YPos,85,$FontSize,$DisplayTaxAmount,'right'); $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,$DisplayTotal,'right'); if (strlen($myrow2['narrative'])>1){ - $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,750,10,$myrow2['narrative']); - if (strlen($LeftOvers>1)){ - $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,750,10,$LeftOvers); + $YPos -= ($line_height); + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,800,$FontSize,$myrow2['narrative']); + if (strlen($LeftOvers) >1){ + $YPos -= 11; + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,800,$FontSize,$LeftOvers); } } $QuotationTotal +=$LineTotal; @@ -186,13 +186,13 @@ $YPos -= ($line_height); } //end while there are line items to print out + if ((strlen($myrow['comments']) >200 AND $YPos-$line_height <= 75) OR (strlen($myrow['comments']) >1 AND $YPos-$line_height <= 62) OR $YPos-$line_height <= 50){ - /* We reached the end of the page so finsih off the page and start a newy */ + /* We reached the end of the page so finish off the page and start a newy */ $PageNumber++; include ('includes/PDFQuotationPageHeader.inc'); - } //end if need a new page headed up $LeftOvers = $pdf->addTextWrap($XPos,$YPos-80,200,10,_('Notes:')); Modified: trunk/includes/PDFQuotationPageHeader.inc =================================================================== --- trunk/includes/PDFQuotationPageHeader.inc 2011-02-08 16:21:45 UTC (rev 4574) +++ trunk/includes/PDFQuotationPageHeader.inc 2011-02-09 17:18:40 UTC (rev 4575) @@ -14,7 +14,7 @@ $FontSize=18; $pdf->addText($XPos, 500,$FontSize, _('Quotation')); $FontSize=14; -$YPos = 480; +$YPos = 482; $pdf->addText($XPos, $YPos,$FontSize, $_SESSION['CompanyRecord']['coyname']); $FontSize =10; $pdf->addText($XPos, $YPos-12,$FontSize, $_SESSION['CompanyRecord']['regoffice1']); @@ -44,7 +44,7 @@ $XPos= 50; -$YPos += 25; +$YPos += 12; /*draw a nice curved corner box around the delivery details */ /*from the top right */ $pdf->partEllipse($XPos+225,$YPos+60,0,90,10,10); @@ -106,32 +106,28 @@ $LeftOvers = $pdf->addTextWrap(650,$YPos,85,$FontSize, _('Tax Amount'),'right'); $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize, _('Total'),'right'); - /*draw a box with nice round corner for entering line items */ /*90 degree arc at top right of box 0 degrees starts a bottom */ -$pdf->partEllipse($Page_Width-$Right_Margin-10, $Bottom_Margin+370,0,90,10,10); +$pdf->partEllipse($Page_Width-$Right_Margin-10, $Bottom_Margin+350,0,90,10,10); /*line to the top left */ -$pdf->line($Page_Width-$Right_Margin-10, $Bottom_Margin+380,$Left_Margin+10, $Bottom_Margin+380); +$pdf->line($Page_Width-$Right_Margin-10, $Bottom_Margin+360,$Left_Margin+10, $Bottom_Margin+360); /*line under headings to top left */ -$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+355,$Left_Margin, $Bottom_Margin+355); +$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+335,$Left_Margin, $Bottom_Margin+335); /*Dow top left corner */ -$pdf->partEllipse($Left_Margin+10, $Bottom_Margin+370,90,180,10,10); +$pdf->partEllipse($Left_Margin+10, $Bottom_Margin+350,90,180,10,10); /*Do a line to the bottom left corner */ -$pdf->line($Left_Margin, $Bottom_Margin+370,$Left_Margin, $Bottom_Margin+10); +$pdf->line($Left_Margin, $Bottom_Margin+350,$Left_Margin, $Bottom_Margin+10); /*Now do the bottom left corner 180 - 270 coming back west*/ $pdf->partEllipse($Left_Margin+10, $Bottom_Margin+10,180,270,10,10); /*Now a line to the bottom right */ $pdf->line($Left_Margin+10, $Bottom_Margin,$Page_Width-$Right_Margin-10, $Bottom_Margin); /*Now do the bottom right corner */ -$pdf->partEllipse($Page_Width-$Right_Margin-10, $Bottom_Margin+10,270,360,10,10); +$pdf->partEllipse($Page_Width-$Right_Margin-10, $Bottom_Margin+10,270,350,10,10); /*Finally join up to the top right corner where started */ -$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+10,$Page_Width-$Right_Margin, $Bottom_Margin+370); +$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+10,$Page_Width-$Right_Margin, $Bottom_Margin+350); -$YPos -= $line_height; - -$FontSize =12; - +$YPos -= (2*$line_height); ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |