Merge branch 'master' into 7748-Modificar-solicitud-de-domiciliación-bancaria
gitea/salix/pipeline/pr-master This commit looks good
Details
gitea/salix/pipeline/pr-master This commit looks good
Details
This commit is contained in:
commit
ed1b0ff53d
|
@ -25,7 +25,7 @@
|
||||||
</mrw:Direccion>
|
</mrw:Direccion>
|
||||||
<mrw:Nif><%= expeditionData.fi %></mrw:Nif>
|
<mrw:Nif><%= expeditionData.fi %></mrw:Nif>
|
||||||
<mrw:Nombre><%= expeditionData.clientName %></mrw:Nombre>
|
<mrw:Nombre><%= expeditionData.clientName %></mrw:Nombre>
|
||||||
<mrw:Telefono><%= expeditionData.phone %></mrw:Telefono>
|
<mrw:Telefono><%= expeditionData.mobile %></mrw:Telefono>
|
||||||
<mrw:Observaciones><%= expeditionData.deliveryObservation %></mrw:Observaciones>
|
<mrw:Observaciones><%= expeditionData.deliveryObservation %></mrw:Observaciones>
|
||||||
</mrw:DatosEntrega>
|
</mrw:DatosEntrega>
|
||||||
<mrw:DatosServicio>
|
<mrw:DatosServicio>
|
||||||
|
|
|
@ -47,7 +47,7 @@ module.exports = Self => {
|
||||||
co.code countryCode,
|
co.code countryCode,
|
||||||
c.fi,
|
c.fi,
|
||||||
c.name clientName,
|
c.name clientName,
|
||||||
c.phone,
|
a.mobile,
|
||||||
DATE_FORMAT(t.shipped, '%d/%m/%Y') created,
|
DATE_FORMAT(t.shipped, '%d/%m/%Y') created,
|
||||||
t.shipped,
|
t.shipped,
|
||||||
CONCAT( e.ticketFk, LPAD(e.counter, mc.counterWidth, '0')) reference,
|
CONCAT( e.ticketFk, LPAD(e.counter, mc.counterWidth, '0')) reference,
|
||||||
|
|
|
@ -20,17 +20,20 @@ BEGIN
|
||||||
|
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
|
|
||||||
SELECT id INTO vItemShelvingFk
|
|
||||||
FROM itemShelving
|
|
||||||
WHERE id = vItemShelvingFk
|
|
||||||
FOR UPDATE;
|
|
||||||
|
|
||||||
UPDATE itemShelving
|
UPDATE itemShelving
|
||||||
SET visible = 0,
|
SET visible = 0,
|
||||||
available = 0
|
available = 0
|
||||||
WHERE id = vItemShelvingFk
|
WHERE id = vItemShelvingFk
|
||||||
AND itemFk = vItemFk;
|
AND itemFk = vItemFk;
|
||||||
|
|
||||||
|
SELECT iss.id
|
||||||
|
FROM itemShelvingSale iss
|
||||||
|
JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
|
||||||
|
WHERE iss.itemShelvingFk = vItemShelvingFk
|
||||||
|
AND iss.itemFk = vItemFk
|
||||||
|
AND NOT iss.isPicked
|
||||||
|
FOR UPDATE;
|
||||||
|
|
||||||
INSERT INTO itemShelvingSaleReserve (saleFk, vSectorFk)
|
INSERT INTO itemShelvingSaleReserve (saleFk, vSectorFk)
|
||||||
SELECT DISTINCT iss.saleFk
|
SELECT DISTINCT iss.saleFk
|
||||||
FROM itemShelvingSale iss
|
FROM itemShelvingSale iss
|
||||||
|
|
|
@ -31,6 +31,12 @@ BEGIN
|
||||||
RESIGNAL;
|
RESIGNAL;
|
||||||
END;
|
END;
|
||||||
|
|
||||||
|
IF vQuantity > vReservedQuantity
|
||||||
|
OR (vQuantity < vReservedQuantity AND NOT vIsItemShelvingSaleEmpty)
|
||||||
|
OR (vQuantity = vReservedQuantity AND vIsItemShelvingSaleEmpty) THEN
|
||||||
|
CALL util.throw('The quantity cannot be different from the reserved');
|
||||||
|
END IF;
|
||||||
|
|
||||||
IF (SELECT isPicked FROM itemShelvingSale WHERE id = vItemShelvingSaleFk) THEN
|
IF (SELECT isPicked FROM itemShelvingSale WHERE id = vItemShelvingSaleFk) THEN
|
||||||
CALL util.throw('Reservation completed');
|
CALL util.throw('Reservation completed');
|
||||||
END IF;
|
END IF;
|
||||||
|
@ -52,9 +58,8 @@ BEGIN
|
||||||
AND NOT iss.isPicked;
|
AND NOT iss.isPicked;
|
||||||
|
|
||||||
IF vQuantity > vReservedQuantity
|
IF vQuantity > vReservedQuantity
|
||||||
OR (vQuantity < vReservedQuantity AND
|
OR (vQuantity < vReservedQuantity AND NOT vIsItemShelvingSaleEmpty)
|
||||||
(NOT vIsItemShelvingSaleEmpty OR vIsItemShelvingSaleEmpty IS NULL))
|
OR (vQuantity = vReservedQuantity AND vIsItemShelvingSaleEmpty) THEN
|
||||||
OR (vIsItemShelvingSaleEmpty IS NOT NULL AND vQuantity = vReservedQuantity) THEN
|
|
||||||
CALL util.throw('The quantity cannot be different from the reserved');
|
CALL util.throw('The quantity cannot be different from the reserved');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
@ -99,7 +104,7 @@ BEGIN
|
||||||
|
|
||||||
IF vIsItemShelvingSaleEmpty AND vQuantity <> vReservedQuantity THEN
|
IF vIsItemShelvingSaleEmpty AND vQuantity <> vReservedQuantity THEN
|
||||||
INSERT INTO itemShelvingSaleReserve (saleFk, vSectorFk)
|
INSERT INTO itemShelvingSaleReserve (saleFk, vSectorFk)
|
||||||
SELECT vSaleFk;
|
SELECT vSaleFk, vSectorFk;
|
||||||
CALL itemShelvingSale_reallocate(vItemShelvingFk, vItemFk, vSectorFk);
|
CALL itemShelvingSale_reallocate(vItemShelvingFk, vItemFk, vSectorFk);
|
||||||
END IF;
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE vn.itemShelvingSale MODIFY COLUMN IF EXISTS isPicked tinyint(1) DEFAULT 1 NOT NULL;
|
|
@ -0,0 +1,2 @@
|
||||||
|
ALTER TABLE vn.state DROP FOREIGN KEY state_ibfk_1;
|
||||||
|
ALTER TABLE vn.state ADD CONSTRAINT state_ibfk_1 FOREIGN KEY (alertLevel) REFERENCES vn.alertLevel(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -10,7 +10,7 @@
|
||||||
auto-load="true"
|
auto-load="true"
|
||||||
url="Countries"
|
url="Countries"
|
||||||
data="countries"
|
data="countries"
|
||||||
order="country">
|
order="name">
|
||||||
</vn-crud-model>
|
</vn-crud-model>
|
||||||
<vn-crud-model
|
<vn-crud-model
|
||||||
auto-load="true"
|
auto-load="true"
|
||||||
|
|
Loading…
Reference in New Issue