Refactor API endpoints and update invoice generation

- Updated API calls in equipment.php, equipment_manage.php, and equipments_mass_update.php to use v2 endpoints.
- Changed payload decoding from decode_payload to json_decode for consistency.
- Enhanced invoice generation in factuur.php and webhook files to use a new email template and PDF structure.
- Added new email and PDF templates for invoices to improve formatting and readability.
- Improved marketing folder handling in marketing.php with better payload management.
- Updated CSS for marketing to enhance UI interactions.
- Added JavaScript checks for browser compatibility in softwaretool.php.
- Adjusted user permissions in settingsprofiles.php to reflect new features.
This commit is contained in:
“VeLiTi”
2026-01-14 13:31:22 +01:00
parent a0e1d386ad
commit 7aebb762d3
19 changed files with 1141 additions and 631 deletions

View File

@@ -59,7 +59,7 @@ if (!empty($invoice_data['customer']['language'])) {
// Generate invoice HTML
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
list($data, $customer_email, $order_id) = generateSoftwareInvoice($invoice_data, $order_number, $invoice_language);
list($message,$pdf, $customer_email, $order_id) = generateSoftwareInvoice($invoice_data, $order_number, $invoice_language);
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -67,7 +67,7 @@ list($data, $customer_email, $order_id) = generateSoftwareInvoice($invoice_data,
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
if (isset($_GET['output']) && $_GET['output'] === 'html') {
// Output HTML directly to browser
echo $data;
echo $message;
exit;
}
@@ -82,7 +82,7 @@ $options->set('isRemoteEnabled', true);
$dompdf = new Dompdf($options);
// Load HTML content
$dompdf->loadHtml($data);
$dompdf->loadHtml($pdf);
// Setup paper size and orientation
$dompdf->setPaper('A4', 'portrait');
@@ -101,7 +101,6 @@ $file_name = 'Factuur - ' . $order_id;
if (isset($_POST['email_invoice'])) {
$to = $customer_email;
$subject = 'Factuur - ' . $order_id;
$message = $data;
$attachment = $dompdf->output();
$attachment_name = $file_name . '.pdf';
@@ -118,7 +117,6 @@ if (isset($_POST['email_invoice'])) {
if (isset($_POST['email_invoice_to_admin'])) {
$to = $customer_email;
$subject = 'Factuur - ' . $order_id;
$message = $data;
$attachment = $dompdf->output();
$attachment_name = $file_name . '.pdf';