function Header()
 {
     global $org_options;
     $invoice_payment_settings = get_option('event_espresso_invoice_payment_settings');
     //Logo
     if (isset($invoice_payment_settings['image_url']) && trim($invoice_payment_settings['image_url']) != '') {
         $this->Image($invoice_payment_settings['image_url'], 10, 8, 90);
         //Set the logo if it is available
     } else {
         $this->SetFont('Arial', 'B', 15);
         $this->Cell(10, 10, pdftext($org_options['organization']), 0, 0, 'L');
         //If no logo, then display the organizatin name
     }
     //Arial bold 15
     $this->SetFont('Arial', 'B', 15);
     //Move to the right
     $this->Cell(80);
     //Title
     if (isset($invoice_payment_settings['pdf_title'])) {
         $this->MultiCell(100, 10, pdftext($invoice_payment_settings['pdf_title']), 0, 'R');
     } else {
         $this->MultiCell(100, 10, pdftext(''), 0, 'R');
     }
     //Set the right header
     //Line break
     $this->Ln(20);
 }
Esempio n. 2
0
//if ( $total_amount_pd != $total_cost ) {
$pdf->InvoiceTotals(__('Total:', 'event_espresso'), $total_cost, $left, $right);
$text = __('Amount Paid:', 'event_espresso');
$pdf->InvoiceTotals($text, $total_amount_pd, $left, $right);
//	$discount = $total_orig_cost - $total_cost;
//	if ($discount > 0) {
//		$text = __('Discount:', 'event_espresso');
//	} else {
//		$text = __('Discount:', 'event_espresso');
//		$pdf->InvoiceTotals($text, $discount, $left, $right);
//	}
//}
$total_owing = $total_cost - $total_amount_pd;
$text = __("Total due:", 'event_espresso');
$pdf->InvoiceTotals($text, $total_owing, $left, $right);
$pdf->Ln(10);
//Build the payment link and instructions
if (isset($invoice_payment_settings['pdf_instructions'])) {
    $pdf->MultiCell(100, 5, pdftext($invoice_payment_settings['pdf_instructions']), 0, 'L');
    //Set instructions
} else {
    $pdf->MultiCell(100, 5, pdftext(''), 0, 'L');
    //Set instructions
}
//Create a payment link
$payment_link = home_url() . "/?page_id=" . $org_options['return_url'] . "&r_id=" . $registration_id;
$pdf->SetFont('Arial', 'BU', 20);
$pdf->Cell(200, 20, 'Pay Online', 0, 1, 'C', 0, $payment_link);
//Set payment link
$pdf->Output('Invoice_' . $attendee_id . '_' . $event_identifier . '.pdf', 'D');
exit;