14 Commits

Author SHA1 Message Date
“VeLiTi”
6ccc52b80c Merge branch 'development' into test 2026-02-05 16:15:40 +01:00
“VeLiTi”
9db5678e14 Merge branch 'development' into test 2026-02-05 10:14:22 +01:00
“VeLiTi”
7a60b02525 Add configuration for warranty and payment options, update email templates, and implement marketing file migration
- Created STEP3.txt for business rules and payment configurations.
- Modified listPartner function parameter order in functions.php.
- Updated invoice email template to reflect new contact details.
- Revised PDF invoice template to include updated contact information.
- Added user session checks in index.php for improved security.
- Introduced marketing_migrate.php to migrate existing marketing files to the database.
- Increased max-height of content blocks in admin.css for better UI.
2026-02-03 14:12:05 +01:00
“VeLiTi”
e883bce124 Refactor products software assignment queries to improve clarity. Update accounthierarchy handling in post requests and adjust mass update form styling for better usability. 2026-01-30 16:18:42 +01:00
“VeLiTi”
0bec809940 Refactor invoice creation in webhooks to include accounthierarchy field. Update SQL statements in both PayPal and Mollie webhooks for consistency. 2026-01-30 15:44:04 +01:00
“VeLiTi”
9d33b37b8b Merge branch 'development' into test 2026-01-30 10:56:58 +01:00
“VeLiTi”
0274647483 Merge branch 'development' into test 2026-01-29 19:34:07 +01:00
“VeLiTi”
05aa5500e7 Improve error handling in connectDevice function to provide user-friendly messages for connection failures 2026-01-29 19:31:41 +01:00
“VeLiTi”
0a4e145d57 Add user roles management page and update user permissions handling
- Created a new `user_roles.php` file for managing user roles and permissions.
- Implemented pagination, filtering, and sorting for user roles.
- Updated `users.php` to use the new authorization structure for permissions.
- Changed API version from v1 to v2 in `users.php` for user data retrieval.
- Modified `webhook_mollie.php` to include account hierarchy in license creation.
- Refactored invoice generation and email sending logic in `webhook_mollie.php`.
- Introduced a new `webhook_paypal.php` file to handle PayPal webhook notifications.
- Implemented payment status updates and license creation logic in `webhook_paypal.php`.
- Added helper functions for PayPal webhook signature verification and access token retrieval.
2026-01-29 19:31:10 +01:00
“VeLiTi”
a0df3a54b2 Merge branch 'development' 2025-12-24 14:08:07 +01:00
“VeLiTi”
7a6e2dda19 Merge branch 'development' 2025-12-21 14:19:58 +01:00
“VeLiTi”
79f7666702 Merge branch 'development' 2025-12-16 16:21:06 +01:00
“VeLiTi”
45f1fa44b8 Merge branch 'development'
#Conflicts:
#	.DS_Store
2025-12-16 11:45:13 +01:00
“VeLiTi”
990f270855 Add meta feed functionality and enhance error handling in catalog API 2025-12-03 11:30:01 +01:00
7 changed files with 31 additions and 10 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -27,15 +27,23 @@ $clause = '';
$clause_insert =''; $clause_insert ='';
$input_insert = ''; $input_insert = '';
//GET PARTNERDETAILS FROM USER
$sales_user = array(
"salesid"=>$partner->salesid,
"soldto"=>$partner->soldto
);
$accounthierarchy = json_encode($sales_user, JSON_UNESCAPED_UNICODE);
//ADD STANDARD PARAMETERS TO ARRAY BASED ON INSERT OR UPDATE //ADD STANDARD PARAMETERS TO ARRAY BASED ON INSERT OR UPDATE
if ($command == 'update'){ if ($command == 'update'){
$post_content['updated'] = $date; $post_content['updated'] = $date;
$post_content['updatedby'] = $username; $post_content['updatedby'] = $username;
$post_content['accounthierarchy'] = $accounthierarchy;
} }
elseif ($command == 'insert'){ elseif ($command == 'insert'){
$post_content['created'] = $date; $post_content['created'] = $date;
$post_content['createdby'] = $username; $post_content['createdby'] = $username;
// No accounthierarchy for assignments $post_content['accounthierarchy'] = $accounthierarchy;
} }
else { else {
//do nothing //do nothing

View File

@@ -2128,7 +2128,7 @@ function serviceEvents ($messages,$page){
$service_status = '<span class="status warranty">'.$service_report_outcome_good.'</span>'; $service_status = '<span class="status warranty">'.$service_report_outcome_good.'</span>';
} }
$view_data .= '<tr onclick="window.location.href=\'index.php?page=servicereport&equipmentID='.$message->equipmentID.'&historyID='.$message->historyID.'\'" style="cursor: pointer;"> $view_data .= '<tr onclick="window.location.href=\'index.php?page=servicereport&historyID='.$message->historyID.'\'" style="cursor: pointer;">
<td>'.$TETS->serialnumber.'</td> <td>'.$TETS->serialnumber.'</td>
<td>'.$service_date.'</td> <td>'.$service_date.'</td>
<td>'.$service_renewal_date.'</td> <td>'.$service_renewal_date.'</td>

View File

@@ -1,7 +1,7 @@
var port, textEncoder, writableStreamClosed, writer, historyIndex = -1; var port, textEncoder, writableStreamClosed, writer, historyIndex = -1;
const lineHistory = []; const lineHistory = [];
maintenanceRun = 0; let maintenanceRun = 0;
handshakeComplete = false; let handshakeComplete = false;
// Function to log communication to API // Function to log communication to API
async function logCommunication(data, direction) { async function logCommunication(data, direction) {
@@ -108,6 +108,7 @@ async function connectSerial() {
// Log connection failure details // Log connection failure details
await logCommunication(`Serial connection failed: ${error.message || 'Unknown error'}`, 'disconnected'); await logCommunication(`Serial connection failed: ${error.message || 'Unknown error'}`, 'disconnected');
alert("Serial Connection Failed"); alert("Serial Connection Failed");
window.location.reload();
} }
} }
@@ -586,7 +587,7 @@ async function closePort(){
maintenanceRun = 0; // reset maintenanceRun maintenanceRun = 0; // reset maintenanceRun
// Refresh the page // Refresh the page
window.location.reload(); setTimeout(() => {window.location.reload();}, 500);
} }
async function closePortCarTest(){ async function closePortCarTest(){
@@ -742,7 +743,7 @@ async function updateHistory(){
body: testdetails body: testdetails
}); });
const historyresult = await response.json; const historyresult = await response.json();
setTimeout(maintenanceTest,5000); setTimeout(maintenanceTest,5000);
@@ -811,5 +812,6 @@ async function updateHistory(){
catch(e) catch(e)
{ {
alert(e.message || e); alert(e.message || e);
window.location.reload();
} }
} }

View File

@@ -1,6 +1,15 @@
const serialResultsDiv = document.getElementById("serialResults"); const serialResultsDiv = document.getElementById("serialResults");
<<<<<<< HEAD
let port, textEncoder, writableStreamClosed, writer;
let readableStreamClosed, reader, openPort = 0;
let x, serial, fw, hw, sw, commitCode;
let firmwarelocation, upgraded_version, hex_fw;
// Buffer for accumulating received data before logging
=======
// Buffer for accumulating received data before logging // Buffer for accumulating received data before logging
>>>>>>> development
let receivedDataBuffer = ''; let receivedDataBuffer = '';
// Function to log communication to API // Function to log communication to API
@@ -122,13 +131,15 @@ async function connectDevice() {
// Check for specific "No port selected" error and show user-friendly message // Check for specific "No port selected" error and show user-friendly message
if (error.message && error.message.includes('No port selected by the user')) { if (error.message && error.message.includes('No port selected by the user')) {
progressBar("100", "No device selected, please try again", "#ff6666"); progressBar("100", "No device selected, please try again", "#ff6666");
} else if (openPort = 1){ } else if (openPort === 1){
closePort(); closePort();
console.log("Closing port"); console.log("Closing port");
alert("System is still trying to close the serial port. If this message continues to come up please refresh this page."); alert("System is still trying to close the serial port. If this message continues to come up please refresh this page.");
window.location.reload();
} }
else{ else{
alert("Your browser does not support this functionality. Please use latest Chrome or Edge browser."); alert("Your browser does not support this functionality. Please use latest Chrome or Edge browser.");
window.location.reload();
} }
} }
} }
@@ -170,6 +181,7 @@ async function listenToPort() {
async function appendToTerminal(newStuff) { async function appendToTerminal(newStuff) {
serialResultsDiv.innerHTML += newStuff; serialResultsDiv.innerHTML += newStuff;
receivedDataBuffer += newStuff;
// Log received data // Log received data
await logCommunication(newStuff.trim(), 'received'); await logCommunication(newStuff.trim(), 'received');

View File

@@ -193,7 +193,7 @@ if (isset($success_msg)){
} }
$view .= '<form action="" method="post" id="mass_update_form"> $view .= '<form action="" method="post" id="mass_update_form">
<div class="content-block-wrapper"> <div class="content-block-wrapper" style="max-height: 450px;">
'; ';
@@ -205,7 +205,7 @@ $soldto_dropdown = listPartner('soldto','','yes',$_SESSION['authorization']['per
$shipto_dropdown = listPartner('shipto','','',$_SESSION['authorization']['permission']); $shipto_dropdown = listPartner('shipto','','',$_SESSION['authorization']['permission']);
$location_dropdown = listPartner('location','','',$_SESSION['authorization']['permission']); $location_dropdown = listPartner('location','','',$_SESSION['authorization']['permission']);
$view .='<div class="content-block"> $view .='<div class="content-block" style="max-height: 450px;">
<div class="block-header"> <div class="block-header">
<i class="fa-solid fa-user fa-sm"></i> <i class="fa-solid fa-user fa-sm"></i>
</div> </div>

View File

@@ -61,7 +61,6 @@ if (!empty($invoice_data['customer']['language'])) {
list($message,$pdf, $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);
//+++++++++++++++++++++++++++++++++++++++++++++++++++++ //+++++++++++++++++++++++++++++++++++++++++++++++++++++
// Check for HTML output request // Check for HTML output request
//+++++++++++++++++++++++++++++++++++++++++++++++++++++ //+++++++++++++++++++++++++++++++++++++++++++++++++++++