$branch = $employer->get_branch(); $sales = 'sales.' . strtolower($branch[0]['country']) . '@yellowelevator.com'; $branch[0]['address'] = str_replace(array("\r\n", "\r"), "\n", $branch[0]['address']); $branch['address_lines'] = explode("\n", $branch[0]['address']); $currency = Currency::getSymbolFromCountryCode($branch[0]['country']); $pdf = new CreditNote(); $pdf->AliasNbPages(); $pdf->SetAuthor('Yellow Elevator. This credit note was automatically generated. Signature is not required.'); $pdf->SetTitle($GLOBALS['COMPANYNAME'] . ' - Credit Note ' . pad($invoice, 11, '0')); $pdf->SetRefundAmount($credit_amount); $pdf->SetDescription($credit_note_desc); $pdf->SetCurrency($currency); $pdf->SetBranch($branch); $pdf->AddPage(); $pdf->SetFont('Arial', '', 10); $pdf->SetTextColor(255, 255, 255); $pdf->SetFillColor(54, 54, 54); $pdf->Cell(60, 5, "Credit Note Number", 1, 0, 'C', 1); $pdf->Cell(1); $pdf->Cell(33, 5, "Issuance Date", 1, 0, 'C', 1); $pdf->Cell(1); $pdf->Cell(33, 5, "Creditable By", 1, 0, 'C', 1); $pdf->Cell(1); $pdf->Cell(0, 5, "Amount Creditable (" . $currency . ")", 1, 0, 'C', 1); $pdf->Ln(6); $pdf->SetTextColor(0, 0, 0); $pdf->Cell(60, 5, pad($invoice, 11, '0'), 1, 0, 'C'); $pdf->Cell(1); $pdf->Cell(33, 5, $issued_on, 1, 0, 'C'); $pdf->Cell(1); $pdf->Cell(33, 5, $expire_on, 1, 0, 'C');