From: Martin Helmling martin.helmling@octosoft.eu Date: Mon, 12 Dec 2016 14:59:04 +0000 (+0100) Subject: BUGFIX: Kreditorenbuchungen: Fehler beim Nutzen von Drafts(2) X-Git-Tag: release-3.5.4~1810 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=46aa98a931708ad5ee5003437af92f0358e582b3;p=kivitendo-erp.git BUGFIX: Kreditorenbuchungen: Fehler beim Nutzen von Drafts(2) Herausnahme der Anpassungen aus dem Draft Controller in die neuen Methoden show_draft der legacy scripts --- diff --git a/SL/Controller/Draft.pm b/SL/Controller/Draft.pm index 131ed6b23..a450e2c9f 100644 --- a/SL/Controller/Draft.pm +++ b/SL/Controller/Draft.pm @@ -81,8 +81,6 @@ sub action_load { 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; @@ -91,10 +89,8 @@ sub action_load { 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 { diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 1ea3516cc..eee20d0a0 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -495,6 +495,12 @@ sub mark_as_paid { $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(); diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 1bfe969dc..3b94d818f 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -523,6 +523,12 @@ sub mark_as_paid { $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(); diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 63f4cad4a..77591f5d2 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -510,6 +510,12 @@ sub generate_report { $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(); diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index d6e162ed8..19b4f74a1 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -480,6 +480,10 @@ sub mark_as_paid { $main::lxdebug->leave_sub(); } +sub show_draft { + update(); +} + sub update { $main::lxdebug->enter_sub(); diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 9c8b87085..a45adbf80 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -546,6 +546,10 @@ sub mark_as_paid { $main::lxdebug->leave_sub(); } +sub show_draft { + update(); +} + sub update { $main::lxdebug->enter_sub();