refs #2687 fix: clone Travel as user action

This commit is contained in:
Javier Segarra 2024-02-12 08:44:54 +01:00
parent 5d876deff5
commit 380e0ef651
1 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ BEGIN
DECLARE vEvaNotes VARCHAR(255); DECLARE vEvaNotes VARCHAR(255);
DECLARE vDone BOOL; DECLARE vDone BOOL;
DECLARE vAuxEntryFk INT; DECLARE vAuxEntryFk INT;
DECLARE vTx BOOLEAN DEFAULT !@@in_transaction; DECLARE vTx BOOLEAN DEFAULT @@in_transaction;
DECLARE vRsEntry CURSOR FOR DECLARE vRsEntry CURSOR FOR
SELECT e.id SELECT e.id
FROM entry e FROM entry e
@ -41,8 +41,8 @@ BEGIN
CALL util.tx_rollback(vTx); CALL util.tx_rollback(vTx);
RESIGNAL; RESIGNAL;
END; END;
CALL util.tx_start(vTx); CALL util.tx_start(vTx);
INSERT INTO travel (shipped, landed, warehouseInFk, warehouseOutFk, agencyModeFk, `ref`, isDelivered, isReceived, m3, cargoSupplierFk, kg,clonedFrom) INSERT INTO travel (shipped, landed, warehouseInFk, warehouseOutFk, agencyModeFk, `ref`, isDelivered, isReceived, m3, cargoSupplierFk, kg,clonedFrom)
SELECT vDateStart, vDateEnd, vWarehouseInFk, vWarehouseOutFk, vAgencyModeFk, vRef, isDelivered, isReceived, m3,cargoSupplierFk, kg,vTravelFk SELECT vDateStart, vDateEnd, vWarehouseInFk, vWarehouseOutFk, vAgencyModeFk, vRef, isDelivered, isReceived, m3,cargoSupplierFk, kg,vTravelFk