X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fdn.pl;h=af615da51ac365d6d48752fd96932683f62c5c44;hb=2efc8cbcc63c56094e0692067b7cb678c1583987;hp=a81d9452e6e9fa9b6290ccc2cb904a5e5b41e179;hpb=fec0904532e2136a1a769f568c351f4875257d56;p=kivitendo-erp.git
diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl
index a81d9452e..af615da51 100644
--- a/bin/mozilla/dn.pl
+++ b/bin/mozilla/dn.pl
@@ -31,10 +31,11 @@
#
#======================================================================
+use POSIX;
+
use SL::IS;
use SL::PE;
use SL::DN;
-use Data::Dumper;
require "bin/mozilla/common.pl";
require "bin/mozilla/io.pl";
@@ -46,6 +47,26 @@ sub edit_config {
$lxdebug->enter_sub();
DN->get_config(\%myconfig, \%$form);
+ $form->get_lists('charts' => { 'key' => 'ALL_CHARTS',
+ 'transdate' => 'current_date' });
+
+ $form->{SELECT_AR_AMOUNT} = [];
+ $form->{SELECT_AR} = [];
+
+ foreach my $chart (@{ $form->{ALL_CHARTS} }) {
+ $chart->{LINKS} = { map { $_, 1 } split m/:/, $chart->{link} };
+
+ if ($chart->{LINKS}->{AR}) {
+ $chart->{AR_selected} = "selected" if $chart->{id} == $form->{AR};
+ push @{ $form->{SELECT_AR} }, $chart;
+ }
+
+ if ($chart->{LINKS}->{AR_amount}) {
+ $chart->{AR_amount_fee_selected} = "selected" if $chart->{id} == $form->{AR_amount_fee};
+ $chart->{AR_amount_interest_selected} = "selected" if $chart->{id} == $form->{AR_amount_interest};
+ push @{ $form->{SELECT_AR_AMOUNT} }, $chart;
+ }
+ }
$form->{title} = $locale->text('Edit Dunning Process Config');
$form->{callback} ||= build_std_url("action=edit_config");
@@ -60,132 +81,24 @@ sub edit_config {
sub add {
$lxdebug->enter_sub();
+
# setup customer selection
$form->all_vc(\%myconfig, "customer", "AR");
DN->get_config(\%myconfig, \%$form);
- if (@{ $form->{all_customer} }) {
- map { $customer .= "