return $this->TextWrap($c, $this->row - $r, $n - $c + $corr, $txt, $align, $border, $fill, $link, $stretch);
}
- function TextWrap($xpos, $ypos, $len, $str, $align = 'left', $border = 0, $fill = 0, $link = NULL, $stretch = 1)
+ function TextWrap($xpos, $ypos, $len, $str, $align = 'left', $border = 0, $fill = 0, $link = NULL, $stretch = 1, $spacebreak=false)
{
if ($this->fontSize != $this->oldFontSize)
{
$this->SetFontSize($this->fontSize);
$this->oldFontSize = $this->fontSize;
}
- return $this->addTextWrap($xpos, $ypos, $len, $this->fontSize, $str, $align, $border, $fill, $link, $stretch);
+ 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->cols2[$c], $this->row - $r, $this->cols2[$n] - $this->cols2[$c] + $corr, $txt, $this->aligns2[$c], $border, $fill, $link, $stretch);
}
- function TextColLines($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=1)
+ function TextColLines($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=0)
{
$this->row -= $r;
- $this->TextWrapLines($this->cols[$c], $this->cols[$n] - $this->cols[$c] + $corr, $txt, $this->aligns[$c], $border, $fill, $link, $stretch);
+ $this->TextWrapLines($this->cols[$c], $this->cols[$n] - $this->cols[$c] + $corr, $txt, $this->aligns[$c], $border, $fill, $link, $stretch, true);
}
- function TextWrapLines($c, $width, $txt, $align='left', $border=0, $fill=0, $link=NULL, $stretch=1)
+ function TextWrapLines($c, $width, $txt, $align='left', $border=0, $fill=0, $link=NULL, $stretch=0, $spacebreak=true)
{
$str = Explode("\n", $txt);
for ($i = 0; $i < count($str); $i++)
$l = $str[$i];
do
{
- $l = $this->TextWrap($c, $this->row , $width, $l, $align, $border, $fill, $link, $stretch);
+ $l = $this->TextWrap($c, $this->row , $width, $l, $align, $border, $fill, $link, $stretch, $spacebreak);
$this->row -= $this->lineHeight;
}
while ($l != '');
include("includes/doctext.inc");
}
require_once($path_to_root . "/reporting/includes/class.mail.inc");
- $mail = new email($this->company['coy_name'], $this->company['email']);
+ $mail = new email(str_replace(",", "", $this->company['coy_name']), $this->company['email']);
if (!isset($myrow['email']) || $myrow['email'] == '')
$myrow['email'] = isset($myrow['contact_email']) ? $myrow['contact_email'] : '';
- $to = $myrow['DebtorName'] . " <" . $myrow['email'] . ">";
+ $to = str_replace(",", "", $myrow['DebtorName']) . " <" . $myrow['email'] . ">";
$msg = $doc_Dear_Sirs . " " . $myrow['DebtorName'] . ",\n\n" . $doc_AttachedFile . " " . $subject .
"\n\n";
if (isset($myrow['dimension_id']) && $myrow['dimension_id'] > 0 && $doctype == ST_SALESINVOICE) // helper for payment links