ebc252b093ee9abbc1b26bd8f45abf1177374cc1
[kivitendo-erp.git] / templates / webpages / bank_transactions / _payment_suggestion.html
1 [%- USE P -%][%- USE HTML -%][%- USE LxERP -%]
2 [% SELECT_OPTIONS = invoice.get_payment_select_options_for_bank_transaction(bt_id) %]
3 [% is_skonto_pt   = SELECT_OPTIONS.1.selected %]
4 [% formatted_skonto_amount          = LxERP.format_amount(invoice.skonto_amount, 2) %]
5 [% formatted_skonto_amount_selected = is_skonto_pt ? formatted_skonto_amount : LxERP.format_amount(0, 2) %]
6 <span id="[% HTML.escape(bt_id) %].[% HTML.escape(invoice.id) %]"
7   data-invoice-amount="[% HTML.escape(invoice.open_amount * 1) %]"
8   data-invoice-amount-less-skonto="[% HTML.escape(invoice.amount_less_skonto * 1) %]">
9  [% P.hidden_tag("invoice_ids." _ bt_id _ "[]", invoice.id) %]
10  [% P.hidden_tag("skonto_pt." _ bt_id _ "." _ invoice.id _ "", is_skonto_pt) %]
11  [% LxERP.t8("Invno.") %]: [% HTML.escape(invoice.invnumber) %]</br>
12  [% LxERP.t8("Open amount") %]: [% LxERP.format_amount(invoice.open_amount, 2) %]</br>
13  [% P.select_tag("invoice_skontos." _ bt_id _ "[]", SELECT_OPTIONS, value_key="payment_type", title_key="display", onChange="kivi.BankTransaction.update_skonto(this, " _ bt_id _ ", " _ invoice.id _ ", '$formatted_skonto_amount')"  ) %]</br>
14  [% LxERP.t8("Skonto amount") %]: [% P.input_tag("free_skonto_amount." _ bt_id _ "." _ invoice.id _ "", "$formatted_skonto_amount_selected", default=0, style=style, disabled=1, size=4, class='numeric', onblur="kivi.BankTransaction.update_invoice_amount(" _ bt_id _ ", 0, this)") %]
15  [% P.link_tag("#", "x", onclick="kivi.BankTransaction.delete_invoice(" _ bt_id _ "," _ invoice.id _ ")") %]
16 </span>