From 2fc0579defc8be9e606f65015015c67cd82dbe55 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 11 Nov 2024 17:38:41 +0100 Subject: [PATCH] NEW EPC QR CODE - Use bank owner account name instaed of company (#31735) Co-authored-by: Laurent Destailleur --- htdocs/core/class/commoninvoice.class.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index d465289f601..d4c29542916 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -1,10 +1,11 @@ - * Copyright (C) 2012 Cédric Salvador - * Copyright (C) 2012-2014 Raphaël Doursenaud +/* Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Cédric Salvador + * Copyright (C) 2012-2014 Raphaël Doursenaud * Copyright (C) 2023 Nick Fragoulis - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024 Frédéric France * Copyright (C) 2024 MDW + * Copyright (C) 2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1759,7 +1760,11 @@ abstract class CommonInvoice extends CommonObject if ($this->fk_account > 0) { $bankAccount->fetch($this->fk_account); $lines[] = $bankAccount->bic; //BIC (required) - $lines[] = $mysoc->name; //Name (required) + if (!empty($bankAccount->owner_name)) { + $lines[] = $bankAccount->owner_name; //Owner of the bank account, if present (required) + } else { + $lines[] = $mysoc->name; //Name (required) + } $lines[] = $bankAccount->iban; //IBAN (required) } else { $lines[] = ""; //BIC (required)