fix: refs #6861 saleTrackingAdd #3121

Merged
sergiodt merged 4 commits from 6861-ReserveSaleTracking into master 2024-10-17 15:29:13 +00: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`(
sergiodt marked this conversation as resolved Outdated

Salto de línea

Salto de línea
vSectorCollectionFk INT
)
sergiodt marked this conversation as resolved Outdated

Tabulación ) -1

Tabulación ) -1
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
sergiodt marked this conversation as resolved Outdated

Tabulación

Tabulación
FROM sectorCollection sc
JOIN sectorCollectionSaleGroup scsg ON scsg.sectorCollectionFk = sc.id
JOIN saleGroupDetail sgd ON sgd.saleGroupFk = scsg.saleGroupFk
sergiodt marked this conversation as resolved Outdated

Tabulación )

Tabulación )
JOIN state s ON s.code = 'OK PREVIOUS'
sergiodt marked this conversation as resolved Outdated

Tabulación

Tabulación
JOIN itemShelvingSale iss ON iss.saleFk = sgd.saleFk
WHERE sc.id = vSectorCollectionFk AND iss.isPicked;
END$$
sergiodt marked this conversation as resolved Outdated

esquema no es necesario

esquema no es necesario
DELIMITER ;