Skip to content

Commit

Permalink
New: allow to display account address in pdf sepa mandate. Fix: use -…
Browse files Browse the repository at this point in the history
…>proprio because ->account_owner does not exist.
  • Loading branch information
thomas-Ngr committed Jan 27, 2023
1 parent 31652fd commit 145a67d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $sepavatid, 0, 'L');

$address = '______________________________________________';
if ($thirdparty->id > 0) {
if(!empty($object->owner_address)) {
$address = $object->owner_address;
} elseif ($thirdparty->id > 0) {
$tmpaddresswithoutcountry = $thirdparty->getFullAddress(); // we test on address without country
if ($tmpaddresswithoutcountry) {
$address = $thirdparty->getFullAddress(1); // full address
Expand Down

0 comments on commit 145a67d

Please sign in to comment.