}
else
$rep->title = ($j == ST_SALESINVOICE) ? _('INVOICE') : _('CREDIT NOTE');
- $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no']);
+ $contacts = get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no']);
$rep->SetCommonData($myrow, $branch, $sales_order, $baccount, $j, $contacts);
$rep->NewPage();
if ($email == 1)
{
$myrow['dimension_id'] = $paylink; // helper for pmt link
- if ($myrow['email'] == '')
- {
- $myrow['email'] = $branch['email'];
- $myrow['DebtorName'] = $branch['br_name'];
- }
$rep->End($email, $doc_Invoice_no . " " . $myrow['reference'], $myrow, $j);
}
}