Bug 639 behoben (Checkbox taxincluded hat sich bei Erneuern klicken deaktiviert)
authorThomas Kasulke <t.kasulke@linet-services.de>
Fri, 4 May 2007 09:07:11 +0000 (09:07 +0000)
committerThomas Kasulke <t.kasulke@linet-services.de>
Fri, 4 May 2007 09:07:11 +0000 (09:07 +0000)
bin/mozilla/is.pl

index 9140574..0b4c0e5 100644 (file)
@@ -38,7 +38,7 @@ use Data::Dumper;
 require "bin/mozilla/io.pl";
 require "bin/mozilla/arap.pl";
 require "bin/mozilla/drafts.pl";
-
+$form->{"Watchdog::taxincluded"} = 1;
 1;
 
 # end of main
@@ -845,13 +845,13 @@ sub form_footer {
     qq|<textarea name="notes" rows="$rows" cols="26" wrap="soft">$form->{notes}</textarea>|;
   $intnotes =
     qq|<textarea name="intnotes" rows="$rows" cols="35" wrap="soft">$form->{intnotes}</textarea>|;
-
-  $form->{taxincluded} = ($form->{taxincluded}) ? "checked" : "";
+  $form->{taxincluded} = ($form->{taxincluded} == 1 ? "checked" : "");
 
   $taxincluded = "";
   if ($form->{taxaccounts}) {
     $taxincluded = qq|
-               <input name="taxincluded" class="checkbox" type="checkbox" value=$form->{taxincluded}> <b>|
+               <input name="taxincluded" class="checkbox" type="checkbox" value="1" $form->{taxincluded}> <b>|
       . $locale->text('Tax Included') . qq|</b><br><br>|;
   }
 
@@ -1208,10 +1208,19 @@ sub update {
     $form->{print_and_post} = 0;
   }
 
+  
+  if($form->{taxincluded}) {
+    $taxincluded = "checked";
+  }
   $form->{update} = 1;
 
   &check_name(customer);
 
+  if(!$form->{taxincluded}) {
+    $form->{taxincluded} = $taxincluded;
+  }
+
+
   $form->{exchangerate} = $exchangerate
     if (
         $form->{forex} = (