]> wagnertech.de Git - mfinanz.git/commitdiff
BUGFIX: Kreditorenbuchungen: Fehler beim Nutzen von Drafts(2)
authorMartin Helmling martin.helmling@octosoft.eu <martin.helmling@octosoft.eu>
Mon, 12 Dec 2016 14:59:04 +0000 (15:59 +0100)
committerMartin Helmling martin.helmling@octosoft.eu <martin.helmling@octosoft.eu>
Mon, 12 Dec 2016 14:59:04 +0000 (15:59 +0100)
Herausnahme der Anpassungen aus dem Draft Controller in die neuen Methoden show_draft der legacy scripts

SL/Controller/Draft.pm
bin/mozilla/ap.pl
bin/mozilla/ar.pl
bin/mozilla/gl.pl
bin/mozilla/ir.pl
bin/mozilla/is.pl

index 131ed6b23e60291fdc56ef1f7edc85511fc3dded..a450e2c9f58375a44e0af26f7458969004342e8f 100644 (file)
@@ -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 {
index 1ea3516cce9b58da8d9140eecda5d4177e7bb77c..eee20d0a0d6d5eef69c3da47b408cbcfe67d1451 100644 (file)
@@ -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();
 
index 1bfe969dc62e760214fa9d2521d493fa626326b2..3b94d818f0cbe8ed88681b1acb0ba5efda350596 100644 (file)
@@ -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();
 
index 63f4cad4a52fce37f43a55942f5583c24bde5b13..77591f5d26aee274907c47a40f1674e5fa34e08d 100644 (file)
@@ -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();
 
index d6e162ed808f2805bdccbf41d189af463c5f91b4..19b4f74a165f763b0cddff3983a2b2acfd9e5e35 100644 (file)
@@ -480,6 +480,10 @@ sub mark_as_paid {
   $main::lxdebug->leave_sub();
 }
 
+sub show_draft {
+  update();
+}
+
 sub update {
   $main::lxdebug->enter_sub();
 
index 9c8b8708564b19c860cceefdbd95699af3b8f7e5..a45adbf804d2999e2a24c7c531d62ac09875099a 100644 (file)
@@ -546,6 +546,10 @@ sub mark_as_paid {
   $main::lxdebug->leave_sub();
 }
 
+sub show_draft {
+  update();
+}
+
 sub update {
   $main::lxdebug->enter_sub();