2009-10-08 01:42:23 -07:00
< ? php
App :: import ( 'Vendor' , 'tcpdf/tcpdf' );
2009-11-18 15:23:21 -08:00
class XTCPDF extends TCPDF {
2009-10-08 01:42:23 -07:00
var $xheadertext = 'PDF created using CakePHP and TCPDF' ;
var $xheadercolor = array ( 0 , 0 , 200 );
var $xfootertext = 'Copyright © %d XXXXXXXXXXX. All rights reserved.' ;
var $xfooterfont = PDF_FONT_NAME_MAIN ;
var $xfooterfontsize = 8 ;
2009-10-11 01:59:21 -07:00
2009-10-08 01:42:23 -07:00
/**
2009-11-18 15:23:21 -08:00
* Overwrites the default header
* set the text in the view using
* $fpdf -> xheadertext = 'YOUR ORGANIZATION' ;
* set the fill color in the view using
* $fpdf -> xheadercolor = array ( 0 , 0 , 100 ); ( r , g , b )
* set the font in the view using
* $fpdf -> setHeaderFont ( array ( 'YourFont' , '' , fontsize ));
*/
function Page1Header () {
2009-10-08 01:42:23 -07:00
2009-10-08 22:07:50 -07:00
2009-10-08 01:42:23 -07:00
list ( $r , $b , $g ) = $this -> xheadercolor ;
2009-10-08 22:07:50 -07:00
2009-10-08 01:42:23 -07:00
//$this->setY(10); // shouldn't be needed due to page margin, but helas, otherwise it's at the page top
2009-11-18 15:23:21 -08:00
2009-10-08 01:42:23 -07:00
$this -> SetFillColor ( 255 , 255 , 255 );
2009-10-08 22:07:50 -07:00
$this -> SetTextColor ( 0 , 0 , 152 ); //Set the Text Color to Blue
2009-11-18 15:23:21 -08:00
// $this->Image($file, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $ismask, $imgmask, $border, $fitbox, $hidden)
2009-10-11 01:59:21 -07:00
$this -> Image ( K_PATH_IMAGES . 'cmclogosmall.jpg' , 10 , 10 , 30 , 0 , null , 'http://www.cmctechnologies.com.au' , null , false , null , 'L' );
2009-10-08 22:07:50 -07:00
$this -> Cell ( 30 );
$this -> SetFont ( 'times' , 'B' );
2009-10-11 01:59:21 -07:00
$this -> SetFontSize ( 30 );
2009-10-08 01:42:23 -07:00
$this -> Cell ( 0 , 0 , $this -> xheadertext , 0 , 1 , 'C' , 1 );
2009-10-08 22:07:50 -07:00
$this -> SetFontSize ( 10 );
2009-10-11 01:59:21 -07:00
$this -> SetY ( 22 );
2009-10-08 22:07:50 -07:00
$this -> Cell ( 30 );
2009-10-09 00:10:41 -07:00
$this -> Cell ( 0 , 0 , " PTY LIMITED ACN: 47 085 991 224 ABN: 47 085 991 224 " , 0 , 1 , 'C' , 1 );
2009-11-18 15:23:21 -08:00
$this -> Rect ( $this -> GetX () + 33 , $this -> GetY () + 2 , 157 , 2 , 'DF' , array ( 'width' => 0 ), array ( 0 , 0 , 0 ));
2009-10-08 22:07:50 -07:00
/* Start the contact details */
2009-11-18 15:23:21 -08:00
$this -> SetTextColor ( 0 ); //Set the Text Color to Black
2009-10-14 23:58:09 -07:00
$this -> MultiCell ( 18 , 0 , " Phone: \n Fax: \n Email: \n Web Site: \n " , 0 , 'L' , 0 , 0 , 45 , 32 );
2009-10-08 22:07:50 -07:00
$this -> MultiCell ( 50 , 0 , " +61 2 9669 4000<br>+61 2 9669 4111<br><a href= \" mailto:sales@cmctechnologies.com.au \" >sales@cmctechnologies.com.au</a>
< br >< a href = \ " http://www.cmctechnologies.com.au \" >www.cmctechnologies.com.au</a><br> " , 0 , 'L' , 0 , 0 , 65 , null , true , 0 , true );
$this -> MultiCell ( 50 , 0 , " Unit 19, 77 Bourke Rd \n Alexandria \n NSW 2015 \n AUSTRALIA \n " , 0 , 'L' , 0 , 0 , 150 , null );
$this -> SetTextColor ( 0 , 0 , 152 ); //Set the Text Color to Blue
$this -> SetFont ( 'times' , 'B' );
2009-10-14 23:58:09 -07:00
$this -> MultiCell ( 30 , 20 , " Engineering & \n Industrial \n Instrumentation " , 0 , 'L' , 0 , 1 , 10 , 37 );
2009-11-18 15:23:21 -08:00
2009-10-08 22:07:50 -07:00
2009-10-08 01:42:23 -07:00
}
/**
2009-11-18 15:23:21 -08:00
* Overwrites the default footer
* set the text in the view using
* $fpdf -> xfootertext = 'Copyright © %d YOUR ORGANIZATION. All rights reserved.' ;
*/
function Page1Footer () {
2009-10-08 01:42:23 -07:00
$this -> SetY ( - 20 );
2009-10-29 23:29:20 -07:00
$this -> Image ( K_PATH_IMAGES . 'cmcfooter.jpg' , null , 255 , 200 , 0 , null , 'http://www.cmctechnologies.com.au' , null , false , null , 'C' );
2009-10-08 22:07:50 -07:00
}
/**
* For Quotes and ( hopefully ) Invoices . Identifies who the document is for , date , reference number , etc .
*/
2009-10-15 23:43:17 -07:00
function DetailsBox ( $companyName , $emailTo , $attention , $fromName , $fromEmail , $enquiryNumber , $your_reference ) {
2009-10-08 22:07:50 -07:00
2009-10-09 00:10:41 -07:00
$this -> SetTextColor ( 0 ); //Black Text
2009-11-18 15:23:21 -08:00
$boxYstart = 45 ;
$boxXstart = 10 ;
$firstColWidth = 40 ;
$secondColWidth = 70 ;
$thirdColWidth = 30 ;
$fourthColWidth = - 10 ;
$pageNo = $this -> PageNoFormatted ();
//$pageOf = $this->getAliasNbPages();
2009-10-09 00:10:41 -07:00
2009-11-18 15:23:21 -08:00
$this -> SetXY ( $boxXstart , 55 );
2009-10-08 22:07:50 -07:00
2009-11-18 15:23:21 -08:00
$heightNeeded = $this -> getNumLines ( $companyName , $secondColWidth );
2009-11-19 20:04:30 -08:00
//echo "Height needed: $heightNeeded";
2009-10-09 00:10:41 -07:00
2009-11-18 15:23:21 -08:00
$lineHeight = 6.40997 ; //Size of a single line of text. If the company name is more, multiply this by the number of lines it needs.
2009-10-14 23:58:09 -07:00
2009-11-18 15:23:21 -08:00
// $lineHeight = 0;
2009-10-09 00:10:41 -07:00
2009-11-18 15:23:21 -08:00
// $this->MultiCell($w, $h, $txt, $border, $align, $fill, $ln, $x, $y, $reseth, $stretch, $ishtml);
2009-10-09 00:10:41 -07:00
2009-10-14 23:58:09 -07:00
2009-11-18 15:23:21 -08:00
$this -> MultiCell ( $firstColWidth , $lineHeight * $heightNeeded , " QUOTATION TO: " , 'LTR' , 'L' , 0 , 0 );
$this -> MultiCell ( $secondColWidth , $lineHeight * $heightNeeded , $companyName , 'LTR' , 'L' , 0 , 0 );
2009-10-11 01:59:21 -07:00
2009-11-18 15:23:21 -08:00
$this -> MultiCell ( $thirdColWidth , $lineHeight * $heightNeeded , " FROM: " , 'LT' , 'L' , 0 , 0 );
$this -> MultiCell ( $fourthColWidth , $lineHeight * $heightNeeded , " <a href= \" mailto: $fromEmail\ " > $fromName </ a > " , 'TR', 'L', 0, 1, null,null, true,0,true); //Start a new line after this.
// echo "Last height: ".$this->getLastH();
2009-10-11 01:59:21 -07:00
2009-11-18 15:23:21 -08:00
$this -> MultiCell ( $firstColWidth , 0 , " EMAIL TO: " , 'LR' , 'L' , 0 , 0 );
$this -> MultiCell ( $secondColWidth , 0 , " <a href= \" mailto: $emailTo\ " > $emailTo </ a > " , 'LR','L', 0, 0, null, null, true, 0, true);
$this -> MultiCell ( $thirdColWidth , 0 , " CMC REF#: " , 'L' , 'L' , 0 , 0 );
$this -> MultiCell ( $fourthColWidth , 0 , $enquiryNumber , 'R' , 'L' , 0 , 1 ); //Start a new line after thi
2009-10-09 00:10:41 -07:00
2009-11-18 15:23:21 -08:00
$this -> MultiCell ( $firstColWidth , 0 , " ATTENTION: " , 'LRB' , 'L' , 0 , 0 );
$this -> MultiCell ( $secondColWidth , 0 , $attention , 'LRB' , 'L' , 0 , 0 );
$this -> MultiCell ( $thirdColWidth , 0 , " PAGE: " , 'LB' , 'L' , 0 , 0 );
$this -> MultiCell ( $fourthColWidth , 0 , " $pageNo of { nb} " , 'BR' , 'L' , 0 , 1 );
2009-10-09 00:10:41 -07:00
2009-11-18 15:23:21 -08:00
$todaysDateString = date ( 'l, j F Y' );
$this -> MultiCell ( $firstColWidth + $secondColWidth , 0 , " DATE: $todaysDateString " , 'LRB' , 'L' , 0 , 0 );
$this -> MultiCell ( $thirdColWidth , 0 , " YOUR REF: " , 'LB' , 'L' , 0 , 0 );
2009-10-15 23:43:17 -07:00
2009-11-18 15:23:21 -08:00
$this -> MultiCell ( $fourthColWidth , 0 , $your_reference , 'BR' , 'L' , 0 , 1 );
$this -> SetFontSize ( 6 );
//Kinda lame that I cant seem to wrap this text nicer. But Whatever.
$this -> MultiCell ( 0 , 0 , 'The information in this document is confidential and may be privileged. If you are not the indended recipient then access, disclosure, copying or other dissemination of the contents of t his message is unauthorised and may be unlawful. Please inform the sender immediately if you are not the intended addressee.' ,
'' , 'L'
2009-10-15 23:43:17 -07:00
);
2009-11-18 15:23:21 -08:00
2009-10-08 01:42:23 -07:00
}
2009-10-15 23:43:17 -07:00
2009-10-29 23:29:20 -07:00
function continuedHeader ( $cmcRef ) {
$this -> Image ( K_PATH_IMAGES . 'cmclogosmall.jpg' , 10 , 10 , 15 , 13.6 , null , 'http://www.cmctechnologies.com.au' , null , false , null , 'L' );
$this -> SetFontSize ( 10 );
$pageNo = $this -> PageNoFormatted ();
$this -> MultiCell ( 0 , 13.6 , " $cmcRef PAGE $pageNo OF { nb} " , '' , 'R' );
2009-11-18 15:23:21 -08:00
//$this->MultiCell($w, $h, $txt, $border, $align, $fill, $ln, $x, $y, $reseth, $stretch, $ishtml)
//$this->Image($file, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi)
2009-10-29 23:29:20 -07:00
2009-10-15 23:43:17 -07:00
}
2009-11-18 15:23:21 -08:00
/**
*
* @ param < type > $principleName
* @ param < type > $currency
2009-11-19 20:04:30 -08:00
* @ param int $gst - 0 or 1 if GST is applicable .
2009-11-18 15:23:21 -08:00
* @ param < type > $products
* @ param String $docType - the model name of the Products we want to put in the table . ie . QuoteProduct , or InvoiceProduct , etc
*/
2009-11-19 20:04:30 -08:00
function productPage ( $principleName , $currency , $gst , $products , $docType ) {
2009-11-18 15:23:21 -08:00
$this -> SetFontSize ( 10 );
2009-11-19 20:04:30 -08:00
$lineHeight = 5 ; //Size of a single line of text. If the company name is more, multiply this by the number of lines it needs
2009-11-18 15:23:21 -08:00
2009-11-19 20:04:30 -08:00
$itemColwidth = 12 ;
$qtyColwidth = 10 ;
$descColwidth = 120 ;
$unitpriceColwidth = 25 ;
2009-11-18 15:23:21 -08:00
$totalPricColwidth = - 10 ;
$this -> SetFillColor ( 240 );
//$heightNeeded = $this->getNumLines("ITEM\NO.", $itemColwidth);
//echo "HEADER ROW HEIGHT IS $heightNeeded";
2009-11-18 17:09:56 -08:00
/* Need to work out how many Pages the Product Table will need to be split over */
2009-11-19 20:04:30 -08:00
//echo "Product Page height is: ".$this->getPageHeight();
2009-11-18 17:09:56 -08:00
2009-11-18 15:23:21 -08:00
2009-11-18 19:57:55 -08:00
$availableHeight = 253 ; //Figured out experimentally. Approx 253mm of space left for the actual table data after the header rows.
2009-11-18 15:23:21 -08:00
2009-11-19 20:04:30 -08:00
// echo "Remaining space on the page is: $availableHeight <br>";
2009-11-18 19:57:55 -08:00
$pagesRequired = 1 ;
2009-11-18 15:23:21 -08:00
2009-11-18 19:57:55 -08:00
$theseProductsHeight = 0 ;
2009-11-18 15:23:21 -08:00
2009-11-18 19:57:55 -08:00
$remainingHeight = $availableHeight ;
2009-11-18 15:23:21 -08:00
2009-11-18 19:57:55 -08:00
$pageProducts = array (); //Array in the form $pageProducts[$pageNumber] = NUMBER_OF_ITEMS_ON_THIS_PAGE
//Can see already the final summary total thing is going to be a bit of a bitch to do.
foreach ( $products as $product ) {
2009-11-18 15:23:21 -08:00
2009-11-18 19:57:55 -08:00
$fullDesc = " <b> " . $product [ $docType ][ 'title' ] . '</b><br>' . $product [ $docType ][ 'description' ];
$linesNeeded = $this -> getNumLines ( $fullDesc , $descColwidth );
$mmNeeded = $linesNeeded * $lineHeight ;
2009-11-18 15:23:21 -08:00
2009-11-18 19:57:55 -08:00
if ( $remainingHeight - $mmNeeded <= 0 ) {
$pagesRequired ++ ;
$remainingHeight = $availableHeight ; //Start checking the next page;
2009-11-18 15:23:21 -08:00
2009-11-18 19:57:55 -08:00
$remainingHeight -= $mmNeeded ;
2009-11-18 15:23:21 -08:00
2009-11-19 20:04:30 -08:00
$pageProducts [ $pagesRequired ][] = $product ;
2009-11-18 17:09:56 -08:00
2009-11-18 19:57:55 -08:00
}
else {
$remainingHeight -= $mmNeeded ;
2009-11-19 20:04:30 -08:00
$pageProducts [ $pagesRequired ][] = $product ;
2009-11-18 17:09:56 -08:00
2009-11-18 19:57:55 -08:00
}
2009-11-18 15:23:21 -08:00
2009-11-19 20:04:30 -08:00
/* Reached the last product in this Product Table .
* Need to see if we still have enough room to print the totals , if not will need to put the last item on a new page .
*/
if ( end ( $products ) == $product ) {
}
2009-11-18 19:57:55 -08:00
}
2009-11-19 20:04:30 -08:00
//print_r($pageProducts[1]);
//echo "We need to make $pagesRequired product pages<br>";
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
$subTotal = 0 ;
2009-11-18 19:57:55 -08:00
for ( $i = 1 ; $i <= $pagesRequired ; $i ++ ) {
$this -> AddPage ();
//Draw Header Rows
$pageNo = $this -> PageNoFormatted ();
2009-11-19 20:04:30 -08:00
$this -> MultiCell ( 0 , 0 , " PAGE $pageNo OF { nb} " , 0 , " R " , 0 , 1 );
$this -> MultiCell ( 0 , 0 , " PRICING & SPECIFICATIONS " , 0 , " C " , 0 , 1 );
$this -> Ln ();
2009-11-18 19:57:55 -08:00
$this -> MultiCell ( $itemColwidth , 0 , " ITEM \n NO. " , 1 , " C " , 1 , 0 );
$heightNeeded = $this -> getLastH ();
/**
* @ todo this seems like a cleaner way of doing it than I did in the detailsBox () . Revise at some point
*/
$this -> MultiCell ( $qtyColwidth , $heightNeeded , " QTY " , 1 , " C " , 1 , 0 );
$this -> MultiCell ( $descColwidth , $heightNeeded , " DESCRIPTION " , 1 , " C " , 1 , 0 );
$this -> MultiCell ( $unitpriceColwidth , $heightNeeded , " UNIT \n PRICE " , 1 , " C " , 1 , 0 );
$this -> MultiCell ( $totalPricColwidth , $heightNeeded , " TOTAL \n PRICE " , 1 , " C " , 1 , 1 );
//Header Line 2
$this -> MultiCell ( $itemColwidth , 0 , " " , 1 , " C " , 1 , 0 );
$heightNeeded = $this -> getLastH ();
$this -> MultiCell ( $qtyColwidth , $heightNeeded , " " , 1 , " C " , 1 , 0 );
$this -> MultiCell ( $descColwidth , $heightNeeded , $principleName , 1 , " C " , 1 , 0 );
2009-11-19 20:04:30 -08:00
$this -> MultiCell ( $unitpriceColwidth , $heightNeeded , $currency [ 'iso4217' ], 1 , " C " , 1 , 0 );
$this -> MultiCell ( $totalPricColwidth , $heightNeeded , $currency [ 'iso4217' ], 1 , " C " , 1 , 1 );
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
//Start Printing Product cells, until we run out of room. Then continue on the next page
2009-11-18 19:57:55 -08:00
foreach ( $pageProducts [ $i ] as $product ) {
$fullDesc = " <b> " . $product [ $docType ][ 'title' ] . '</b><br>' . $product [ $docType ][ 'description' ];
2009-11-19 20:04:30 -08:00
$currentX = $this -> GetX ();
$currentY = $this -> GetY ();
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
$this -> SetX ( $currentX + $itemColwidth + $qtyColwidth );
$this -> MultiCell ( $descColwidth , 0 , $fullDesc , 1 , " L " , 0 , 0 , null , null , true , 0 , true );
$endOfDesc = $this -> GetX ();
$heightNeeded = $this -> getLastH ();
$this -> SetX ( $currentX );
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
$this -> MultiCell ( $itemColwidth , $heightNeeded , number_format ( $product [ $docType ][ 'item_number' ], 1 , '.' , '' ), 1 , " C " , 0 , 0 );
$this -> MultiCell ( $qtyColwidth , $heightNeeded , $product [ $docType ][ 'quantity' ], 1 , " C " , 0 , 0 );
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
$this -> SetX ( $endOfDesc );
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
$this -> MultiCell ( $unitpriceColwidth , $heightNeeded , $this -> formatCurrency ( $currency [ 'symbol' ], $product [ $docType ][ 'unit_price' ]), 1 , " C " , 0 , 0 );
$thisTotalPrice = $product [ $docType ][ 'quantity' ] * $product [ $docType ][ 'unit_price' ];
$this -> MultiCell ( $totalPricColwidth , $heightNeeded , $this -> formatCurrency ( $currency [ 'symbol' ], $thisTotalPrice ), 1 , " C " , 0 , 1 );
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
$subTotal += $thisTotalPrice ;
$lastY = $this -> GetY ();
$lastX = $this -> GetX ();
//echo $product[$docType]['item_number']." Last X is $lastX, Last Y is $lastY <br>";
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
if ( end ( $pageProducts [ $pagesRequired ]) == $product ) {
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
//$this->MultiCell($w, $h, $txt, $border, $align, $fill, $ln, $x, $y, $reseth, $stretch, $ishtml, $autopadding);
$this -> MultiCell ( $itemColwidth , 6 , " " , 1 , 'C' , 0 , 0 );
$this -> MultiCell ( $qtyColwidth , 6 , " " , 1 , 'C' , 0 , 0 );
$this -> MultiCell ( $descColwidth , 6 , " SUB-TOTAL (EXCLUDING GST) " , 1 , 'L' , 0 , 0 );
$this -> MultiCell ( $unitpriceColwidth , 6 , " " , 1 , 'C' , 0 , 0 );
$this -> MultiCell ( $totalPricColwidth , 6 , $this -> formatCurrency ( $currency [ 'symbol' ], $subTotal ), 1 , 'C' , 0 , 1 );
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
$this -> MultiCell ( $itemColwidth , 6 , " " , 1 , 'C' , 0 , 0 );
$this -> MultiCell ( $qtyColwidth , 6 , " " , 1 , 'C' , 0 , 0 );
$this -> MultiCell ( $descColwidth , 6 , " GST (10%) " , 1 , 'L' , 0 , 0 );
$this -> MultiCell ( $unitpriceColwidth , 6 , " " , 1 , 'C' , 0 , 0 );
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
if ( $gst == 1 ) {
$gstAmount = 0.1 * $subTotal ;
$this -> MultiCell ( $totalPricColwidth , 6 , $this -> formatCurrency ( $currency [ 'symbol' ], $gstAmount ), 1 , 'C' , 0 , 1 );
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
}
else {
$this -> MultiCell ( $totalPricColwidth , 6 , " N/A " , 1 , 'C' , 0 , 1 );
}
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
$this -> MultiCell ( $itemColwidth , 6 , " " , 1 , 'C' , 0 , 0 );
$this -> MultiCell ( $qtyColwidth , 6 , " " , 1 , 'C' , 0 , 0 );
$this -> MultiCell ( $descColwidth , 6 , " TOTAL PAYABLE " , 1 , 'L' , 0 , 0 );
$this -> MultiCell ( $unitpriceColwidth , 6 , " " , 1 , 'C' , 0 , 0 );
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
if ( $gst == 1 ) {
$totalPrice = $subTotal * 1.1 ;
}
else {
$totalPrice = $subTotal ;
}
$this -> MultiCell ( $totalPricColwidth , 6 , $this -> formatCurrency ( $currency [ 'symbol' ], $totalPrice ), 1 , 'C' , 0 , 1 );
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
}
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
}
2009-11-18 17:09:56 -08:00
2009-11-18 15:23:21 -08:00
2009-11-18 17:09:56 -08:00
2009-11-18 15:23:21 -08:00
2009-11-19 20:04:30 -08:00
//End Page For
2009-11-18 15:23:21 -08:00
}
2009-11-18 19:57:55 -08:00
2009-11-18 15:23:21 -08:00
2009-10-15 23:43:17 -07:00
2009-11-19 20:04:30 -08:00
$this -> AliasNbPages ();
$this -> lastPage ();
2009-11-17 14:42:42 -08:00
}
2009-11-18 19:57:55 -08:00
2009-11-19 20:04:30 -08:00
/**
* Helper method to format currency in an attractive human - viewable way . Australian style . Returns the formatted string .
* @ param String $symbol
*
* @ param $number
*/
function formatCurrency ( $symbol , $number ) {
list ( $int , $dec ) = explode ( '.' , $number ); //Creates an Undefined Offset notice. Fix eventually.
if ( $dec > 0 ) {
return $symbol . number_format ( $number , 2 , '.' , ',' );
}
else {
return $symbol . number_format ( $number , 0 , '.' , ',' );
}
}
2009-11-17 14:42:42 -08:00
2009-10-15 23:43:17 -07:00
2009-10-08 01:42:23 -07:00
}
2009-10-10 00:06:46 -07:00
?>