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 |
|
... | ... | |
81 |
82 |
</a>
|
82 |
83 |
</td>
|
83 |
84 |
|
84 |
|
<td align="right">[% LxERP.format_amount(invoice.invoice_amount-invoice.open_sepa_transfer_amount, 2) %]</td>
|
85 |
|
<td align="right">[% LxERP.format_amount(invoice.open_amount-invoice.open_sepa_transfer_amount, 2) %]</td>
|
|
85 |
<td align="right">[% LxERP.format_amount(invoice.invoice_amount, 2) %]</td>
|
|
86 |
<td align="right">[% LxERP.format_amount(invoice.transfer_amount * -1, 2) %]</td>
|
|
87 |
<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>
|
86 |
88 |
<td align="right">[% invoice.transdate %]</td>
|
87 |
89 |
<td align="right">[% invoice.duedate %]</td>
|
88 |
90 |
<td>
|
... | ... | |
94 |
96 |
<input name="bank_transfers[].reference" value="[% HTML.escape(reference.substr(0, 140)) %]" maxlength="140" size="30">
|
95 |
97 |
</td>
|
96 |
98 |
<td align="right">
|
97 |
|
<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">
|
|
99 |
<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">
|
98 |
100 |
</td>
|
99 |
101 |
<td>
|
100 |
102 |
[% 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' ) %]
|
... | ... | |
147 |
149 |
// alert("found id " + id);
|
148 |
150 |
if ( $(this).val() == "without_skonto" ) {
|
149 |
151 |
$('#' + id).val( $('#invoice_open_amount_' + id).val() );
|
150 |
|
} else if ( $(this).val() == "difference_as_skonto" ) {
|
151 |
|
$('#' + id).val( $('#invoice_open_amount_' + id).val() );
|
152 |
152 |
} else if ( $(this).val() == "with_skonto_pt" ) {
|
153 |
153 |
$('#' + id).val( $('#amount_less_skonto_' + id).val() );
|
154 |
154 |
}
|
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