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:
@@ -85,10 +85,8 @@ if (isset($_GET['equipmentID'])) {
|
||||
$_POST['geolocation'] = json_encode($_POST['geolocation'],JSON_UNESCAPED_UNICODE);
|
||||
//GET ALL POST DATA
|
||||
$data = json_encode($_POST, JSON_UNESCAPED_UNICODE);
|
||||
//Secure data
|
||||
$payload = generate_payload($data);
|
||||
//API call
|
||||
$responses = ioServer('/v1/equipments', $payload);
|
||||
$responses = ioServer('/v2/equipments', $data);
|
||||
if ($responses === 'NOK'){
|
||||
|
||||
} else {
|
||||
@@ -102,10 +100,8 @@ if (isset($_GET['equipmentID'])) {
|
||||
if (isset($_POST['delete'])) {
|
||||
//GET ALL POST DATA
|
||||
$data = json_encode($_POST , JSON_UNESCAPED_UNICODE);
|
||||
//Secure data
|
||||
$payload = generate_payload($data);
|
||||
//API call
|
||||
$responses = ioServer('/v1/equipments', $payload);
|
||||
$responses = ioServer('/v2/equipments', $data);
|
||||
// Redirect and delete equipment
|
||||
if ($responses === 'NOK'){
|
||||
|
||||
@@ -123,10 +119,8 @@ if (isset($_GET['equipmentID'])) {
|
||||
$_POST['geolocation'] = json_encode($_POST['geolocation'],JSON_UNESCAPED_UNICODE);
|
||||
//GET ALL POST DATA
|
||||
$data = json_encode($_POST, JSON_UNESCAPED_UNICODE);
|
||||
//Secure data
|
||||
$payload = generate_payload($data);
|
||||
//API call
|
||||
$responses = ioServer('/v1/equipments', $payload);
|
||||
$responses = ioServer('/v2/equipments', $data);
|
||||
if ($responses === 'NOK'){
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user