|
From: <rc...@us...> - 2013-11-06 13:23:28
|
Revision: 6392
http://sourceforge.net/p/web-erp/reponame/6392
Author: rchacon
Date: 2013-11-06 13:23:25 +0000 (Wed, 06 Nov 2013)
Log Message:
-----------
Allow multiline printing of salesorderdetails.narrative in quotations.
Modified Paths:
--------------
trunk/PDFQuotation.php
trunk/PDFQuotationPortrait.php
trunk/doc/Change.log
Modified: trunk/PDFQuotation.php
===================================================================
--- trunk/PDFQuotation.php 2013-11-05 01:31:20 UTC (rev 6391)
+++ trunk/PDFQuotation.php 2013-11-06 13:23:25 UTC (rev 6392)
@@ -204,14 +204,19 @@
$LeftOvers = $pdf->addTextWrap(585,$YPos,85,$FontSize,$DisplayTaxClass,'right');
$LeftOvers = $pdf->addTextWrap(650,$YPos,85,$FontSize,$DisplayTaxAmount,'right');
$LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90, $YPos, 90, $FontSize, $DisplayTotal,'right');
- if (mb_strlen($myrow2['narrative'])>1){
- $YPos -= ($line_height);
- $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,870,$FontSize,$myrow2['narrative']);
- if (mb_strlen($LeftOvers) >1){
- $YPos -= 11;
- $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,870,$FontSize,$LeftOvers);
+
+ // Prints salesorderdetails.narrative
+ $Split = explode("\r\n", wordwrap($myrow2['narrative'], 130, "\r\n"));
+ foreach ($Split as $TextLine) {
+ $YPos -= $line_height; // rchacon's suggestion: $YPos -= $FontSize;
+ if ($YPos < ($Bottom_Margin + $line_height)){ // Begins new page
+ $PageNumber++;
+ include ('includes/PDFQuotationPageHeader.inc');
}
+ $LeftOvers = $pdf->addTextWrap($XPos+1, $YPos, 870, $FontSize, $TextLine);
}
+ $YPos -= $line_height;
+
$QuotationTotal +=$LineTotal;
$QuotationTotalEx +=$SubTot;
$TaxTotal +=$TaxAmount;
Modified: trunk/PDFQuotationPortrait.php
===================================================================
--- trunk/PDFQuotationPortrait.php 2013-11-05 01:31:20 UTC (rev 6391)
+++ trunk/PDFQuotationPortrait.php 2013-11-06 13:23:25 UTC (rev 6392)
@@ -204,14 +204,19 @@
$LeftOvers = $pdf->addTextWrap(330,$YPos,85,$FontSize,$DisplayTaxClass,'right');
$LeftOvers = $pdf->addTextWrap(410,$YPos,85,$FontSize,$DisplayTaxAmount,'center');
$LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90, $YPos, 90, $FontSize, $DisplayTotal,'right');
- if (mb_strlen($myrow2['narrative'])>1){
- $YPos -= 10;
- $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,750,10,$myrow2['narrative']);
- if (mb_strlen($LeftOvers>1)){
- $YPos -= 10;
- $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,750,10,$LeftOvers);
+
+ // Prints salesorderdetails.narrative
+ $Split = explode("\r\n", wordwrap($myrow2['narrative'], 130, "\r\n"));
+ foreach ($Split as $TextLine) {
+ $YPos -= $line_height; // rchacon's suggestion: $YPos -= $FontSize;
+ if ($YPos < ($Bottom_Margin + $line_height)){ // Begins new page
+ $PageNumber++;
+ include ('includes/PDFQuotationPageHeader.inc');
}
+ $LeftOvers = $pdf->addTextWrap($XPos+1, $YPos, 750, 10, $TextLine);
}
+ $YPos -= $line_height;
+
$QuotationTotal +=$LineTotal;
$QuotationTotalEx +=$SubTot;
$TaxTotal +=$TaxAmount;
@@ -272,4 +277,4 @@
$pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d') . '.pdf');
$pdf->__destruct();
}
-?>
\ No newline at end of file
+?>
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2013-11-05 01:31:20 UTC (rev 6391)
+++ trunk/doc/Change.log 2013-11-06 13:23:25 UTC (rev 6392)
@@ -1,4 +1,5 @@
webERP Change Log
+06/11/2013 rchacon: Allow multiline printing of salesorderdetails.narrative in Quotations.
5/11/2013 Phil: Fixed the warning error in GLAccountInquiry.php add change variable type to array to make min() and max() reasonable. Reported by Jo
04/11/2013 icedlava: change insert new clone stock event to transaction as in Stocks.php for new item.
03/11/2013 rchacon: Allow translate the name of the currency on CompanyPreferences.php.
|