Beim Aufrufen der Dialogbuchenmaske automatisch die richtigen Steuersätze für die...
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 14 May 2009 10:10:45 +0000 (10:10 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 14 May 2009 10:10:45 +0000 (10:10 +0000)
Fix für Bug 960.

bin/mozilla/gl.pl
templates/webpages/gl/form_footer_initial_taxkey_selection_de.html [new file with mode: 0644]
templates/webpages/gl/form_footer_initial_taxkey_selection_master.html [new file with mode: 0644]

index 0f34f1b..1307a27 100644 (file)
@@ -845,7 +845,7 @@ sub display_rows {
     $accno = qq|<td>| .
       NTI($cgi->popup_menu('-name' => "accno_$i",
                            '-id' => "accno_$i",
-                           '-onChange' => "setTaxkey(this, $i)",
+                           '-onChange' => "setTaxkey($i)",
                            '-style' => 'width:200px',
                            '-values' => \@chart_values,
                            '-labels' => \%chart_labels,
@@ -990,7 +990,8 @@ sub form_header {
 
   $form->{javascript} = qq|<script type="text/javascript">
   <!--
-  function setTaxkey(accno, row) {
+  function setTaxkey(row) {
+    var accno  = document.getElementById('accno_' + row);
     var taxkey = accno.options[accno.selectedIndex].value;
     var reg = /--([0-9]*)/;
     var found = reg.exec(taxkey);
@@ -1291,9 +1292,10 @@ $follow_ups_block
       . qq|"> |;
 
   } else {
-      print qq|
+    print qq|
         <input class=submit type=submit name=action id=update_button value="| . $locale->text('Update') . qq|">
         <input class=submit type=submit name=action value="| . $locale->text('Post') . qq|">|;
+    print $form->parse_html_template('gl/form_footer_initial_taxkey_selection');
   }
 
   print "
diff --git a/templates/webpages/gl/form_footer_initial_taxkey_selection_de.html b/templates/webpages/gl/form_footer_initial_taxkey_selection_de.html
new file mode 100644 (file)
index 0000000..9b32d28
--- /dev/null
@@ -0,0 +1,8 @@
+<script type="text/javascript">
+ <!--
+   $(document).ready(function() {
+     setTaxkey(1);
+     setTaxkey(2);
+   });
+   -->
+</script>
diff --git a/templates/webpages/gl/form_footer_initial_taxkey_selection_master.html b/templates/webpages/gl/form_footer_initial_taxkey_selection_master.html
new file mode 100644 (file)
index 0000000..9b32d28
--- /dev/null
@@ -0,0 +1,8 @@
+<script type="text/javascript">
+ <!--
+   $(document).ready(function() {
+     setTaxkey(1);
+     setTaxkey(2);
+   });
+   -->
+</script>