Revision a3a9ebcd
Von Cem Aydin vor mehr als 2 Jahren hinzugefügt
SL/Helper/QrBillFunctions.pm | ||
---|---|---|
1 | 1 |
package SL::Helper::QrBillFunctions; |
2 | 2 |
|
3 |
use List::Util qw(first); |
|
4 |
|
|
3 | 5 |
use strict; |
4 | 6 |
use warnings; |
5 | 7 |
|
... | ... | |
12 | 14 |
|
13 | 15 |
my $qr_account; |
14 | 16 |
|
15 |
my $bank_accounts = SL::DB::Manager::BankAccount->get_all; |
|
16 |
$qr_account = scalar(@{ $bank_accounts }) == 1 ? |
|
17 |
$bank_accounts->[0] : |
|
18 |
first { $_->use_for_qrbill } @{ $bank_accounts }; |
|
17 |
my $bank_accounts = SL::DB::Manager::BankAccount->get_all_sorted; |
|
18 |
|
|
19 |
$qr_account = first { $_->use_for_qrbill } @{ $bank_accounts }; |
|
19 | 20 |
|
20 | 21 |
if (!$qr_account) { |
21 | 22 |
$::form->error($::locale->text('No bank account flagged for QRBill usage was found.')); |
SL/Template/OpenDocument.pm | ||
---|---|---|
22 | 22 |
# use File::Spec; |
23 | 23 |
# use File::Temp qw(:mktemp); |
24 | 24 |
use IO::File; |
25 |
use List::Util qw(first); |
|
26 | 25 |
|
27 | 26 |
use strict; |
28 | 27 |
|
Auch abrufbar als: Unified diff
Swiss QR-Bill: Fix zu Bankkonto für QR-Rechnung
- fehlendes Modul eingefügt
- nur erstes markiertes Bankkonto berücksichtigen