$Addr1['address'] = $this->formData['address'];
$Addr2['title'] = _("Deliver To");
$Addr2['name'] = $this->company['coy_name'];
- $Addr2['address'] = $this->formData['deliver_to'];
+ $Addr2['address'] = $this->company['postal_address'];
$this->formData['document_date'] = $this->formData['ord_date'];
$this->formData['document_number'] = $this->formData['order_no'];
return ($px / $unit_offset_length);
}
- function End($email=0, $subject=null, $myrow=null, $doctype = 0)
+ function End($email=0, $subject='')
{
global $path_to_root;
++$this->y;
$this->{$this->headerTmpl}();
}
- function End($email=0)
+ function End($email=0, $subject='')
{
global $pdf_debug, $path_to_root;
display_error(_("You have no email contact defined for this type of document"));
} else {
$sent = $try = 0;
- $subject = $this->formData['document_name'] . ' '. $this->formData['document_number'];
+ if(!$subject)
+ $subject = $this->formData['document_name'] . ' '. $this->formData['document_number'];
foreach($this->contactData as $contact) {
if (!isset($contact['email']))
continue;
$rep->Font();
if ($email == 1)
{
- $rep->End($email, '', $myrow, ST_SALESINVOICE);
+ $rep->End($email);
}
}
if ($email == 0)
for ($i = 0; $i < 5; $i++)
$rep->TextWrap($col[$i], $rep->row, $col[$i + 1] - $col[$i], $str2[$i], 'right');
if ($email == 1)
- $rep->End($email, _("Statement") . " " . _("as of") . " " . sql2date($date), $myrow, ST_STATEMENT);
+ $rep->End($email, _("Statement") . " " . _("as of") . " " . sql2date($date));
}
if ($email == 0)
$rep->Font();
if ($email == 1)
{
- $rep->End($email, '', $myrow);
+ $rep->End($email);
}
}
if ($email == 0)
}
if ($email == 1)
{
- $rep->End($email, '', $myrow, ST_CUSTDELIVERY);
+ $rep->End($email);
}
}
if ($email == 0)
{
if ($print_invoice_no == 1)
$myrow['reference'] = $i;
- $rep->End($email, '', $myrow);
+ $rep->End($email);
}
}
if ($email == 0)
if ($email == 1)
{
$myrow['dimension_id'] = $paylink; // helper for pmt link
- $rep->End($email, '', $myrow, ST_CUSTCREDIT);
+ $rep->End($email);
}
}
if ($email == 0)
if ($myrow['reference'] == "")
$myrow['reference'] = $myrow['order_no'];
- $rep->End($email, '', $myrow);
+ $rep->End($email);
}
}
if ($email == 0)
if ($email == 1)
{
$myrow['DebtorName'] = $myrow['supp_name'];
- $rep->End($email, '', $myrow);
+ $rep->End($email);
}
}
}
{
$myrow['DebtorName'] = $myrow['contact'];
$myrow['reference'] = $myrow['wo_ref'];
- $rep->End($email, _("Work Order No.") . " " . $myrow['wo_ref'], $myrow);
+ $rep->End($email);
}
}
if ($email == 0)