Merge branch 'gifi'
[kivitendo-erp.git] / templates / webpages / ir / _payments.html
index 51a1fdd..cb40886 100644 (file)
@@ -1,5 +1,6 @@
 [%- USE T8 %]
 [%- USE LxERP %]
+[%- USE L %]
   <tr>
    <td>
     <table width="100%">
@@ -42,8 +43,7 @@
 
     <td align="center">
     [% IF $changeable %]
-      <input id="datepaid_[% i %]" name="datepaid_[% i %]" size="11" title="[% dateformat %]" value="[% $datepaid %]">
-      <input type="button" name="datepaid_[% i %]" id="trigger_datepaid_[% i %]" value="?">
+      [% L.date_tag('datepaid_'_ i, $datepaid) %]
     [% ELSE %]
       <input type="hidden" name="datepaid_[% i %]" value="[% $datepaid %]">[% $datepaid %]
     [% END %]
@@ -75,9 +75,9 @@
      <td align="center">
   [% SET forex        = 'forex_'        _ i %]
   [% SET exchangerate = 'exchangerate_' _ i %]
-  [% IF forex %]
+  [% IF $forex %]
         <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 2) %]">
-        [% LxERP.format_amount(exchangerate, 2) %]
+        [% LxERP.format_amount($forex, 2) %]
   [% ELSE %]
      [% IF $changeable %]
         <input name="exchangerate_[% i %]" size="10" value="[% LxERP.format_amount($exchangerate, 2, 1) %]">
@@ -86,7 +86,7 @@
         [% LxERP.format_amount($exchangerate, 2, 1) %]
      [% END %]
   [% END %]
-        <input type="hidden" name="forex_[% i %]" value="[% $forex %]">;
+        <input type="hidden" name="forex_[% i %]" value="[% $forex %]">
      </td>
 [% END %]
 
      </td>
 
     </tr>
-  [% IF $changeable %]
-    <script type='text/javascript'>
-     Calendar.setup({ inputField : "datepaid_[% i %]", ifFormat :"[% myconfig_jsc_dateformat %]", align : "TR", button : "trigger_datepaid_[% i %]" });
-     $('input[name="paid_[% i %]"]').blur(function(){ check_right_number_format(this) });
-     $('#datepaid_[% i %]').blur(function(){ check_right_date_format(this) });
-    </script>
-  [% END %]
 
 [% END # foreach %]