EPCQR Modul - Test & Debug'; // 1. Modul-Status prüfen print '
| Modul aktiviert | '; print isModEnabled('epcqr') ? '✓ Ja' : '✗ Nein'; print ' |
| Substitutionen aktiviert | '; $module_parts = $conf->modules_parts; $subst_active = isset($module_parts['substitutions']['epcqr']) || (isset($module_parts['substitutions']) && is_array($module_parts['substitutions']) && in_array('epcqr', $module_parts['substitutions'])); print $subst_active ? '✓ Ja' : '✗ Nein (in modEpcqr.class.php aktivieren!)'; print ' |
| Hooks aktiviert | ';
$hooks_active = isset($module_parts['hooks']) && isset($module_parts['hooks']['epcqr']);
print $hooks_active ? '✓ Ja' : '✗ Nein';
if ($hooks_active) {
print ' Hooks: '.implode(', ', $module_parts['hooks']['epcqr']); } print ' |
| '.$name.' | '; if (file_exists($file)) { print '✓ Vorhanden ('.$file.')'; } else { print '✗ Fehlt! ('.$file.')'; } print ' |
| '.$field.' | '; if (isset($extrafields->attributes['facture']['label'][$field])) { print '✓ Vorhanden'; print ' - Typ: '.$extrafields->attributes['facture']['type'][$field]; } else { print '✗ Fehlt! (SQL-Update ausführen!)'; } print ' |
| QR-Code Cache | '; if (is_dir($qrCodeDir)) { print '✓ Vorhanden ('.$qrCodeDir.')'; if (is_writable($qrCodeDir)) { print ' - Beschreibbar'; } else { print ' - Nicht beschreibbar!'; } } else { print '⚠ Fehlt (wird automatisch erstellt)'; } print ' |
✓ QR-Code erfolgreich generiert!
'; print 'Pfad: '.$testPath.'
'; if (file_exists($testPath)) { print '✗ Fehler: '.$e->getMessage().'
'; } // 7. Letzte Rechnungen mit QR-Codes prüfen print '| Rechnung | '; print 'Betrag | '; print 'QR-Code Path | '; print 'Datei existiert? | '; print '|
|---|---|---|---|---|
| '.$invoice->getNomUrl(1).' | '; print ''.price($obj->total_ttc).' | '; $qrPath = isset($invoice->array_options['options_qrcodepath']) ? $invoice->array_options['options_qrcodepath'] : ''; print ''; if (!empty($qrPath)) { print $qrPath; print ' | '; if (file_exists($qrPath)) { print '✓ Ja'; } else { print '✗ Nein'; } print ' | '; } else { print 'Nicht gesetzt'; print '- | '; } print '
Keine Rechnungen gefunden.
'; } } else { print 'SQL-Fehler: '.$db->lasterror().'
'; } // 8. Logs prüfen print '';
foreach (array_reverse($epcqrLogs) as $log) {
print htmlspecialchars($log)."\n";
}
print '';
} else {
print 'Keine EPCQR-Log-Einträge in den letzten 500 Zeilen gefunden.
'; } } else { print 'Log-Datei nicht gefunden: '.$logFile.'
'; } // 9. Anleitung print 'Rechnung: '.$invoice->ref.'
'; // QR-Code Path prüfen $qrPath = isset($invoice->array_options['options_qrcodepath']) ? $invoice->array_options['options_qrcodepath'] : ''; print 'QR-Code Path: '.($qrPath ? $qrPath : 'Nicht gesetzt!').'
'; if (!empty($qrPath) && file_exists($qrPath)) { print '✓ QR-Code-Datei existiert
'; // Test: Bilddaten sammeln require_once __DIR__.'/lib/epcqr.lib.php'; require_once __DIR__.'/core/substitutions/functions_epcqr.lib.php'; $imageData = array(); if (!empty($qrPath) && file_exists($qrPath)) { $imageData['qrcode'] = $qrPath; } print 'Bilddaten gesammelt: '.count($imageData).' Bilder
'; if (!empty($imageData)) { print '';
print_r($imageData);
print '';
}
} else {
print '✗ QR-Code-Datei nicht gefunden
'; print 'Lösung: Rechnung neu validieren (Draft → Validate)
'; } } else { print 'Rechnung nicht gefunden!
'; } } // Footer llxFooter(); $db->close();