From 35df439f14f61e22b6acfbf30ea9ffee2893faf7 Mon Sep 17 00:00:00 2001 From: josepd Date: Tue, 13 Feb 2024 13:19:26 +0100 Subject: [PATCH] refs#6721 MetodoPagoActivarTrabajadores --- db/routines/vn/procedures/worker_updateBusiness.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/db/routines/vn/procedures/worker_updateBusiness.sql b/db/routines/vn/procedures/worker_updateBusiness.sql index 274bc3ec0..76c8c9cbb 100644 --- a/db/routines/vn/procedures/worker_updateBusiness.sql +++ b/db/routines/vn/procedures/worker_updateBusiness.sql @@ -23,6 +23,12 @@ BEGIN IF vOldBusinessFk IS NULL THEN CALL account.account_enable(vSelf); + + UPDATE client c + JOIN payMethod pm ON pm.code = 'bankDraft' + SET c.payMethodFk = pm.id + WHERE c.id = vSelf + AND c.iban; END IF; END$$ DELIMITER ;