fix: refs #6861 saleTrackingAdd #3121
|
@ -0,0 +1,20 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleTracking_sectorCollectionAddPrevOK`(
|
||||
sergiodt marked this conversation as resolved
Outdated
|
||||
vSectorCollectionFk INT
|
||||
)
|
||||
sergiodt marked this conversation as resolved
Outdated
carlosap
commented
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
carlosap
commented
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
carlosap
commented
Tabulación ) Tabulación )
|
||||
JOIN state s ON s.code = 'OK PREVIOUS'
|
||||
sergiodt marked this conversation as resolved
Outdated
carlosap
commented
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
carlosap
commented
esquema no es necesario esquema no es necesario
|
||||
DELIMITER ;
|
Loading…
Reference in New Issue
Salto de línea