Merge branch 'master' of gitlab.com:jankstudio/resq into 684-move-the-blob-and-sas-token-for-warranty-serial-download-to-env

This commit is contained in:
Korina Cordero 2022-06-23 03:05:45 +00:00
commit a669159513
3 changed files with 24 additions and 14 deletions

View file

@ -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;

View file

@ -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;
}
}
}

View file

@ -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