From bf1181ed60f5ef91b670162b147d97b75c3a4bb7 Mon Sep 17 00:00:00 2001 From: DedrickEnc Date: Wed, 20 Sep 2017 10:47:10 +0100 Subject: [PATCH] refactor(stock): Add Call a pprocedure to compute movement --- server/controllers/stock/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/controllers/stock/index.js b/server/controllers/stock/index.js index d93bd162e1..46225f3e4d 100644 --- a/server/controllers/stock/index.js +++ b/server/controllers/stock/index.js @@ -395,6 +395,9 @@ function createIntegration(req, res, next) { // writting all records relative to the movement in the posting journal table transaction.addQuery('CALL PostIntegration(?)', [commonInfos]); + + // transaction - movement reference + transaction.addQuery('CALL ComputeMovementReference(?);', [db.bid(documentUuid)]); }); // execute all operations as one transaction