fix: refs #6861 saleTrackingAdd
gitea/salix/pipeline/pr-master There was a failure building this commit Details

This commit is contained in:
Sergio De la torre 2024-10-17 17:20:21 +02:00
parent 63c0ec308f
commit 3463036086
1 changed files with 3 additions and 11 deletions

View File

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