feat: Enhance software tool with country selection and tax calculation
- Added a helper function to generate country select options in software tool. - Updated user info modal and payment modal to use country dropdowns instead of text inputs. - Implemented tax calculation based on selected country in payment modal. - Improved software options loading behavior in debug mode. - Enhanced description formatting in payment modal. - Added log modal for equipment updates with a link to view logs. - Introduced a new countries settings file with tax rates for various countries. - Minor adjustments to various PHP files for better handling of equipment and payment processes.
This commit is contained in:
@@ -52,6 +52,12 @@ $responses = ioServer($api_url,'');
|
||||
//Decode Payload
|
||||
if (!empty($responses)){$responses = json_decode($responses);}else{$responses = null;}
|
||||
|
||||
// Redirect if only one equipment is found
|
||||
if (is_array($responses) && count($responses) === 1 && isset($responses[0]->equipmentID)) {
|
||||
header('Location: index.php?page=equipment&equipmentID=' . $responses[0]->equipmentID);
|
||||
exit;
|
||||
}
|
||||
|
||||
//Return QueryTotal from API
|
||||
$total_url = ((!empty($GET_VALUES) && $GET_VALUES !='') ? '&totals=' : 'totals=' );
|
||||
$api_url = '/v2/equipments/'.$GET_VALUES.$total_url;
|
||||
|
||||
Reference in New Issue
Block a user