$invoice->{reference_prefix} = $prefix;
}
- $::request->layout->use_javascript('jquery.checkall.js');
$form->header();
print $form->parse_html_template('sepa/bank_transfer_add',
{ 'INVOICES' => $invoices,
my $cgi = $::request->{cgi};
my $vc = $form->{vc} eq 'customer' ? 'customer' : 'vendor';
- $::request->layout->use_javascript('jquery.checkall.js');
-
$form->{title} = $vc eq 'customer' ? $::locale->text('List of bank collections') : $locale->text('List of bank transfers');
$form->{sort} ||= 'id';
$form->error($locale->text('That export does not exist.'));
}
- $::request->layout->use_javascript('jquery.checkall.js');
$form->{jsscript} = 1;
$form->{title} = $locale->text('View SEPA export');
$form->header();
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;
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,
'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},