X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/30d4e2f70ea5fe8c6457b862f13e5835953e9e5c..a3ae31c:/bin/mozilla/sepa.pl diff --git a/bin/mozilla/sepa.pl b/bin/mozilla/sepa.pl index 18f48b2f5..edb6edae1 100755 --- a/bin/mozilla/sepa.pl +++ b/bin/mozilla/sepa.pl @@ -452,13 +452,14 @@ sub bank_transfer_download_sepa_xml { my $locale = $main::locale; my $cgi = $::request->{cgi}; my $vc = $form->{vc} eq 'customer' ? 'customer' : 'vendor'; + my $defaults = SL::DB::Default->get; - if (!$myconfig->{company}) { - $form->show_generic_error($locale->text('You have to enter a company name in your user preferences (see the "Program" menu, "Preferences").'), 'back_button' => 1); + if (!$defaults->company) { + $form->show_generic_error($locale->text('You have to enter a company name in the client configuration.'), 'back_button' => 1); } - if (($vc eq 'customer') && !$myconfig->{sepa_creditor_id}) { - $form->show_generic_error($locale->text('You have to enter the SEPA creditor ID in your user preferences (see the "Program" menu, "Preferences").'), 'back_button' => 1); + if (($vc eq 'customer') && !$defaults->sepa_creditor_id) { + $form->show_generic_error($locale->text('You have to enter the SEPA creditor ID in the client configuration.'), 'back_button' => 1); } my @ids; @@ -486,8 +487,8 @@ sub bank_transfer_download_sepa_xml { my $message_id = strftime('MSG%Y%m%d%H%M%S', localtime) . sprintf('%06d', $$); - my $sepa_xml = SL::SEPA::XML->new('company' => $myconfig->{company}, - 'creditor_id' => $myconfig->{sepa_creditor_id}, + my $sepa_xml = SL::SEPA::XML->new('company' => $defaults->company, + 'creditor_id' => $defaults->sepa_creditor_id, 'src_charset' => $::lx_office_conf{system}->{dbcharset} || 'ISO-8859-15', 'message_id' => $message_id, 'grouped' => 1,