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:
@@ -148,9 +148,9 @@ if ($command == 'update'){
|
||||
//RESET WARRANTY AND SERVICE DATES WHEN STATUS IS CHANGED TO SEND(3)
|
||||
if (isset($post_content['status']) && $post_content['status'] == 3 && $equipment_data['status'] != 3)
|
||||
{
|
||||
$post_content['service_date'] = $date;
|
||||
$post_content['warranty_date'] = $date;
|
||||
|
||||
$post_content['service_date'] = date("Y-m-d", strtotime("+" . SERVICE_MONTHS . " months"));
|
||||
$post_content['warranty_date'] = date("Y-m-d", strtotime("+" . WARRANTY_MONTHS . " months"));
|
||||
$post_content['order_send_date'] = $date;
|
||||
}
|
||||
//UPDATE CHANGELOG BASED ON STATUS CHANGE
|
||||
if (isset($post_content['status']) && $post_content['status'] != $equipment_data['status'])
|
||||
@@ -188,8 +188,15 @@ elseif ($command == 'insert'){
|
||||
$post_content['created'] = $date;
|
||||
$post_content['createdby'] = $username;
|
||||
$post_content['accounthierarchy'] = $accounthierarchy;
|
||||
$post_content['service_date'] = $date;
|
||||
$post_content['warranty_date'] = $date;
|
||||
$post_content['service_date'] = date("Y-m-d", strtotime("+" . SERVICE_MONTHS . " months"));
|
||||
$post_content['warranty_date'] = date("Y-m-d", strtotime("+" . WARRANTY_MONTHS . " months"));
|
||||
|
||||
if (isset($post_content['status']) && $post_content['status'] == 3)
|
||||
{
|
||||
$post_content['order_send_date'] = $date;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
//do nothing
|
||||
|
||||
Reference in New Issue
Block a user