Merge branch 'dev' into 7648_dev_customerEntries
This commit is contained in:
commit
f41c2489d9
|
@ -23,39 +23,41 @@ proc: BEGIN
|
||||||
LEAVE proc;
|
LEAVE proc;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
-- Se comprueba si es una preparación previa
|
IF vParam REGEXP '^[0-9]+$' THEN
|
||||||
SELECT COUNT(*) INTO vIsSaleGroup
|
-- Se comprueba si es una preparación previa
|
||||||
FROM vn.saleGroup sg
|
SELECT COUNT(*) INTO vIsSaleGroup
|
||||||
WHERE sg.id = vParam;
|
FROM vn.saleGroup sg
|
||||||
|
WHERE sg.id = vParam;
|
||||||
|
|
||||||
IF vIsSaleGroup THEN
|
IF vIsSaleGroup THEN
|
||||||
CALL vn.saleGroup_setParking(vParam, vParkingFk);
|
CALL vn.saleGroup_setParking(vParam, vParkingFk);
|
||||||
LEAVE proc;
|
LEAVE proc;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
-- Se comprueba si es un ticket
|
||||||
|
SELECT COUNT(*) INTO vIsTicket
|
||||||
|
FROM vn.ticket t
|
||||||
|
WHERE t.id = vParam
|
||||||
|
AND t.shipped >= TIMESTAMPADD(WEEK,-1,util.VN_CURDATE());
|
||||||
|
|
||||||
|
IF vIsTicket THEN
|
||||||
|
CALL vn.ticket_setParking(vParam, vParkingFk);
|
||||||
|
LEAVE proc;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
-- Se comprueba si es una coleccion de tickets
|
||||||
|
SELECT COUNT(*) INTO vIsCollection
|
||||||
|
FROM vn.collection c
|
||||||
|
WHERE c.id = vParam
|
||||||
|
AND c.created >= TIMESTAMPADD(WEEK,-1,util.VN_CURDATE());
|
||||||
|
|
||||||
|
IF vIsCollection THEN
|
||||||
|
CALL vn.collection_setParking(vParam, vParkingFk);
|
||||||
|
LEAVE proc;
|
||||||
|
END IF;
|
||||||
|
ELSE
|
||||||
|
-- Por descarte, se considera una matrícula
|
||||||
|
CALL vn.shelving_setParking(vParam, vParkingFk);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
-- Se comprueba si es un ticket
|
|
||||||
SELECT COUNT(*) INTO vIsTicket
|
|
||||||
FROM vn.ticket t
|
|
||||||
WHERE t.id = vParam
|
|
||||||
AND t.shipped >= TIMESTAMPADD(WEEK,-1,util.VN_CURDATE());
|
|
||||||
|
|
||||||
IF vIsTicket THEN
|
|
||||||
CALL vn.ticket_setParking(vParam, vParkingFk);
|
|
||||||
LEAVE proc;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
-- Se comprueba si es una coleccion de tickets
|
|
||||||
SELECT COUNT(*) INTO vIsCollection
|
|
||||||
FROM vn.collection c
|
|
||||||
WHERE c.id = vParam
|
|
||||||
AND c.created >= TIMESTAMPADD(WEEK,-1,util.VN_CURDATE());
|
|
||||||
|
|
||||||
IF vIsCollection THEN
|
|
||||||
CALL vn.collection_setParking(vParam, vParkingFk);
|
|
||||||
LEAVE proc;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
-- Por descarte, se considera una matrícula
|
|
||||||
CALL vn.shelving_setParking(vParam, vParkingFk);
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -26,29 +26,33 @@
|
||||||
},
|
},
|
||||||
"labelerFk": {
|
"labelerFk": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
|
},
|
||||||
|
"isOnReservationMode": {
|
||||||
|
"type": "boolean",
|
||||||
|
"required": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
"sector": {
|
"sector": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Sector",
|
"model": "Sector",
|
||||||
"foreignKey": "sectorFk"
|
"foreignKey": "sectorFk"
|
||||||
},
|
},
|
||||||
"train": {
|
"train": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Train",
|
"model": "Train",
|
||||||
"foreignKey": "trainFk"
|
"foreignKey": "trainFk"
|
||||||
},
|
},
|
||||||
"printer": {
|
"printer": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Printer",
|
"model": "Printer",
|
||||||
"foreignKey": "labelerFk"
|
"foreignKey": "labelerFk"
|
||||||
},
|
},
|
||||||
"itemPackingType": {
|
"itemPackingType": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "ItemPackingType",
|
"model": "ItemPackingType",
|
||||||
"foreignKey": "itemPackingTypeFk",
|
"foreignKey": "itemPackingTypeFk",
|
||||||
"primaryKey": "code"
|
"primaryKey": "code"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue