From f68d9ad37d595eaeb7fa841b28361fc5c3d71c4b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 15 Jan 2023 07:58:02 +1100 Subject: [PATCH] Remove _ fields if nothing is populates in Swiss QR Codes --- app/Helpers/SwissQr/SwissQrGenerator.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Helpers/SwissQr/SwissQrGenerator.php b/app/Helpers/SwissQr/SwissQrGenerator.php index 488c0d1a623c..e69db7d4734f 100644 --- a/app/Helpers/SwissQr/SwissQrGenerator.php +++ b/app/Helpers/SwissQr/SwissQrGenerator.php @@ -87,10 +87,10 @@ class SwissQrGenerator $qrBill->setUltimateDebtor( QrBill\DataGroup\Element\StructuredAddress::createWithStreet( substr($this->client->present()->name(), 0 , 70), - $this->client->address1 ? substr($this->client->address1, 0 , 70) : '_', - $this->client->address2 ? substr($this->client->address2, 0 , 16) : '_', - $this->client->postal_code ? substr($this->client->postal_code, 0, 16) : '_', - $this->client->city ? substr($this->client->city, 0, 35) : '_', + $this->client->address1 ? substr($this->client->address1, 0 , 70) : ' ', + $this->client->address2 ? substr($this->client->address2, 0 , 16) : ' ', + $this->client->postal_code ? substr($this->client->postal_code, 0, 16) : ' ', + $this->client->city ? substr($this->client->city, 0, 35) : ' ', 'CH' ));