]> wagnertech.de Git - mfinanz.git/blobdiff - templates/webpages/ar/form_footer.html
Banktransaction: Kontoauszug verbuchen überarbeitet(4)
[mfinanz.git] / templates / webpages / ar / form_footer.html
index 9927cc8529bfaacd2c1942a06238c520b4173da2..70864955bf7638b781e8aa82cbf0943cdcf9838e 100644 (file)
@@ -1,5 +1,6 @@
 [% USE LxERP %]
 [% USE T8 %]
+[% USE L %][%- USE P -%]
 
   [% IF ( follow_up_length && follow_up_due_length ) %]
     [% LxERP.t8('There are #1 unfinished follow-ups of which #2 are due.', follow_up_length , follow_up_due_length) %]
@@ -7,15 +8,8 @@
 
   <input type="hidden" name="gldate" value="[% gldate | html %]">
   <input type="hidden" name="callback" value="[% callback | html %]">
-  <input type="hidden" name="draft_id" value="[% draft_id | html %]">
-  <input type="hidden" name="draft_description" value="[% draft_description | html %]">
-
-  <br>
-
-  [% IF ( !id && draft_id ) %]
-    <input type="checkbox" name="remove_draft" id="remove_draft" value="1" [% IF ( remove_draft ) %]checked[% END %]>
-    <label for="remove_draft">[% 'Remove draft when posting' | $T8 %]</label>
-  [% END %]
+  [% P.hidden_tag('draft_id', draft_id) %]
+  [% P.hidden_tag('draft_description', draft_description) %]
 
   <br>
 
   [% ELSE %]
     [% IF ( !is_closed ) %]
       <input class="submit" type="submit" name="action" value="[% 'Post' | $T8 %]">
-      <input class="submit" type="submit" name="action" value="[% 'Save draft' | $T8 %]">
+      [% L.button_tag('kivi.Draft.popup("ar", "invoice", "' _ draft_id _ '", "' _ draft_description _ '")', LxERP.t8('Drafts')) %]
     [% END %]
   [% END %]
 
   [% IF ( show_mark_as_paid_button ) %]
-    <input type="submit" class="submit" name="action" value="[% 'mark as paid' | $T8 %]">
+    [% L.submit_tag("action", LxERP.t8('mark as paid'), confirm=LxERP.t8('This will remove the invoice from showing as unpaid even if the unpaid amount does not match the amount. Proceed?')) %]
   [% END %]
 
+  [% L.button_tag("kivi.RecordTemplate.popup('ar_transaction')", LxERP.t8("Record templates")) %]
+
 </form>
+
+<script type="text/javascript">
+ <!--
+$(document).ready(function() {
+  [%- SET row=0 %]
+  [%- WHILE row < rowcount %]
+   [%- SET row=row + 1 %]
+   $('#AR_amount_chart_id_[% row %]').on('set_item:ChartPicker', function(e, item) {
+     kivi.GL.update_taxes(this);
+   });
+  [%- END %]
+});
+-->
+</script>