Revision 8a8629cf
Von Moritz Bunkus vor etwa 8 Jahren hinzugefügt
bin/mozilla/dn.pl | ||
---|---|---|
$form->{SHOW_DEPARTMENT_SELECTION} = $form->{all_departments} && scalar @{ $form->{all_departments} || [] };
|
||
|
||
$form->{title} = $locale->text('Start Dunning Process');
|
||
|
||
setup_dn_add_action_bar();
|
||
$form->header();
|
||
|
||
print $form->parse_html_template("dunning/add");
|
||
... | ... | |
'no_html' => 1,
|
||
'no_opendocument' => 1,);
|
||
|
||
$::request->layout->add_javascripts("kivi.Dunning.js");
|
||
setup_dn_show_invoices_action_bar();
|
||
$form->header();
|
||
print $form->parse_html_template("dunning/show_invoices");
|
||
|
||
... | ... | |
|
||
$form->{title} = $locale->text('Dunnings');
|
||
|
||
setup_dn_search_action_bar();
|
||
$form->header();
|
||
|
||
print $form->parse_html_template("dunning/search");
|
||
... | ... | |
|
||
$report->set_options_from_form();
|
||
|
||
$::request->layout->add_javascripts("kivi.Dunning.js");
|
||
$report->generate_with_headers();
|
||
setup_dn_show_dunning_action_bar();
|
||
$report->generate_with_headers(action_bar => 1);
|
||
|
||
$main::lxdebug->leave_sub();
|
||
|
||
... | ... | |
|
||
$::form->error($::locale->text('No action defined.'));
|
||
}
|
||
|
||
sub setup_dn_add_action_bar {
|
||
my %params = @_;
|
||
|
||
for my $bar ($::request->layout->get('actionbar')) {
|
||
$bar->add(
|
||
action => [
|
||
t8('Continue'),
|
||
submit => [ '#form', { action => "show_invoices" } ],
|
||
accesskey => 'enter',
|
||
],
|
||
);
|
||
}
|
||
}
|
||
|
||
sub setup_dn_show_invoices_action_bar {
|
||
my %params = @_;
|
||
|
||
for my $bar ($::request->layout->get('actionbar')) {
|
||
$bar->add(
|
||
action => [
|
||
t8('Continue'),
|
||
submit => [ '#form', { action => "save_dunning" } ],
|
||
checks => [ [ 'kivi.check_if_entries_selected', '[name^=active_]' ] ],
|
||
accesskey => 'enter',
|
||
only_once => 1,
|
||
],
|
||
);
|
||
}
|
||
}
|
||
|
||
sub setup_dn_search_action_bar {
|
||
my %params = @_;
|
||
|
||
for my $bar ($::request->layout->get('actionbar')) {
|
||
$bar->add(
|
||
action => [
|
||
t8('Continue'),
|
||
submit => [ '#form', { action => "show_dunning" } ],
|
||
accesskey => 'enter',
|
||
],
|
||
);
|
||
}
|
||
}
|
||
|
||
sub setup_dn_show_dunning_action_bar {
|
||
my %params = @_;
|
||
|
||
for my $bar ($::request->layout->get('actionbar')) {
|
||
$bar->add(
|
||
action => [
|
||
t8('Print'),
|
||
submit => [ '#form', { action => "print_multiple" } ],
|
||
checks => [ [ 'kivi.check_if_entries_selected', '[name^=selected_]' ] ],
|
||
accesskey => 'enter',
|
||
],
|
||
|
||
action => [
|
||
t8('Delete'),
|
||
submit => [ '#form', { action => "delete" } ],
|
||
checks => [ [ 'kivi.check_if_entries_selected', '[name^=selected_]' ] ],
|
||
confirm => $::locale->text('This resets the dunning process for the selected invoices. Posted dunning invoices will not be changed!'),
|
||
],
|
||
);
|
||
}
|
||
}
|
||
|
||
# end of main
|
Auch abrufbar als: Unified diff
ActionBar: Verwendung im Mahnprozess