Repaired calculation display of formula in goods and services.
authorUdo Spallek <info@wissensvermittlung.com>
Thu, 23 Nov 2006 07:26:46 +0000 (07:26 +0000)
committerUdo Spallek <info@wissensvermittlung.com>
Thu, 23 Nov 2006 07:26:46 +0000 (07:26 +0000)
locale/de need to be fixed...

bin/mozilla/ic.pl
bin/mozilla/io.pl
templates/webpages/generic/calculate_qty_de.html
templates/webpages/generic/calculate_qty_master.html

index 51be87c..d190a48 100644 (file)
@@ -2494,7 +2494,6 @@ sub form_header {
 
   $formel =
     qq|<ilayer><layer  onmouseover="this.T_STICKY=true;this.T_STATIC=true;return escape('| . $locale->text('The formula needs the following syntax:<br>For regular article:<br>Variablename= Variable Unit;<br>Variablename2= Variable2 Unit2;<br>...<br>###<br>Variable + ( Variable2 / Variable )<br><b>Please be beware of the spaces in the formula</b><br><br>For alu article:<br>Length:<br>Weight/m:<br>Length ist total length of article and weight/m ist the weight pro meter') . qq|')"><textarea name=formel rows=4 cols=60 wrap=soft>$form->{formel}</textarea></layer><ilayer>|;
-  $formel = "";
     $imagelinks = qq|
   <tr>
     <td>
@@ -2634,11 +2633,15 @@ sub form_header {
               </td>
               <tr>
                 <th align="left">| . $locale->text('Notes') . qq|</th>
+                <th align="left">| . $locale->text('Formula') . qq|</th>
               </tr>
               <tr>
                 <td>
                   $notes
                 </td>
+                <td>
+                  $formel
+                </td>
               </tr>
               <tr>
                 <td colspan=2>
index b71ca90..3cb1e82 100644 (file)
@@ -300,7 +300,7 @@ sub display_row {
     $column_data{qty} =
         qq|<td align=right><input name="qty_$i" size=5 value=|
       . $form->format_amount(\%myconfig, $form->{"qty_$i"}, $qty_dec) .qq|>|;
-    if ($form->{formel}) {
+    if ($form->{"formel_$i"}) {
     $column_data{qty} .= qq|<button type="button" onclick="calculate_qty_selection_window('qty_$i','alu_$i', 'formel_$i', $i)">| . $locale->text('*/') . qq|</button>
           <input type=hidden name="formel_$i" value="$form->{"formel_$i"}"><input type=hidden name="alu_$i" value="$form->{"alu_$i"}"></td>|;
     }
index a5e110a..c87570e 100644 (file)
@@ -38,7 +38,7 @@
  </form>
 
  <script type="text/javascript">
-  //<!--
+  <!--//
       function calculate_qty() {
         <TMPL_LOOP NAME=VARIABLES>
         var <TMPL_VAR NAME=name> = document.getElementsByName("<TMPL_VAR NAME=name>")[0].value.replace(/,/g, ".");
index e2149ff..fd20af3 100644 (file)
@@ -38,7 +38,7 @@
  </form>
 
  <script type="text/javascript">
-  //<!--
+  <!--//
       function calculate_qty() {
         <TMPL_LOOP NAME=VARIABLES>
         var <TMPL_VAR NAME=name> = document.getElementsByName("<TMPL_VAR NAME=name>")[0].value.replace(/,/g, ".");