+ return $this->addTextWrap($xpos, $ypos, $len, $this->fontSize, $str, $align, $border, $fill, $link, $stretch, $spacebreak);
+ }
+
+ function TextCol($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=1)
+ {
+ return $this->TextWrap($this->cols[$c], $this->row - $r, $this->cols[$n] - $this->cols[$c] + $corr, $txt, $this->aligns[$c], $border, $fill, $link, $stretch);
+ }
+
+ function AmountCol($c, $n, $txt, $dec=0, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=1, $color_red=false)
+ {
+ if ($color_red && $txt < 0)
+ $this->SetTextColor(255, 0, 0);
+ $ret = $this->TextCol($c, $n, number_format2($txt, $dec), $corr, $r, $border, $fill, $link, $stretch);
+ if ($color_red && $txt < 0)
+ $this->SetTextColor(0, 0, 0);
+ return $ret;
+ }
+
+ function AmountCol2($c, $n, $txt, $dec=0, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=1, $color_red=false, $amount_locale = 'en_US.UTF-8', $amount_format = '%(!.2n')
+ {
+ setlocale(LC_MONETARY, $amount_locale);
+ if ($color_red && $txt < 0)
+ $this->SetTextColor(255, 0, 0);
+ $ret = $this->TextCol($c, $n, money_format($amount_format, $txt), $corr, $r, $border, $fill, $link, $stretch);
+ if ($color_red && $txt < 0)
+ $this->SetTextColor(0, 0, 0);
+ return $ret;
+ }
+
+ function DateCol($c, $n, $txt, $conv=false, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=1)
+ {
+ if ($conv)
+ $txt = sql2date($txt);
+ return $this->TextCol($c, $n, $txt, $corr, $r, $border, $fill, $link, $stretch);