diff --git a/modules/travel/back/methods/travel/cloneWithEntries.js b/modules/travel/back/methods/travel/cloneWithEntries.js index 45ebef283..8d0f638cc 100644 --- a/modules/travel/back/methods/travel/cloneWithEntries.js +++ b/modules/travel/back/methods/travel/cloneWithEntries.js @@ -45,16 +45,17 @@ module.exports = Self => { let stmts = []; let stmt; - + let tx = await Self.beginTransaction({}); stmt = new ParameterizedSQL( - `CALL travel_cloneWithEntries(?, ?, ?, ?, ?, ?, ?, @vTravelFk)`, [ + `CALL travel_cloneWithEntries(?, ?, ?, ?, ?, ?, ?, ?, @vTravelFk)`, [ id, started, ended, travel.warehouseOutFk, travel.warehouseInFk, travel.ref, - travel.agencyModeFk + travel.agencyModeFk, + !!tx.id ] ); stmts.push(stmt);