X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fsepa.pl;h=fd45f80a140dca05dc0ffae35ac99071dcb3d49d;hb=c0f1c3eec56473b63fe132bea71b5cf3b2943065;hp=7971b7d9d3d67809a0096cab9fb0bbbfd66d94b8;hpb=39d61f60fcde7ff61806a1357e79d529f0c1d86d;p=kivitendo-erp.git diff --git a/bin/mozilla/sepa.pl b/bin/mozilla/sepa.pl index 7971b7d9d..fd45f80a1 100755 --- a/bin/mozilla/sepa.pl +++ b/bin/mozilla/sepa.pl @@ -8,6 +8,7 @@ use SL::BankAccount; use SL::Chart; use SL::CT; use SL::Form; +use SL::GenericTranslations; use SL::ReportGenerator; use SL::SEPA; use SL::SEPA::XML; @@ -41,6 +42,15 @@ sub bank_transfer_add { my $bank_account_label_sub = sub { $locale->text('Account number #1, bank code #2, #3', $_[0]->{account_number}, $_[0]->{bank_code}, $_[0]->{bank}) }; + my $translation_list = GenericTranslations->list(translation_type => 'sepa_remittance_info_pfx'); + my %translations = map { ( ($_->{language_id} || 'default') => $_->{translation} ) } @{ $translation_list }; + + foreach my $invoice (@{ $invoices }) { + my $prefix = $translations{ $invoice->{language_id} } || $translations{default} || $::locale->text('Invoice'); + $prefix .= ' ' unless $prefix =~ m/ $/; + $invoice->{reference_prefix} = $prefix; + } + $form->header(); print $form->parse_html_template('sepa/bank_transfer_add', { 'INVOICES' => $invoices, @@ -238,6 +248,7 @@ sub bank_transfer_list { 'attachment_basename' => $locale->text('banktransfers') . strftime('_%Y%m%d', localtime time), ); $report->set_options_from_form(); + $locale->set_numberformat_wo_thousands_separator(\%::myconfig) if lc($report->{options}->{output_format}) eq 'csv'; $report->set_columns(%column_defs); $report->set_column_order(@columns);