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

@@ -54,11 +54,11 @@ if ($update_allowed === 1){
foreach ($excel_data_1 as $key => $val){
//GET ROW ID
$api_url = '/v1/application/serialnumber='.$val.'/get_rowID';
$api_url = '/v2/application/serialnumber='.$val.'/get_rowID';
$responses = ioServer($api_url,'');
//Decode Payload
if (!empty($responses)){$responses = decode_payload($responses);}else{$responses = null;}
if (!empty($responses)){$responses = json_decode($responses);}else{$responses = null;}
//IF rowID is found add to array
if (isset ($responses->rowID)){
@@ -92,10 +92,8 @@ if ($update_allowed === 1){
foreach ($output_excel as $data_to_update){
$data = json_encode($data_to_update, JSON_UNESCAPED_UNICODE);
//Secure data
$payload = generate_payload($data);
//API call
$responses = ioServer('/v1/equipments', $payload);
$responses = ioServer('/v2/equipments', $data);
if ($responses === 'NOK'){
}