[% USE LxERP %]
[% USE T8 %]
-[% USE L %]
+[% 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) %]
<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 %]">
+ [% P.hidden_tag('draft_id', draft_id) %]
+ [% P.hidden_tag('draft_description', draft_description) %]
<br>
[% 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>