From fb766eb99f202f933d9b01a50793174db332c7e0 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Mon, 20 Jun 2022 06:56:48 +0000 Subject: [PATCH 1/3] Change diesel fuel fee. #687 --- src/Service/InvoiceGenerator/ResqInvoiceGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/InvoiceGenerator/ResqInvoiceGenerator.php b/src/Service/InvoiceGenerator/ResqInvoiceGenerator.php index b6e913d8..5ee7669c 100644 --- a/src/Service/InvoiceGenerator/ResqInvoiceGenerator.php +++ b/src/Service/InvoiceGenerator/ResqInvoiceGenerator.php @@ -36,7 +36,7 @@ class ResqInvoiceGenerator implements InvoiceGeneratorInterface const OTHER_SERVICES_FEE = 200; const COOLANT_FEE = 1600; const REFUEL_FEE_GAS = 380; - const REFUEL_FEE_DIESEL = 360; + const REFUEL_FEE_DIESEL = 400; private $security; protected $em; From b4def3c1a7fcde29d49b1f9dd208da314797344d Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Tue, 21 Jun 2022 21:51:31 +0800 Subject: [PATCH 2/3] Add check to see if motiv reply is valid #688 --- .../JobOrderHandler/ResqJobOrderHandler.php | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/Service/JobOrderHandler/ResqJobOrderHandler.php b/src/Service/JobOrderHandler/ResqJobOrderHandler.php index 1562659f..a5487311 100644 --- a/src/Service/JobOrderHandler/ResqJobOrderHandler.php +++ b/src/Service/JobOrderHandler/ResqJobOrderHandler.php @@ -2425,13 +2425,17 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface $mres = $motiv->getInventory($branch_codes, $skus); foreach ($mres as $mres_item) { - $bcode = $mres_item['BranchCode']; - $inv_count = $mres_item['Quantity']; - if (isset($inv_data[$bcode])) + // check if we have a valid response from motiv, ignore otherwise + if (isset($mres_item['BranchCode'])) { - $hub_id = $inv_data[$bcode]['hub_id']; + $bcode = $mres_item['BranchCode']; + $inv_count = $mres_item['Quantity']; + if (isset($inv_data[$bcode])) + { + $hub_id = $inv_data[$bcode]['hub_id']; - $params['hubs'][$hub_id]['inventory'] = $inv_count; + $params['hubs'][$hub_id]['inventory'] = $inv_count; + } } } @@ -2728,13 +2732,17 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface $mres = $motiv->getInventory($branch_codes, $skus); foreach ($mres as $mres_item) { - $bcode = $mres_item['BranchCode']; - $inv_count = $mres_item['Quantity']; - if (isset($inv_data[$bcode])) + // check if we have a valid response from motiv, ignore otherwise + if (isset($mres_item['BranchCode'])) { - $hub_id = $inv_data[$bcode]['hub_id']; + $bcode = $mres_item['BranchCode']; + $inv_count = $mres_item['Quantity']; + if (isset($inv_data[$bcode])) + { + $hub_id = $inv_data[$bcode]['hub_id']; - $params['hubs'][$hub_id]['inventory'] = $inv_count; + $params['hubs'][$hub_id]['inventory'] = $inv_count; + } } } From 873bf8015461b7cd78df5e1a121f17144c467ab7 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Wed, 22 Jun 2022 02:09:28 +0000 Subject: [PATCH 3/3] Fixed the sql with emergency type code. #682 --- utils/emergency_type/emergency_type.sql | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utils/emergency_type/emergency_type.sql b/utils/emergency_type/emergency_type.sql index 47bf9393..5e046416 100644 --- a/utils/emergency_type/emergency_type.sql +++ b/utils/emergency_type/emergency_type.sql @@ -25,7 +25,9 @@ DROP TABLE IF EXISTS `emergency_type`; CREATE TABLE `emergency_type` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(80) COLLATE utf8_unicode_ci NOT NULL, - PRIMARY KEY (`id`) + `code` varchar(80) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `emergency_type_idx` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -35,7 +37,7 @@ CREATE TABLE `emergency_type` ( LOCK TABLES `emergency_type` WRITE; /*!40000 ALTER TABLE `emergency_type` DISABLE KEYS */; -INSERT INTO `emergency_type` VALUES (1,'Emergency Situation Related to Vehicle Problem'),(2,'Avoiding Towing'),(3,'Road Obstruction'),(4,'Along the Road'),(5,'With Babies or Kids Inside the Car'),(6,'Senior Citizen'),(7,'Buying Medicine'),(8,'Going to Hospital'),(9,'Uniformed Officials'); +INSERT INTO `emergency_type` VALUES (1,'Emergency Situation Related to Vehicle Problem','emergency_situation_related_to_vehicle_problem'),(2,'Avoiding Towing','avoiding_towing'),(3,'Road Obstruction','road_obstruction'),(4,'Along the Road','along_the_road'),(5,'With Babies or Kids Inside the Car','with_babies_or_kids_inside_the_car'),(6,'Senior Citizen','senior_citizen'),(7,'Buying Medicine','buying_medicine'),(8,'Going to Hospital','going_to_hospital'),(9,'Uniformed Officials','uniformed_officials'); /*!40000 ALTER TABLE `emergency_type` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -48,4 +50,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2022-06-06 8:52:11 +-- Dump completed on 2022-06-10 8:31:30