36 |
36 |
<th class="listheading">[% IF is_vendor %][% 'Vendor' | $T8 %][%- ELSE %][%- LxERP.t8('Customer') %][%- END %]</th>
|
37 |
37 |
<th class="listheading">[% 'Invoice' | $T8 %]</th>
|
38 |
38 |
<th class="listheading" align="right">[% 'Amount' | $T8 %]</th>
|
|
39 |
<th class="listheading" align="right">[% 'SEPA Transfer Amount' | $T8 %]</th>
|
39 |
40 |
<th class="listheading" align="right">[% 'Open amount' | $T8 %]</th>
|
40 |
41 |
<th class="listheading" align="right">[% 'Invoice Date' | $T8 %]</th>
|
41 |
42 |
<th class="listheading" align="right">[% 'Due Date' | $T8 %]</th>
|
... | ... | |
48 |
49 |
[%- FOREACH invoice = INVOICES %]
|
49 |
50 |
<input type="hidden" name="bank_transfers[+].[% arap %]_id" value="[% HTML.escape(invoice.id) %]">
|
50 |
51 |
<input type="hidden" id="amount_less_skonto_[% loop.count %]" name="amount_less_skonto_[% loop.count %]" value="[% LxERP.format_amount(invoice.amount_less_skonto, 2) %]">
|
51 |
|
<input type="hidden" id="invoice_open_amount_[% loop.count %]" name="invoice_open_amount_[% loop.count %]" value="[% LxERP.format_amount(invoice.open_amount - invoice.open_sepa_transfer_amount, 2) %]">
|
|
52 |
<input type="hidden" id="invoice_open_amount_[% loop.count %]" name="invoice_open_amount_[% loop.count %]" value="[% LxERP.format_amount(invoice.open_amount - invoice.transfer_amount, 2) %]">
|
52 |
53 |
<input type="hidden" id="skonto_amount_[% loop.count %]" name="skonto_amount_[% loop.count %]" value="[% LxERP.format_amount(invoice.skonto_amount, 2) %]">
|
53 |
54 |
|
54 |
55 |
|
... | ... | |
86 |
87 |
</a>
|
87 |
88 |
</td>
|
88 |
89 |
|
89 |
|
<td align="right">[% LxERP.format_amount(invoice.invoice_amount-invoice.open_sepa_transfer_amount, 2) %]</td>
|
90 |
|
<td align="right">[% LxERP.format_amount(invoice.open_amount-invoice.open_sepa_transfer_amount, 2) %]</td>
|
|
90 |
<td align="right">[% LxERP.format_amount(invoice.invoice_amount, 2) %]</td>
|
|
91 |
<td align="right">[% LxERP.format_amount(invoice.transfer_amount * -1, 2) %]</td>
|
|
92 |
<td align="right">[% IF invoice.within_skonto_period %] [% LxERP.format_amount(invoice.amount_less_skonto, 2) %] [% ELSE %] [% LxERP.format_amount(invoice.open_amount - invoice.transfer_amount, 2) %][% END %] </td>
|
91 |
93 |
<td align="right">[% invoice.transdate %]</td>
|
92 |
94 |
<td align="right">[% invoice.duedate %]</td>
|
93 |
95 |
<td>
|
... | ... | |
99 |
101 |
<input name="bank_transfers[].reference" value="[% HTML.escape(reference.substr(0, 140)) %]" maxlength="140" size="30">
|
100 |
102 |
</td>
|
101 |
103 |
<td align="right">
|
102 |
|
<input id=[% loop.count %] name="bank_transfers[].amount" id="amount_[% loop.count %]" value="[% LxERP.format_amount(invoice.invoice_amount_suggestion, 2) %]" style="text-align: right" size="12">
|
|
104 |
<input id=[% loop.count %] name="bank_transfers[].amount" id="amount_[% loop.count %]" value="[% IF invoice.within_skonto_period %] [% LxERP.format_amount(invoice.amount_less_skonto, 2) %] [% ELSE %] [% LxERP.format_amount(invoice.open_amount - invoice.transfer_amount, 2) %][% END %]" style="text-align: right" size="12">
|
103 |
105 |
</td>
|
104 |
106 |
<td>
|
105 |
107 |
[% L.select_tag('bank_transfers[].payment_type', invoice.payment_select_options, value_key => 'payment_type', title_key => 'display', id => 'payment_type_' _ loop.count, class => 'type_target' ) %]
|
... | ... | |
159 |
161 |
// alert("found id " + id);
|
160 |
162 |
if ( $(this).val() == "without_skonto" ) {
|
161 |
163 |
$('#' + id).val( $('#invoice_open_amount_' + id).val() );
|
162 |
|
} else if ( $(this).val() == "difference_as_skonto" ) {
|
163 |
|
$('#' + id).val( $('#invoice_open_amount_' + id).val() );
|
164 |
164 |
} else if ( $(this).val() == "with_skonto_pt" ) {
|
165 |
165 |
$('#' + id).val( $('#amount_less_skonto_' + id).val() );
|
166 |
166 |
}
|
SEPA: within_skonto_period direkt aus SQL Abfrage und keine Helper-Funktionen
- transfer_amount aus sql ist identisch mit open_sepa_transfer_amount
- SEPA Transfer Amount in Template auch als Wert angeben