From: <dai...@us...> - 2011-07-09 08:23:06
|
Revision: 4629 http://web-erp.svn.sourceforge.net/web-erp/?rev=4629&view=rev Author: daintree Date: 2011-07-09 08:22:59 +0000 (Sat, 09 Jul 2011) Log Message: ----------- wrapping text on quotation comments Modified Paths: -------------- trunk/GLAccounts.php trunk/PDFQuotation.php trunk/doc/Change.log Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2011-07-08 10:43:09 UTC (rev 4628) +++ trunk/GLAccounts.php 2011-07-09 08:22:59 UTC (rev 4629) @@ -37,7 +37,7 @@ $sql = "UPDATE chartmaster SET accountname='" . $_POST['AccountName'] . "', group_='" . $_POST['Group'] . "' - WHERE accountcode ='" . $SelectedAccount . "'"; + WHERE accountcode ='" . $SelectedAccount . "'"; $ErrMsg = _('Could not update the account because'); $result = DB_query($sql,$db,$ErrMsg); @@ -52,8 +52,7 @@ group_) VALUES ('" . $_POST['AccountCode'] . "', '" . $_POST['AccountName'] . "', - '" . $_POST['Group'] . "' - )"; + '" . $_POST['Group'] . "')"; $result = DB_query($sql,$db,$ErrMsg); prnMsg(_('The new general ledger account has been added'),'success'); @@ -69,9 +68,10 @@ // PREVENT DELETES IF DEPENDENT RECORDS IN 'ChartDetails' - - - $sql= "SELECT COUNT(*) FROM chartdetails WHERE chartdetails.accountcode ='" . $SelectedAccount . "' AND chartdetails.actual <>0"; + $sql= "SELECT COUNT(*) + FROM chartdetails + WHERE chartdetails.accountcode ='" . $SelectedAccount . "' + AND chartdetails.actual <>0"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { @@ -81,7 +81,9 @@ } else { // PREVENT DELETES IF DEPENDENT RECORDS IN 'GLTrans' - $sql= "SELECT COUNT(*) FROM gltrans WHERE gltrans.account ='" . $SelectedAccount . "'"; + $sql= "SELECT COUNT(*) + FROM gltrans + WHERE gltrans.account ='" . $SelectedAccount . "'"; $ErrMsg = _('Could not test for existing transactions because'); @@ -96,14 +98,14 @@ } else { //PREVENT DELETES IF Company default accounts set up to this account $sql= "SELECT COUNT(*) FROM companies - WHERE debtorsact='" . $SelectedAccount ."' - OR pytdiscountact='" . $SelectedAccount ."' - OR creditorsact='" . $SelectedAccount ."' - OR payrollact='" . $SelectedAccount ."' - OR grnact='" . $SelectedAccount ."' - OR exchangediffact='" . $SelectedAccount ."' - OR purchasesexchangediffact='" . $SelectedAccount ."' - OR retainedearnings='" . $SelectedAccount ."'"; + WHERE debtorsact='" . $SelectedAccount ."' + OR pytdiscountact='" . $SelectedAccount ."' + OR creditorsact='" . $SelectedAccount ."' + OR payrollact='" . $SelectedAccount ."' + OR grnact='" . $SelectedAccount ."' + OR exchangediffact='" . $SelectedAccount ."' + OR purchasesexchangediffact='" . $SelectedAccount ."' + OR retainedearnings='" . $SelectedAccount ."'"; $ErrMsg = _('Could not test for default company GL codes because'); @@ -144,7 +146,9 @@ prnMsg( _('Cannot delete this account because it is used by one of the sales GL posting interface records'),'warn'); } else { //PREVENT DELETES IF COGS POSTINGS USE THE GL ACCOUNT - $sql= "SELECT COUNT(*) FROM cogsglpostings WHERE glcode='" . $SelectedAccount ."'"; + $sql= "SELECT COUNT(*) + FROM cogsglpostings + WHERE glcode='" . $SelectedAccount ."'"; $ErrMsg = _('Could not test for existing cost of sales interface codes because'); @@ -158,11 +162,11 @@ } else { //PREVENT DELETES IF STOCK POSTINGS USE THE GL ACCOUNT $sql= "SELECT COUNT(*) FROM stockcategory - WHERE stockact='" . $SelectedAccount ."' - OR adjglact='" . $SelectedAccount ."' - OR purchpricevaract='" . $SelectedAccount ."' - OR materialuseagevarac='" . $SelectedAccount ."' - OR wipact='" . $SelectedAccount ."'"; + WHERE stockact='" . $SelectedAccount ."' + OR adjglact='" . $SelectedAccount ."' + OR purchpricevaract='" . $SelectedAccount ."' + OR materialuseagevarac='" . $SelectedAccount ."' + OR wipact='" . $SelectedAccount ."'"; $Errmsg = _('Could not test for existing stock GL codes because'); Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2011-07-08 10:43:09 UTC (rev 4628) +++ trunk/PDFQuotation.php 2011-07-09 08:22:59 UTC (rev 4629) @@ -186,10 +186,10 @@ $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,$DisplayTotal,'right'); if (mb_strlen($myrow2['narrative'])>1){ $YPos -= ($line_height); - $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,800,$FontSize,$myrow2['narrative']); + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,870,$FontSize,$myrow2['narrative']); if (mb_strlen($LeftOvers) >1){ $YPos -= 11; - $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,800,$FontSize,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,870,$FontSize,$LeftOvers); } } $QuotationTotal +=$LineTotal; @@ -209,35 +209,36 @@ include ('includes/PDFQuotationPageHeader.inc'); } //end if need a new page headed up - $LeftOvers = $pdf->addTextWrap($XPos,$YPos-80,200,10,_('Notes:')); - $LeftOvers = $pdf->addText($XPos,$YPos-95,10,$myrow['comments']); - + $YPos -= ($line_height); + $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Total Tax'),'right'); + $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($TaxTotal,2),'right'); + $YPos -= 12; + $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Excluding Tax'),'right'); + $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($QuotationTotalEx,2),'right'); + $YPos -= 12; + $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Including Tax'),'right'); + $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($QuotationTotal,2),'right'); + + $YPos -= ($line_height); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,20,10,_('Notes:')); + $LeftOvers = $pdf->addTextWrap($XPos+28,$YPos,800,10,$myrow['comments']); + if (mb_strlen($LeftOvers)>1){ $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos,$YPos,700,10,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,850,10,$LeftOvers); if (mb_strlen($LeftOvers)>1){ $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos,$YPos,700,10,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,850,10,$LeftOvers); if (mb_strlen($LeftOvers)>1){ $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos,$YPos,700,10,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,850,10,$LeftOvers); if (mb_strlen($LeftOvers)>1){ $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos,$YPos,10,$FontSize,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,850,10,$LeftOvers); } } } } - $YPos -= ($line_height); - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Total Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($TaxTotal,2),'right'); - $YPos -= 12; - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Excluding Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($QuotationTotalEx,2),'right'); - $YPos -= 12; - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Including Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($QuotationTotal,2),'right'); - } /*end if there are line details to show on the quotation*/ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-08 10:43:09 UTC (rev 4628) +++ trunk/doc/Change.log 2011-07-09 08:22:59 UTC (rev 4629) @@ -1,6 +1,7 @@ webERP Change Log -8/7/11 Phil: Remove duplication of checking for illegal characters - use the same function in MiscFunctions.php ContainsIllegalCharacters in Currencies and the utility scripts +9/7/11 Phil/Beth Lesko: Comments not wrapping correctly on quotations - fixed landscape quotation +8/7/11 Phil: Remove duplication of checking for illegal characters - use the same function in MiscFunctions.php ContainsIllegalCharacters in Currencies and the utility scripts Z_ChangeBranchCode.php and Z_ImportStockCodes.php 8/7/11 Phil: Change all strstr occurrences to use multi-byte function mb_strstr 8/7/11 Phil: Trap codes with decimal point "." in them in the IllegalCharacters function 8/7/11 Phil: Fix discount matrix calculations on order entry and amendment This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |