#7864 - 7864_testToMaster_2434 #2867
|
@ -20,6 +20,7 @@ BEGIN
|
||||||
DECLARE vItemFk INT;
|
DECLARE vItemFk INT;
|
||||||
DECLARE vConcept VARCHAR(30);
|
DECLARE vConcept VARCHAR(30);
|
||||||
DECLARE vAmount INT;
|
DECLARE vAmount INT;
|
||||||
|
DECLARE vAvailable INT;
|
||||||
DECLARE vPrice DECIMAL(10,2);
|
DECLARE vPrice DECIMAL(10,2);
|
||||||
DECLARE vSaleFk INT;
|
DECLARE vSaleFk INT;
|
||||||
DECLARE vRowFk INT;
|
DECLARE vRowFk INT;
|
||||||
|
@ -48,7 +49,6 @@ BEGIN
|
||||||
i.name,
|
i.name,
|
||||||
r.amount,
|
r.amount,
|
||||||
r.price,
|
r.price,
|
||||||
i.itemPackingTypeFk,
|
|
||||||
i.isFloramondo
|
i.isFloramondo
|
||||||
FROM orderRow r
|
FROM orderRow r
|
||||||
JOIN vn.item i ON i.id = r.itemFk
|
JOIN vn.item i ON i.id = r.itemFk
|
||||||
|
@ -130,7 +130,7 @@ BEGIN
|
||||||
JOIN vn.saleGroupDetail sgd ON sgd.saleFk = s.id
|
JOIN vn.saleGroupDetail sgd ON sgd.saleFk = s.id
|
||||||
JOIN vn.ticket t ON t.id = s.ticketFk
|
JOIN vn.ticket t ON t.id = s.ticketFk
|
||||||
WHERE t.shipped BETWEEN vShipment AND util.dayend(vShipment)
|
WHERE t.shipped BETWEEN vShipment AND util.dayend(vShipment)
|
||||||
),
|
)
|
||||||
SELECT t.id INTO vTicketFk
|
SELECT t.id INTO vTicketFk
|
||||||
FROM vn.ticket t
|
FROM vn.ticket t
|
||||||
JOIN vn.alertLevel al ON al.code = 'FREE'
|
JOIN vn.alertLevel al ON al.code = 'FREE'
|
||||||
|
@ -174,7 +174,7 @@ BEGIN
|
||||||
FROM tItemPackingTypeTicket iptt
|
FROM tItemPackingTypeTicket iptt
|
||||||
JOIN tItemPackingTypeOrder ipto
|
JOIN tItemPackingTypeOrder ipto
|
||||||
WHERE INSTR(iptt.distinctItemPackingTypes, ipto.distinctItemPackingTypes)
|
WHERE INSTR(iptt.distinctItemPackingTypes, ipto.distinctItemPackingTypes)
|
||||||
LIMIT 1
|
LIMIT 1;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
-- Crea el ticket en el caso de no existir uno adecuado
|
-- Crea el ticket en el caso de no existir uno adecuado
|
||||||
|
@ -224,7 +224,6 @@ BEGIN
|
||||||
vConcept,
|
vConcept,
|
||||||
vAmount,
|
vAmount,
|
||||||
vPrice,
|
vPrice,
|
||||||
vItemPackingTypeFk,
|
|
||||||
vIsLogifloraItem;
|
vIsLogifloraItem;
|
||||||
|
|
||||||
IF vDone THEN
|
IF vDone THEN
|
||||||
|
|
Loading…
Reference in New Issue