Hello,
in my invoice template I have a function for some customers get other text, not the text in general setup.
if (
$userid == '58' ||
$userid == '102' ||
$userid == '50' ||
$userid == '295' ||
$userid == '281')
{
if (!class_exists('MYPDF')) {
class MYPDF extends TCPDF {
public function Header() {
global $_LANG;
global $invoicenum;
$this->Image(ROOTDIR.'/templates/avantwhmcs/img/logo.png', 169, 8);
$this->SetXY(5,10);
}
public function Footer() {
global $_LANG;
$this->SetY(-20);
$this->SetFont('freesans', '', 10);
$this->writeHTMLCell(0, 0, $this->GetX(), $this->GetY(), '<table>
<tr>
<td><span style="color: #000000;"><b>'.$_LANG['invoicesaccountowner'].'Account Owner: xx</b></span></td>
<td><span style="color: #000000;"><b>'.$_LANG['invoicesbankaddress'].'Bank: xx</b></span></td>
</tr>
<tr>
<td><span style="color: #000000;"><b>IBAN: xx</b></span></td>
<td><span style="color: #000000;"><b>xx. xx</b></span></td>
</tr>
<tr>
<td><span style="color: #000000;"><b>SWIFT/BIC: xx</b></span></td>
<td><span style="color: #000000;"><b>DE-xx, xx</b></span></td>
</tr>
</table>', 0, 1, false, true, 'C');
}
}
}
} else {
if (!class_exists('MYPDF')) {
class MYPDF extends TCPDF {
public function Header() {
global $_LANG;
global $invoicenum;
$this->Image(ROOTDIR.'/templates/avantwhmcs/img/logo.png', 169, 8);
$this->SetXY(5,10);
}
public function Footer() {
global $_LANG;
$this->SetY(-20);
$this->SetFont('freesans', '', 10);
$this->writeHTMLCell(0, 0, $this->GetX(), $this->GetY(), '<table>
<tr>
<td><span style="color: #ff0000;"><b>'.$_LANG['invoicesaccountowner'].' Bank transfer:</b></span></td>
<td><span style="color: #ff0000;"><b>'.$_LANG['invoicesbankaddress'].' Bankueberweisung:</b></span></td>
</tr>
<tr>
<td><span style="color: #ff0000;"><b>Please contact support</b></span></td>
<td><span style="color: #ff0000;"><b>Bitte kontaktieren Sie den Support</b></span></td>
</tr>
<tr>
<td><span style="color: #ff0000;"><b>Ticket or e-Mail - support@xxx.com</b></span></td>
<td><span style="color: #ff0000;"><b>Ticket oder e-Mail - support@xxx.com</b></span></td>
</tr>
</table>', 0, 1, false, true, 'C');
}
}
}
}
this works fine, if I klick on download or send to custumer. But if the CRON create the invoice and send it to the Customer, its not working. can someone help me to understand why?
thank you