Compare commits

..

6 Commits

Author SHA1 Message Date
Robert Ferrús ddf7215084 Merge branch 'master' into 8108-itemTags
gitea/salix/pipeline/pr-master This commit looks good Details
2024-10-18 04:57:37 +00:00
Sergio De la torre 90a3f369b6 Merge pull request 'fix: refs #6861 saleTrackingAdd' (!3121) from 6861-ReserveSaleTracking into master
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-test This commit looks good Details
Reviewed-on: #3121
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-10-17 15:29:12 +00:00
Sergio De la torre 8df09bc64a Merge branch 'master' into 6861-ReserveSaleTracking
gitea/salix/pipeline/pr-master This commit looks good Details
2024-10-17 15:23:05 +00:00
Sergio De la torre 3463036086 fix: refs #6861 saleTrackingAdd
gitea/salix/pipeline/pr-master There was a failure building this commit Details
2024-10-17 17:20:21 +02:00
Sergio De la torre 63c0ec308f fix: refs #6861 saleTrackingAdd
gitea/salix/pipeline/pr-master This commit looks good Details
2024-10-17 17:01:44 +02:00
Sergio De la torre cb53962405 fix: refs #6861 saleTrackingAdd
gitea/salix/pipeline/pr-master There was a failure building this commit Details
2024-10-17 13:58:21 +02:00
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleTracking_sectorCollectionAddPrevOK`(
vSectorCollectionFk INT
)
BEGIN
/**
* Inserta los registros de sectorCollection con el estado PREVIA OK si la reserva está picked
*
* @param vSectorCollectionFk Identificador de vn.sectorCollection
*/
REPLACE saleTracking(saleFk, isChecked, workerFk, stateFk)
SELECT sgd.saleFk, TRUE, sc.userFk, s.id
FROM sectorCollection sc
JOIN sectorCollectionSaleGroup scsg ON scsg.sectorCollectionFk = sc.id
JOIN saleGroupDetail sgd ON sgd.saleGroupFk = scsg.saleGroupFk
JOIN state s ON s.code = 'OK PREVIOUS'
JOIN itemShelvingSale iss ON iss.saleFk = sgd.saleFk
WHERE sc.id = vSectorCollectionFk AND iss.isPicked;
END$$
DELIMITER ;