3 [% USE L %][%- USE P -%]
5 [% IF ( follow_up_length && follow_up_due_length ) %]
6 [% LxERP.t8('There are #1 unfinished follow-ups of which #2 are due.', follow_up_length , follow_up_due_length) %]
9 <input type="hidden" name="gldate" value="[% gldate | html %]">
10 <input type="hidden" name="callback" value="[% callback | html %]">
11 [% P.hidden_tag('draft_id', draft_id) %]
12 [% P.hidden_tag('draft_description', draft_description) %]
16 <input class="submit" type="submit" name="action" id="update_button" value="[% 'Update' | $T8 %]">
18 [% IF ( show_storno_button ) %]
19 <input class="submit" type="submit" name="action" value="[% 'Storno' | $T8 %]">
24 <input class="submit" type="submit" name="action" value="[% 'Post' | $T8 %]">
25 <input class="submit" type="submit" name="action" value="[% 'Delete' | $T8 %]">
28 [% IF ( !is_closed ) %]
29 <input class="submit" type="submit" name="action" value="[% 'Use As New' | $T8 %]">
32 <input class="submit" type="submit" name="action" value="[% 'Post Payment' | $T8 %]">
33 <input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
34 <input type="button" class="submit" onclick="set_history_window([% id %], 'glid');" name="history" id="history" value="[% 'history' | $T8 %]">
36 [% IF ( !is_closed ) %]
37 <input class="submit" type="submit" name="action" value="[% 'Post' | $T8 %]">
38 [% L.button_tag('kivi.Draft.popup("ar", "invoice", "' _ draft_id _ '", "' _ draft_description _ '")', LxERP.t8('Drafts')) %]
42 [% IF ( show_mark_as_paid_button ) %]
43 [% 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?')) %]
46 [% L.button_tag("kivi.RecordTemplate.popup('ar_transaction')", LxERP.t8("Record templates")) %]
50 <script type="text/javascript">
52 $(document).ready(function() {
54 [%- WHILE row < rowcount %]
55 [%- SET row=row + 1 %]
56 $('#AR_amount_chart_id_[% row %]').on('set_item:ChartPicker', function(e, item) {
57 kivi.GL.update_taxes(this);