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:
@@ -294,12 +294,12 @@ try {
|
||||
}
|
||||
|
||||
// Generate invoice HTML (using custom template for software upgrades)
|
||||
list($data,$customer_email,$order_id) = generateSoftwareInvoice($invoice_cust,$orderId,$invoice_language);
|
||||
list($message,$pdf,$customer_email,$order_id) = generateSoftwareInvoice($invoice_cust,$orderId,$invoice_language);
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
//CREATE PDF using DomPDF
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
$dompdf->loadHtml($data);
|
||||
$dompdf->loadHtml($pdf);
|
||||
$dompdf->setPaper('A4', 'portrait');
|
||||
$dompdf->render();
|
||||
$subject = 'Software Upgrade - Invoice: '.$order_id;
|
||||
@@ -308,12 +308,12 @@ try {
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
//Send email via PHPMailer
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
$mail_result = send_mail($customer_email, $subject, $data, $attachment, $subject);
|
||||
$mail_result = send_mail($customer_email, $subject, $message, $attachment, $subject);
|
||||
|
||||
// Send to bookkeeping if configured
|
||||
if(invoice_bookkeeping){
|
||||
debuglog("PAYPAL WEBHOOK: Sending to bookkeeping: " . email_bookkeeping);
|
||||
send_mail(email_bookkeeping, $subject, $data, $attachment, $subject);
|
||||
send_mail(email_bookkeeping, $subject, $message, $attachment, $subject);
|
||||
}
|
||||
} else {
|
||||
debuglog("PAYPAL WEBHOOK: No invoice data found for invoice_id: $invoice_id");
|
||||
|
||||
Reference in New Issue
Block a user