X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fsepa%2Fbank_transfer_add.html;h=593a022ea439ca690d15e6cc6776b58c5d6c213c;hb=78bf6632c3216a3e1a0bf172c5c81fe30f2c402f;hp=4ae82d12d45e21f151b721698659cbc2d755493b;hpb=b021f0f5808d9a3b02ddc7f13c206ebc88387ff1;p=kivitendo-erp.git diff --git a/templates/webpages/sepa/bank_transfer_add.html b/templates/webpages/sepa/bank_transfer_add.html index 4ae82d12d..593a022ea 100644 --- a/templates/webpages/sepa/bank_transfer_add.html +++ b/templates/webpages/sepa/bank_transfer_add.html @@ -1,4 +1,5 @@ [%- USE T8 %] +[%- USE L %] [% USE HTML %][% USE LxERP %] [% IF vc == 'vendor' %] [% SET is_vendor = 1 %] @@ -20,12 +21,12 @@ [% 'Please select the destination bank account for the collections:' | $T8 %] [%- END %]
- [%- INCLUDE generic/multibox.html - name = 'bank_account.id', - DATA = BANK_ACCOUNTS, - id_key = 'id', - label_sub = 'bank_account_label', - -%] + [% L.select_tag('bank_account', + BANK_ACCOUNTS, + title_key='displayable_name', + with_empty=0, + style='width:450px', + ) %]

@@ -36,13 +37,20 @@ [% 'Invoice' | $T8 %] [% 'Amount' | $T8 %] [% 'Open amount' | $T8 %] + [% 'Invoice Date' | $T8 %] [% 'Due Date' | $T8 %] [% 'Purpose' | $T8 %] [% 'Bank transfer amount' | $T8 %] + [% 'Payment type' | $T8 %] + [% 'Skonto information' | $T8 %] [%- FOREACH invoice = INVOICES %] + + + + @@ -69,16 +77,21 @@ - [% LxERP.format_amount(invoice.invoice_amount, -2) %] - [% LxERP.format_amount(invoice.open_amount, -2) %] + [% LxERP.format_amount(invoice.invoice_amount-invoice.open_sepa_transfer_amount, 2) %] + [% LxERP.format_amount(invoice.open_amount-invoice.open_sepa_transfer_amount, 2) %] + [% invoice.transdate %] [% invoice.duedate %] [%- SET reference = invoice.reference_prefix _ invoice.invnumber %] - + - + + + + [% 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' ) %] + [%- IF invoice.skonto_amount %] [% LxERP.format_amount(invoice.percent_skonto, 2) %] % = [% LxERP.format_amount(invoice.skonto_amount, 2) %] € bis [% invoice.skonto_date %] [%- END %] [%- END %] @@ -111,4 +124,18 @@ $("#select_all").checkall('INPUT[name="bank_transfers[].selected"]'); }); --> + +$( ".type_target" ).change(function() { + type_id = $(this).attr('id'); + var id = type_id.match(/\d*$/); + // alert("found id " + id); + if ( $(this).val() == "without_skonto" ) { + $('#' + id).val( $('#invoice_open_amount_' + id).val() ); + } else if ( $(this).val() == "difference_as_skonto" ) { + $('#' + id).val( $('#invoice_open_amount_' + id).val() ); + } else if ( $(this).val() == "with_skonto_pt" ) { + $('#' + id).val( $('#amount_less_skonto_' + id).val() ); + } +}); +