Alle Rechnungen: »als bezahlt markieren« auf neue Funktionen in SL::DB::(Purchase...
[kivitendo-erp.git] / templates / webpages / ap / form_footer.html
index 2408d52..0d948d2 100644 (file)
@@ -4,7 +4,7 @@
 [%- USE LxERP %]
 
 [%- IF (num_follow_ups && num_due) %]
-  <p>[% 'There are #1 unfinished follow-ups of which #2 are due.' | $T8(num_follow_ups, num_due) %]</p>
+  <p>[% LxERP.t8('There are #1 unfinished follow-ups of which #2 are due.', num_follow_ups, num_due) %]</p>
 [%- END %]
 
 <input name=callback type=hidden value="[% callback | html %]">
 <input type=hidden name=draft_id value="[% draft_id %]">
 <input type=hidden name=draft_description value="[% draft_description | html %]">
 
-[%- IF ( !id && draft_id ) %]
-  [% L.checkbox_tag('remove_draft', checked=remove_draft, label=LxERP.t8('Remove draft when posting')) %]
-  <br>
-[%- END %]
-
 <br>
 
 <input class="submit" type="submit" name="action" id="update_button" value="[% 'Update' | $T8 %]">
   [%- END %]
 
   <input class=submit type=submit name=action value="[% 'Post Payment' | $T8 %]">
-  <input class=submit type=submit name=action value="[% 'Use As Template' | $T8 %]">
+  <input class=submit type=submit name=action value="[% 'Use As New' | $T8 %]">
   <input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
 
 [%- ELSIF show_post_draft %]
     <input class=submit type=submit name=action value="[% 'Post' | $T8 %]">
-    <input type="submit" name="action" value="[% 'Save draft' | $T8 %]" class="submit">
+    [% L.button_tag('kivi.Draft.popup("ap", "invoice", "' _ draft_id _ '", "' _ draft_description _ '")', LxERP.t8('Drafts')) %]
 [%- END %]
 
 [%- IF id %]
-  <input type="submit" onclick="set_history_window([% id %]);" name="history" id="history" value="[% 'history' | $T8 %]">
+  <input type=button class=submit onclick="set_history_window([% id %], 'glid');" name="history" id="history" value="[% 'history' | $T8 %]">
   [% IF INSTANCE_CONF.get_ap_show_mark_as_paid %]
-    <input type="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 %]
 [%- END %]
 
 </form>
 
 <script type="text/javascript">
-<!--
-function set_duedate() {
-   $.ajax({
-     url: 'is.pl?action=set_duedate',
-     data: {
-       invdate: $('#transdate').val(),
-       vendor_id: $('[name=vendor_id]').val(),
-     },
-     dataType: 'text',
-     success: function(data) {
-       $('#duedate').val(data);
-     }
+ <!--
+$(document).ready(function() {
+  [%- SET row=0 %]
+  [%- WHILE row < rowcount %]
+   [%- SET row=row + 1 %]
+   $('#AP_amount_chart_id_[% row %]').on('set_item:ChartPicker', function(e, item) {
+     kivi.GL.update_taxes(this);
    });
- }
-//-->
+  [%- END %]
+});
+-->
 </script>
-
-