Merge branch 'dev' into 7648_myEntries_filter
This commit is contained in:
commit
5a8634356a
|
@ -0,0 +1,25 @@
|
||||||
|
DELIMITER $$
|
||||||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`address_updateCoordinates`(
|
||||||
|
vTicketFk INT,
|
||||||
|
vLongitude INT,
|
||||||
|
vLatitude INT)
|
||||||
|
BEGIN
|
||||||
|
/**
|
||||||
|
* Actualiza las coordenadas de una dirección.
|
||||||
|
*
|
||||||
|
* @param vTicketFk Id del ticket
|
||||||
|
* @param vLongitude Longitud de la dirección
|
||||||
|
* @param vLatitude Latitud de la dirección
|
||||||
|
*/
|
||||||
|
DECLARE vAddressFK INT;
|
||||||
|
|
||||||
|
SELECT addressFK INTO vAddressFK
|
||||||
|
FROM ticket
|
||||||
|
WHERE id = vTicketFk;
|
||||||
|
|
||||||
|
UPDATE address
|
||||||
|
SET longitude = vLongitude,
|
||||||
|
latitude = vLatitude
|
||||||
|
WHERE id = vAddressFK;
|
||||||
|
END$$
|
||||||
|
DELIMITER ;
|
|
@ -3,18 +3,11 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`delivery_beforeInsert
|
||||||
BEFORE INSERT ON `delivery`
|
BEFORE INSERT ON `delivery`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
IF (NEW.longitude IS NOT NULL
|
||||||
IF (NEW.longitude IS NOT NULL AND NEW.latitude IS NOT NULL AND NEW.ticketFK IS NOT NULL)
|
AND NEW.latitude IS NOT NULL
|
||||||
|
AND NEW.ticketFK IS NOT NULL)
|
||||||
THEN
|
THEN
|
||||||
UPDATE address
|
CALL address_updateCoordinates(NEW.ticketFk, NEW.longitude, NEW.latitude);
|
||||||
SET longitude = NEW.longitude,
|
|
||||||
latitude = NEW.latitude
|
|
||||||
WHERE id IN (
|
|
||||||
SELECT addressFK
|
|
||||||
FROM ticket
|
|
||||||
WHERE id = NEW.ticketFk
|
|
||||||
);
|
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -3,18 +3,11 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`delivery_beforeUpdate
|
||||||
BEFORE UPDATE ON `delivery`
|
BEFORE UPDATE ON `delivery`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
IF (NEW.longitude IS NOT NULL
|
||||||
IF (NEW.longitude IS NOT NULL AND NEW.latitude IS NOT NULL AND NEW.ticketFK IS NOT NULL)
|
AND NEW.latitude IS NOT NULL
|
||||||
|
AND NEW.ticketFK IS NOT NULL)
|
||||||
THEN
|
THEN
|
||||||
UPDATE address
|
CALL address_updateCoordinates(NEW.ticketFk, NEW.longitude, NEW.latitude);
|
||||||
SET longitude = NEW.longitude,
|
|
||||||
latitude = NEW.latitude
|
|
||||||
WHERE id IN (
|
|
||||||
SELECT addressFK
|
|
||||||
FROM ticket
|
|
||||||
WHERE id = NEW.ticketFk
|
|
||||||
);
|
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<td id="outline" class="ellipsize">{{dashIfEmpty(labelData.workerCode)}}</td>
|
<td id="outline" class="ellipsize">{{dashIfEmpty(labelData.workerCode)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td id="outline" class="ellipsize">{{labelData.labelCount || 0}}</td>
|
<td id="outline" class="ellipsize">{{labelCount || labelData.labelCount || 0}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td id="outline" class="ellipsize">{{labelData.code == 'V' ? (labelData.size || 0) + 'cm' : (labelData.volume || 0) + 'm³'}}</td>
|
<td id="outline" class="ellipsize">{{labelData.code == 'V' ? (labelData.size || 0) + 'cm' : (labelData.volume || 0) + 'm³'}}</td>
|
||||||
|
|
Loading…
Reference in New Issue