diff --git a/db/routines/vn/procedures/creditRecovery.sql b/db/routines/vn/procedures/creditRecovery.sql index e598661af..a57e08063 100644 --- a/db/routines/vn/procedures/creditRecovery.sql +++ b/db/routines/vn/procedures/creditRecovery.sql @@ -39,7 +39,7 @@ BEGIN WHERE credit > 0; UPDATE client c - JOIN tCreditClients cc ON cc.clientFk = c.clientFk + JOIN tCreditClients cc ON cc.clientFk = c.id SET c.credit = newCredit; DROP TEMPORARY TABLE tCreditClients;