- $rep = new FrontReport("", "", user_pagesize());
- $rep->SetHeaderType('Header2');
- $rep->currency = $cur;
- $rep->Font();
- if ($j == ST_SALESINVOICE)
- {
- $rep->title = _('INVOICE');
- $rep->filename = "Invoice" . $myrow['reference'] . ".pdf";
- }
- else
- {
- $rep->title = _('CREDIT NOTE');
- $rep->filename = "CreditNote" . $myrow['reference'] . ".pdf";
- }
- $rep->Info($params, $cols, null, $aligns);
- }
- else
- $rep->title = ($j == ST_SALESINVOICE) ? _('INVOICE') : _('CREDIT NOTE');
- $contacts = get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no']);
- $rep->SetCommonData($myrow, $branch, $sales_order, $baccount, $j, $contacts);
- $rep->NewPage();
+ $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
+ $rep->title = _('INVOICE');
+ $rep->filename = "Invoice" . $myrow['reference'] . ".pdf";
+ }
+ $rep->SetHeaderType('Header2');
+ $rep->currency = $cur;
+ $rep->Font();
+ $rep->Info($params, $cols, null, $aligns);