X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8a8629cf302fba798e79ed34e12853edc0e87ba4..b30eacc6bbc6f:/bin/mozilla/dn.pl diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index 0ba9d3960..0b2b27c58 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -84,6 +84,8 @@ sub edit_config { $form->{title} = $locale->text('Edit Dunning Process Config'); $form->{callback} ||= build_std_url("action=edit_config"); + setup_dn_edit_config_action_bar(); + $form->header(); print $form->parse_html_template("dunning/edit_config"); @@ -101,8 +103,10 @@ sub add { DN->get_config(\%myconfig, \%$form); + $form->get_lists("departments" => "ALL_DEPARTMENTS"); + $form->{SHOW_DUNNING_LEVEL_SELECTION} = $form->{DUNNING} && scalar @{ $form->{DUNNING} }; - $form->{SHOW_DEPARTMENT_SELECTION} = $form->{all_departments} && scalar @{ $form->{all_departments} || [] }; + $form->{SHOW_DEPARTMENT_SELECTION} = $form->{ALL_DEPARTMENTS} && scalar @{ $form->{ALL_DEPARTMENTS} || [] }; $form->{title} = $locale->text('Start Dunning Process'); @@ -360,6 +364,7 @@ sub show_dunning { 'checkbox' => { 'text' => '', 'visible' => 'HTML' }, 'dunning_description' => { 'text' => $locale->text('Dunning Level') }, 'customername' => { 'text' => $locale->text('Customername') }, + 'departmentname' => { 'text' => $locale->text('Department') }, 'language' => { 'text' => $locale->text('Language') }, 'invnumber' => { 'text' => $locale->text('Invnumber') }, 'transdate' => { 'text' => $locale->text('Invdate') }, @@ -453,7 +458,7 @@ sub show_dunning { $report->set_options_from_form(); setup_dn_show_dunning_action_bar(); - $report->generate_with_headers(action_bar => 1); + $report->generate_with_headers(); $main::lxdebug->leave_sub(); @@ -569,7 +574,7 @@ sub setup_dn_add_action_bar { for my $bar ($::request->layout->get('actionbar')) { $bar->add( action => [ - t8('Continue'), + t8('Search'), submit => [ '#form', { action => "show_invoices" } ], accesskey => 'enter', ], @@ -583,7 +588,7 @@ sub setup_dn_show_invoices_action_bar { for my $bar ($::request->layout->get('actionbar')) { $bar->add( action => [ - t8('Continue'), + t8('Create'), submit => [ '#form', { action => "save_dunning" } ], checks => [ [ 'kivi.check_if_entries_selected', '[name^=active_]' ] ], accesskey => 'enter', @@ -599,7 +604,7 @@ sub setup_dn_search_action_bar { for my $bar ($::request->layout->get('actionbar')) { $bar->add( action => [ - t8('Continue'), + t8('Search'), submit => [ '#form', { action => "show_dunning" } ], accesskey => 'enter', ], @@ -629,4 +634,18 @@ sub setup_dn_show_dunning_action_bar { } } +sub setup_dn_edit_config_action_bar { + my %params = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Save'), + submit => [ '#form', { action => "save" } ], + accesskey => 'enter', + ], + ); + } +} + # end of main