X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fsepa.pl;h=edb6edae1ae8c03344ebe84be1fed69139a5b4f7;hb=44d893c2d2589ac8d09d255f9be0e38d74c48407;hp=518b9a8fcea3a7d11194c13ee2dbaeb7003353fb;hpb=0c28bb82b805b07543debaf08061b58d0b437c07;p=kivitendo-erp.git diff --git a/bin/mozilla/sepa.pl b/bin/mozilla/sepa.pl index 518b9a8fc..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, @@ -511,6 +512,7 @@ sub bank_transfer_download_sepa_xml { 'dst_iban' => $item->{vc_iban}, 'dst_bic' => $item->{vc_bic}, 'company' => $item->{vc_name}, + 'company_number' => $item->{vc_number}, 'amount' => $item->{amount}, 'reference' => $item->{reference}, 'reference_date' => $item->{reference_date},