Title erst nach create_invoice setzen, dadrin wird der typ sanitized.
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 14 Mar 2011 16:46:09 +0000 (17:46 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 14 Mar 2011 16:46:09 +0000 (17:46 +0100)
bin/mozilla/is.pl

index 9f57eab..5c55ad6 100644 (file)
@@ -94,14 +94,6 @@ sub edit {
   $form->{javascript} = qq|<script type="text/javascript" src="js/show_history.js"></script>|;
   #/show hhistory button
 
-  if ($form->{type} eq "credit_note") {
-    $form->{title} = $locale->text('Edit Credit Note');
-    $form->{title} = $locale->text('Edit Storno Credit Note') if $form->{storno};
-  } else {
-    $form->{title} = $locale->text('Edit Sales Invoice');
-    $form->{title} = $locale->text('Edit Storno Invoice')     if $form->{storno};
-  }
-
   my ($language_id, $printer_id);
   if ($form->{print_and_post}) {
     $form->{action}   = "print";
@@ -109,7 +101,16 @@ sub edit {
     $language_id = $form->{language_id};
     $printer_id = $form->{printer_id};
   }
+
   &invoice_links;
+  if ($form->{type} eq "credit_note") {
+    $form->{title} = $locale->text('Edit Credit Note');
+    $form->{title} = $locale->text('Edit Storno Credit Note') if $form->{storno};
+  } else {
+    $form->{title} = $locale->text('Edit Sales Invoice');
+    $form->{title} = $locale->text('Edit Storno Invoice')     if $form->{storno};
+  }
+
   &prepare_invoice;
   if ($form->{print_and_post}) {
     $form->{language_id} = $language_id;