Revision a8459f49
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
bin/mozilla/sepa.pl | ||
---|---|---|
329 | 329 |
@ids = map $_->{id}, grep { $_->{selected} } @{ $form->{exports} || [] }; |
330 | 330 |
|
331 | 331 |
if (!@ids) { |
332 |
$form->show_generic_error($locale->text('You have not selected any export.'), 'back_button' => 1);
|
|
332 |
$form->show_generic_error($locale->text('You have not selected any export.')); |
|
333 | 333 |
} |
334 | 334 |
} |
335 | 335 |
|
... | ... | |
353 | 353 |
$export->{items} = [ grep { !$_->{export_closed} && !$_->{executed} } @{ $export->{items} } ]; |
354 | 354 |
|
355 | 355 |
if (!@{ $export->{items} }) { |
356 |
$form->show_generic_error($locale->text('All the selected exports have already been closed, or all of their items have already been executed.'), 'back_button' => 1);
|
|
356 |
$form->show_generic_error($locale->text('All the selected exports have already been closed, or all of their items have already been executed.')); |
|
357 | 357 |
} |
358 | 358 |
|
359 | 359 |
} elsif (!$export) { |
... | ... | |
382 | 382 |
my @items = grep { $_->{selected} } @{ $form->{items} || [] }; |
383 | 383 |
|
384 | 384 |
if (!@items) { |
385 |
$form->show_generic_error($locale->text('You have not selected any item.'), 'back_button' => 1);
|
|
385 |
$form->show_generic_error($locale->text('You have not selected any item.')); |
|
386 | 386 |
} |
387 | 387 |
my @export_ids = uniq map { $_->{sepa_export_id} } @items; |
388 | 388 |
my %exports = map { $_ => SL::SEPA->retrieve_export('id' => $_, 'details' => 1, vc => $vc) } @export_ids; |
... | ... | |
396 | 396 |
} |
397 | 397 |
|
398 | 398 |
if (!@items_to_post) { |
399 |
$form->show_generic_error($locale->text('All the selected exports have already been closed, or all of their items have already been executed.'), 'back_button' => 1);
|
|
399 |
$form->show_generic_error($locale->text('All the selected exports have already been closed, or all of their items have already been executed.')); |
|
400 | 400 |
} |
401 | 401 |
|
402 | 402 |
if (any { !$_->{execution_date} } @items_to_post) { |
403 |
$form->show_generic_error($locale->text('You have to specify an execution date for each antry.'), 'back_button' => 1);
|
|
403 |
$form->show_generic_error($locale->text('You have to specify an execution date for each antry.')); |
|
404 | 404 |
} |
405 | 405 |
|
406 | 406 |
SL::SEPA->post_payment('items' => \@items_to_post, vc => $vc); |
... | ... | |
421 | 421 |
my @ids = @{ $form->{items} || [] }; |
422 | 422 |
my @export_ids = uniq map { $_->{export_id} } @ids; |
423 | 423 |
|
424 |
$form->show_generic_error($locale->text('Multi mode not supported.'), 'back_button' => 1) if 1 != scalar @export_ids;
|
|
424 |
$form->show_generic_error($locale->text('Multi mode not supported.')) if 1 != scalar @export_ids; |
|
425 | 425 |
|
426 | 426 |
my $export = SL::SEPA->retrieve_export('id' => $export_ids[0], 'details' => 1, vc => $vc); |
427 | 427 |
my @items = (); |
... | ... | |
431 | 431 |
push @items, $item if $item; |
432 | 432 |
} |
433 | 433 |
|
434 |
$form->show_generic_error($locale->text('No transfers were executed in this export.'), 'back_button' => 1) if 1 > scalar @items;
|
|
434 |
$form->show_generic_error($locale->text('No transfers were executed in this export.')) if 1 > scalar @items; |
|
435 | 435 |
|
436 | 436 |
my $report = SL::ReportGenerator->new(\%main::myconfig, $form); |
437 | 437 |
|
... | ... | |
484 | 484 |
my $defaults = SL::DB::Default->get; |
485 | 485 |
|
486 | 486 |
if (!$defaults->company) { |
487 |
$form->show_generic_error($locale->text('You have to enter a company name in the client configuration.'), 'back_button' => 1);
|
|
487 |
$form->show_generic_error($locale->text('You have to enter a company name in the client configuration.')); |
|
488 | 488 |
} |
489 | 489 |
|
490 | 490 |
if (($vc eq 'customer') && !$defaults->sepa_creditor_id) { |
491 |
$form->show_generic_error($locale->text('You have to enter the SEPA creditor ID in the client configuration.'), 'back_button' => 1);
|
|
491 |
$form->show_generic_error($locale->text('You have to enter the SEPA creditor ID in the client configuration.')); |
|
492 | 492 |
} |
493 | 493 |
|
494 | 494 |
my @ids; |
... | ... | |
500 | 500 |
} |
501 | 501 |
|
502 | 502 |
if (!@ids) { |
503 |
$form->show_generic_error($locale->text('You have not selected any export.'), 'back_button' => 1);
|
|
503 |
$form->show_generic_error($locale->text('You have not selected any export.')); |
|
504 | 504 |
} |
505 | 505 |
|
506 | 506 |
my @items = (); |
... | ... | |
511 | 511 |
} |
512 | 512 |
|
513 | 513 |
if (!@items) { |
514 |
$form->show_generic_error($locale->text('All the selected exports have already been closed, or all of their items have already been executed.'), 'back_button' => 1);
|
|
514 |
$form->show_generic_error($locale->text('All the selected exports have already been closed, or all of their items have already been executed.')); |
|
515 | 515 |
} |
516 | 516 |
|
517 | 517 |
my $message_id = strftime('MSG%Y%m%d%H%M%S', localtime) . sprintf('%06d', $$); |
... | ... | |
586 | 586 |
my @export_ids = map { $_->{id} } grep { $_->{selected} } @{ $form->{exports} || [] }; |
587 | 587 |
|
588 | 588 |
if (!@export_ids) { |
589 |
$form->show_generic_error($locale->text('You have not selected any export.'), 'back_button' => 1);
|
|
589 |
$form->show_generic_error($locale->text('You have not selected any export.')); |
|
590 | 590 |
} |
591 | 591 |
|
592 | 592 |
my @open_export_ids = (); |
... | ... | |
596 | 596 |
} |
597 | 597 |
|
598 | 598 |
if (!@open_export_ids) { |
599 |
$form->show_generic_error($locale->text('All of the exports you have selected were already closed.'), 'back_button' => 1);
|
|
599 |
$form->show_generic_error($locale->text('All of the exports you have selected were already closed.')); |
|
600 | 600 |
} |
601 | 601 |
|
602 | 602 |
$form->{title} = $locale->text('Close SEPA exports'); |
Auch abrufbar als: Unified diff
Form->show_generic_error: Parameter action, back_button entfernt
Der Funktion kann man eine spezifische Action mitgeben, damit ein Button
mit der Action anstelle des normalen Zurück-Buttons angezeigt wird. Es
gibt allerdings (schon lange?) keinen einzigen Aufruf mehr, der dieses
Feature »Action übergeben« nutzt.
Daher wird es hiermit entfernt.
Im Umkehrschluss gibt es keine Situation, wo der Zurück-Button nicht
angezeigt werden soll. Daher wird auch dieser Parameter entfernt.