Debitoren-/Kreditorenbuchungen: bei Zahlungen per Knopfdruck auf Fehlbetrag setzen
authorMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 29 Sep 2015 14:24:59 +0000 (16:24 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 29 Sep 2015 14:43:55 +0000 (16:43 +0200)
templates/webpages/ap/form_header.html
templates/webpages/ar/form_header.html

index 4d81f9d..8fbd9c7 100644 (file)
           <th>[% 'Source' | $T8 %]</th>
           <th>[% 'Memo' | $T8 %]</th>
           <th>[% 'Amount' | $T8 %]</th>
+          <th></th>
           [% IF ( !defaultcurrency || (currency != defaultcurrency) ) %]
             <th>[% 'Exch' | $T8 %]</th>
           [% END %]
               [% END %]
             </td>
 
+            <td>
+              [% IF changeable && loop.last && paid_missing > 0 %]
+                <input type="button" id="ap_set_to_paid_missing" value="[% "Set to paid missing" | $T8 %]">
+              [% END %]
+            </td>
+
             [% IF ( !defaultcurrency || (currency != defaultcurrency) ) %]
               <td align="center">
                 [% temp = "exchangerate_"_ i %]
 </table>
 </div>
 </div>
+
+<script type='text/javascript'>
+ $('#ap_set_to_paid_missing').click(function(){ $('input[name^="paid_"]:last').val('[% LxERP.format_amount(paid_missing, 2) %]') });
+</script>
index 0f58867..ee3aa5c 100644 (file)
          <th>[% 'Source' | $T8 %]</th>
          <th>[% 'Memo' | $T8 %]</th>
          <th>[% 'Amount' | $T8 %]</th>
+         <th></th>
 [%- IF show_exch %]
          <th>[% 'Exch' | $T8 %]</th>
 [%- END %]
          [% row.paid | html %]<input type=hidden name="paid_[% loop.count %]" value="[% row.paid ? LxERP.format_amount(row.paid, 2) : '' | html %]">
   [%- END %]
          </td>
+         <td>
+           [% IF row.changeable && loop.last && paid_missing > 0 %]
+             <input type="button" id="ar_set_to_paid_missing" value="[% "Set to paid missing" | $T8 %]">
+           [% END %]
+         </td>
 [%- IF show_exch %]
          <td align=center>
     [%- IF row.forex || !row.changeable%]
 </table>
 </div>
 </div>
+
+<script type='text/javascript'>
+ $('#ar_set_to_paid_missing').click(function(){ $('input[name^="paid_"]:last').val('[% LxERP.format_amount(paid_missing, 2) %]') });
+</script>