X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fdn.pl;h=d81e9b16e103bd973a68f40a6722e66e0f3eb651;hb=a143b82a56e889cfda60c2d42fe7d0bdaf73aa83;hp=50c602b408e778bdee621f7f8c4a15000c199a5e;hpb=d63831cbaf332f5280fd92e6134229fa4c109e00;p=kivitendo-erp.git diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index 50c602b40..d81e9b16e 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -207,14 +207,7 @@ sub edit_config { {password}> |; - - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } - - print qq| + . $locale->text('Save') . qq|"> @@ -482,10 +475,10 @@ sub show_invoices { $column_data{dunning_description} = qq|$ref->{dunning_level}: $dunning|; - my $active = "checked"; + my $active = ($ref->{active}) ? "checked" : ""; $column_data{active} = qq||; - my $email = "checked"; + my $email = ($ref->{email}) ? "checked" : ""; $column_data{email} = qq||; $column_data{next_duedate} = qq|$ref->{next_duedate}|; @@ -517,8 +510,8 @@ sub show_invoices {
|; -&print_options; -print qq| + &print_options; + print qq|
{script}> @@ -530,20 +523,10 @@ print qq| {path}> {login}> -{password}>|; -#print qq| -# |; -print qq| +{password}> |; - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } - - print qq| + . $locale->text('Continue') . qq|" onclick="this.disabled=true; this.value='| . $locale->text("The dunning process started") . qq|'; document.Form.action.value='| . $locale->text('Continue') . qq|'; document.Form.submit()">
@@ -569,6 +552,12 @@ sub save { } DN->save_config(\%myconfig, \%$form); + # saving the history + if(!exists $form->{addition} && $form->{id} ne "") { + $form->{addition} = "SAVED FOR DUNNING"; + $form->save_history($form->dbconnect(\%myconfig)); + } + # /saving the history $form->redirect($locale->text('Dunning Process Config saved!')); $lxdebug->leave_sub(); @@ -622,7 +611,12 @@ sub save_dunning { if($form->{DUNNING_PDFS}) { DN->melt_pdfs(\%myconfig, \%$form,$spool); } - + # saving the history + if(!exists $form->{addition} && $form->{id} ne "") { + $form->{addition} = "DUNNING STARTED"; + $form->save_history($form->dbconnect(\%myconfig)); + } + # /saving the history $form->redirect($locale->text('Dunning Process started for selected invoices!')); $lxdebug->leave_sub(); @@ -913,16 +907,20 @@ sub show_dunning { $dunning = qq||; - - - $column_data{dunning_description} = qq|$ref->{dunning_description}|; + my $script = ""; + if ($ref->{invoice}) { + $script = "is.pl"; + } else { + $script = "ar.pl"; + } + $column_data{dunning_description} = qq|{dunning_id}&format=pdf&media=screen&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$form->{callback}>$ref->{dunning_description}|; my $active = "checked"; $column_data{dunning_date} = qq|$ref->{dunning_date}|; $column_data{next_duedate} = qq|$ref->{dunning_duedate}|; $column_data{inv_duedate} = qq|$ref->{duedate}|; $column_data{invdate} = qq|$ref->{transdate}|; - $column_data{invnumber} = qq|{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$form->{callback}>$ref->{invnumber}|; + $column_data{invnumber} = qq|{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$form->{callback}>$ref->{invnumber}|; $column_data{customername} = qq|$ref->{customername}|; $column_data{invamount} = qq|$ref->{amount}|; $column_data{fee} = qq|$ref->{fee}|; @@ -959,14 +957,6 @@ sub show_dunning { {path}> {login}> {password}> -|; - - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } - - print qq| @@ -978,5 +968,21 @@ sub show_dunning { $lxdebug->leave_sub(); } + +sub print_dunning { + $lxdebug->enter_sub(); + + DN->print_dunning(\%myconfig, \%$form, $form->{dunning_id}, $userspath,$spool, $sendmail); + + if($form->{DUNNING_PDFS}) { + DN->melt_pdfs(\%myconfig, \%$form,$spool); + } else { + $form->redirect($locale->text('Could not create dunning copy!')); + } + + $lxdebug->leave_sub(); + +} + # end of main