fix: refs #6861 saleTrackingAdd #3121
|
@ -0,0 +1,26 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleTracking_sectorCollectionAddPrevOK`(vSectorCollectionFk INT)
|
||||
sergiodt marked this conversation as resolved
Outdated
|
||||
BEGIN
|
||||
/**
|
||||
sergiodt marked this conversation as resolved
Outdated
carlosap
commented
Tabulación ) -1 Tabulación ) -1
|
||||
* 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,
|
||||
sergiodt marked this conversation as resolved
Outdated
carlosap
commented
Tabulación Tabulación
|
||||
stateFk
|
||||
)
|
||||
SELECT sgd.saleFk,
|
||||
sergiodt marked this conversation as resolved
Outdated
carlosap
commented
Tabulación ) Tabulación )
|
||||
TRUE,
|
||||
sergiodt marked this conversation as resolved
Outdated
carlosap
commented
Tabulación Tabulación
|
||||
sc.userFk,
|
||||
s.id
|
||||
FROM vn.sectorCollection sc
|
||||
sergiodt marked this conversation as resolved
Outdated
carlosap
commented
esquema no es necesario esquema no es necesario
|
||||
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 ;
|
Loading…
Reference in New Issue
Salto de línea