]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/is.pl
Rechnungsmasken auf dispatcher Mechanismus umgestellt
[mfinanz.git] / bin / mozilla / is.pl
index aa9a9a8618e6d7d733e64f965f6d63d60a9075b7..07ec029867d8eaac668a821e26936dc7036eb8c9 100644 (file)
@@ -35,6 +35,7 @@ use SL::FU;
 use SL::IS;
 use SL::PE;
 use SL::OE;
 use SL::IS;
 use SL::PE;
 use SL::OE;
+use SL::MoreCommon qw(restore_form save_form);
 use Data::Dumper;
 use DateTime;
 use List::MoreUtils qw(uniq);
 use Data::Dumper;
 use DateTime;
 use List::MoreUtils qw(uniq);
@@ -604,7 +605,7 @@ sub update {
       if ($rows > 1) {
 
         select_item(mode => 'IS', pre_entered_qty => $form->{"qty_$i"});
       if ($rows > 1) {
 
         select_item(mode => 'IS', pre_entered_qty => $form->{"qty_$i"});
-        ::end_of_request();
+        $::dispatcher->end_request;
 
       } else {
 
 
       } else {
 
@@ -759,7 +760,7 @@ sub post {
   # if oldcustomer ne customer redo form
   if (&check_name('customer')) {
     &update;
   # if oldcustomer ne customer redo form
   if (&check_name('customer')) {
     &update;
-    ::end_of_request();
+    $::dispatcher->end_request;
   }
 
   if ($myconfig{mandatory_departments} && !$form->{department_id}) {
   }
 
   if ($myconfig{mandatory_departments} && !$form->{department_id}) {
@@ -1173,3 +1174,18 @@ sub e_mail {
 
   $main::lxdebug->leave_sub();
 }
 
   $main::lxdebug->leave_sub();
 }
+
+sub dispatcher {
+  for my $action (qw(
+    print update ship_to e_mail storno post_payment use_as_new credit_note
+    delete post order preview post_and_e_mail print_and_post save_draft
+    mark_as_paid
+  )) {
+    if ($::form->{"action_$action"}) {
+      call_sub($action);
+      return;
+    }
+  }
+
+  $::form->error($::locale->text('No action defined.'));
+}