<input type="hidden" name="follow_up_trans_type_1" value="sales_invoice">
<input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
<input type="hidden" name="follow_up_rowcount" value="1">
+<input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
[%- INCLUDE 'common/flash.html' %]
[%- INCLUDE 'generic/set_longdescription.html' %]
<span class="plus[% IF is_credit_remaining_negativ %]0[% ELSE %]1[% END %]">[% LxERP.format_amount(creditremaining,0 ,'0') %]</span>
</td>
</tr>
+[%- IF invoice_obj.sepa_exports.as_list.size %]
+ <tr>
+ <th align="right">[% LxERP.t8("SEPA exports") %]</th>
+ <td>
+ [% FOREACH export = invoice_obj.sepa_exports.as_list %]
+ <a href="sepa.pl?action=bank_transfer_edit&vc=vendor&id=[% HTML.url(export.id) %]">[% HTML.escape(export.id) %]</a>
+ [% UNLESS loop.last %], [% END %]
+ [% END %]
+ </td>
+ </tr>
+[%- END %]
[%- IF business %]
<tr>
<th align="right">[% 'Vendor type' | $T8 %]</th>
</tr>
<tr>
<th align="right">[% 'Credit Note Date' | $T8 %]</th>
- <td>[% L.date_tag('invdate', invdate, onChange='set_duedate(this)') %]</td>
+ <td>[% L.date_tag('invdate', invdate) %]</td>
</tr>
[%- ELSE %]
<tr>
</tr>
<tr>
<th align="right">[% 'Invoice Date' | $T8 %]</th>
- <td>[% L.date_tag('invdate', invdate, onChange='set_duedate(this)') %]</td>
+ <td>[% L.date_tag('invdate', invdate, onChange='kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate")') %]</td>
</tr>
<tr>
<th align="right">[% 'Due Date' | $T8 %]</th>
- <td>[% L.date_tag('duedate', duedate) %]</td>
+ <td>
+ <span id="duedate_container"[% IF payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% L.date_tag('duedate', duedate) %]</span>
+ <span id="duedate_fixed"[% IF !payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% HTML.escape(duedate) %]</span>
+ </td>
</tr>
[%- END %]
[% ELSE %]
[% END %]
});
- function set_duedate() {
- setTimeout(function() {
- $.ajax({
- url: 'ir.pl?action=get_duedate_vendor',
- data: {
- invdate: $('#invdate').val(),
- vendor_id: $('input[name="vendor_id"]').val(),
- old_duedate: $('#duedate').val(),
- },
- dataType: 'text',
- success: function (data) { $('#duedate').val(data); }
- })
- }, 0);
- }
//-->
</script>
<input type="hidden" name="webdav" value="[% webdav | html %]">