X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fdn.pl;h=6c918fe583b241b8d51fb47d260d20fae57b4bf3;hb=f49ad7f1f479daf79dd78d3ff0e0894c1e6c311c;hp=872919cfc3a6d9c786fd20b7501d3683e92b794b;hpb=8f1fb2d695599019da043422cc3314b2a3f4fede;p=kivitendo-erp.git diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index 872919cfc..6c918fe58 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -132,7 +132,7 @@ sub show_invoices { if ($row->{next_dunning_config_id}) { map { $_->{SELECTED} = $_->{id} == $row->{next_dunning_config_id} } @{ $row->{DUNNING_CONFIG } }; } - map { $row->{$_} = $form->format_amount(\%myconfig, $row->{$_} * 1, -2) } qw(amount fee interest); + map { $row->{$_} = $form->format_amount(\%myconfig, $row->{$_} * 1, -2) } qw(amount open_amount fee interest); } $form->get_lists('printers' => 'printers', @@ -176,9 +176,9 @@ sub save { DN->save_config(\%myconfig, \%$form); # saving the history if(!exists $form->{addition} && $form->{id} ne "") { - $form->{snumbers} = qq|dunning_id_| . $form->{"dunning_id"}; + $form->{snumbers} = qq|dunning_id_| . $form->{"dunning_id"}; $form->{addition} = "SAVED FOR DUNNING"; - $form->save_history($form->dbconnect(\%myconfig)); + $form->save_history; } # /saving the history $form->redirect($locale->text('Dunning Process Config saved!')); @@ -245,9 +245,9 @@ sub save_dunning { # saving the history if(!exists $form->{addition} && $form->{id} ne "") { - $form->{snumbers} = qq|dunning_id_| . $form->{"dunning_id"}; + $form->{snumbers} = qq|dunning_id_| . $form->{"dunning_id"}; $form->{addition} = "DUNNING STARTED"; - $form->save_history($form->dbconnect(\%myconfig)); + $form->save_history; } # /saving the history @@ -284,7 +284,8 @@ sub search { $main::auth->assert('dunning_edit'); $form->get_lists("customers" => "ALL_CUSTOMERS", - "departments" => "ALL_DEPARTMENTS"); + "departments" => "ALL_DEPARTMENTS", + "salesmen" => "ALL_SALESMEN"); DN->get_config(\%myconfig, \%$form); @@ -295,6 +296,7 @@ sub search { $form->{jsscript} = 1; $form->{title} = $locale->text('Dunnings'); $form->{fokus} = "search.customer"; + $form->{salesman_labels} = sub { $_[0]->{"name"} || $_[0]->{"login"} }; $form->header(); @@ -319,7 +321,7 @@ sub show_dunning { $main::auth->assert('dunning_edit'); my @filter_field_list = qw(customer_id customer dunning_level department_id invnumber ordnumber - transdatefrom transdateto dunningfrom dunningto notes showold salesman); + transdatefrom transdateto dunningfrom dunningto notes showold l_salesman salesman_id); report_generator_set_default_sort('customername', 1); @@ -358,13 +360,9 @@ sub show_dunning { 'dunning_duedate' => { 'text' => $locale->text('Dunning Duedate') }, 'fee' => { 'text' => $locale->text('Total Fees') }, 'interest' => { 'text' => $locale->text('Interest') }, + 'salesman' => { 'text' => $locale->text('Salesperson'), 'visible' => $form->{l_salesman} ? 1 : 0 }, ); - if ($form->{l_salesman}) { - # Show salesman column - $column_defs{'salesman'} = ( { 'text' => $locale->text('Salesperson') } ); - } - $report->set_columns(%column_defs); $report->set_column_order(qw(checkbox dunning_description customername invnumber transdate duedate amount dunning_date dunning_duedate fee interest salesman));