/**
  * Gets the invoice image
  *
  * @param   object  $booking - The booking
  * @param   object  $event   - The event (opt)
  *
  * @return  string
  */
 public static function getInvoiceImage($booking, $event = null)
 {
     if ($event != null && $event->fees <= 0) {
         return "";
     }
     if ($event == null && $booking->eventfees == 0) {
         return "";
     }
     $invoice_link = MatukioHelperInvoice::getInvoiceNumber($booking->sid, JHTML::_('date', $booking->bookingdate, 'Y')) . " " . MatukioHelperUtilsAdmin::getBackendPrintWindow(6, $booking->semid, $booking->sid);
     return $invoice_link;
 }
        } else {
            $temp4 = round($stats[$i]->bookings * 100 / $stats[$i]->maxpupil, 0) . "%";
        }
        if ($stats[$i]->courses == 0) {
            $temp5 = 0;
            $temp6 = 0;
            $temp7 = 0;
        } else {
            $temp5 = round($stats[$i]->hits / $stats[$i]->courses);
            $temp6 = round($stats[$i]->bookings / $stats[$i]->courses);
            $temp7 = round($stats[$i]->maxpupil / $stats[$i]->courses);
        }
        $temp = array(JTEXT::_('COM_MATUKIO_SUMMARY'), $stats[$i]->courses, $temp1, $temp2, $temp9, $temp3, $temp4, $temp5, $temp6, $temp7);
        $tempa = array("l", "r", "r", "r", "r", "r", "r", "r", "r", "r");
        $tempb = array("", "", "", "", "", "", "c2", "", "", "");
        $html .= "\n" . MatukioHelperUtilsAdmin::getTableLine("th", $tempa, $tempb, $temp, "");
        $html .= "\n</tfoot>";
    }
    // --------------------------------------------------------
    // Anlegen des Seitenendes und Ausgabe
    // --------------------------------------------------------
    $html .= "</table></div>";
    if ($n > $o + 1) {
        $html .= "</div>";
    }
    $html .= "<br />";
}
if ($n > 0) {
    $html .= JTEXT::_('COM_MATUKIO_INFO_RELATED_TO_EVENTS') . "<br />";
}
$html .= "\n<input type=\"hidden\" name=\"option\" value=\"" . JFactory::getApplication()->input->get('option') . "\" />";