From 27ecff685e5a1084dcb33a0e295461ec4d7f906c Mon Sep 17 00:00:00 2001 From: joan Date: Mon, 12 Sep 2022 12:45:52 +0200 Subject: [PATCH] fix(report): debtor letter with portuguese IBAN --- print/templates/email/letter-debtor-nd/sql/client.sql | 3 ++- print/templates/email/letter-debtor-st/sql/client.sql | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/print/templates/email/letter-debtor-nd/sql/client.sql b/print/templates/email/letter-debtor-nd/sql/client.sql index aad907a4b..479bfac5e 100644 --- a/print/templates/email/letter-debtor-nd/sql/client.sql +++ b/print/templates/email/letter-debtor-nd/sql/client.sql @@ -5,6 +5,7 @@ SELECT be.name AS bankName FROM client c JOIN company AS cny - JOIN supplierAccount AS sa ON sa.id = cny.supplierAccountFk + JOIN supplierAccount AS sa ON + IF (ct.code = 'PT', sa.id = 907, sa.id = cny.supplierAccountFk) JOIN bankEntity be ON be.id = sa.bankEntityFk WHERE c.id = ? AND cny.id = ? \ No newline at end of file diff --git a/print/templates/email/letter-debtor-st/sql/client.sql b/print/templates/email/letter-debtor-st/sql/client.sql index aad907a4b..479bfac5e 100644 --- a/print/templates/email/letter-debtor-st/sql/client.sql +++ b/print/templates/email/letter-debtor-st/sql/client.sql @@ -5,6 +5,7 @@ SELECT be.name AS bankName FROM client c JOIN company AS cny - JOIN supplierAccount AS sa ON sa.id = cny.supplierAccountFk + JOIN supplierAccount AS sa ON + IF (ct.code = 'PT', sa.id = 907, sa.id = cny.supplierAccountFk) JOIN bankEntity be ON be.id = sa.bankEntityFk WHERE c.id = ? AND cny.id = ? \ No newline at end of file -- 2.40.1