Herausnahme der Anpassungen aus dem Draft Controller in die neuen Methoden show_draft der legacy scripts
package main;
require $allowed_modules{ $self->draft->module };
}
-
-
my $params = delete $::form->{form};
my $new_form = YAML::Load($self->draft->form);
$::form->{$_} = $new_form->{$_} for keys %$new_form;
if ($params && 'HASH' eq ref $params) {
$::form->{$_} = $params->{$_} for keys %$params;
}
- $::form->{transdate} = DateTime->today_local->to_kivitendo if !$::form->{transdate};
- $::form->{gldate} = $::form->{transdate} if !$::form->{gldate};
$::form->{script} = $self->draft->module . '.pl';
- ::update();
+ ::show_draft();
}
sub action_delete {
$main::lxdebug->leave_sub();
}
+sub show_draft {
+ $::form->{transdate} = DateTime->today_local->to_kivitendo if !$::form->{transdate};
+ $::form->{gldate} = $::form->{transdate} if !$::form->{gldate};
+ update();
+}
+
sub update {
$main::lxdebug->enter_sub();
$main::lxdebug->leave_sub();
}
+sub show_draft {
+ $::form->{transdate} = DateTime->today_local->to_kivitendo if !$::form->{transdate};
+ $::form->{gldate} = $::form->{transdate} if !$::form->{gldate};
+ update();
+}
+
sub update {
$main::lxdebug->enter_sub();
$main::lxdebug->leave_sub();
}
+sub show_draft {
+ $::form->{transdate} = DateTime->today_local->to_kivitendo if !$::form->{transdate};
+ $::form->{gldate} = $::form->{transdate} if !$::form->{gldate};
+ update();
+}
+
sub update {
$main::lxdebug->enter_sub();
$main::lxdebug->leave_sub();
}
+sub show_draft {
+ update();
+}
+
sub update {
$main::lxdebug->enter_sub();
$main::lxdebug->leave_sub();
}
+sub show_draft {
+ update();
+}
+
sub update {
$main::lxdebug->enter_sub();