Revision dda15351
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
bin/mozilla/sepa.pl | ||
---|---|---|
68 | 68 |
$invoice->{reference_prefix_vc} = ' ' . $prefix_vc_number unless $prefix_vc_number =~ m/^ /; |
69 | 69 |
} |
70 | 70 |
|
71 |
$::request->layout->use_javascript('js/kivi.Sepa.js'); |
|
72 |
|
|
71 | 73 |
$form->header(); |
72 | 74 |
print $form->parse_html_template('sepa/bank_transfer_add', |
73 | 75 |
{ 'INVOICES' => $invoices, |
js/kivi.Sepa.js | ||
---|---|---|
1 |
namespace('kivi.Sepa', function(ns) { |
|
2 |
this.paymentTypeChanged = function() { |
|
3 |
var type_id = $(this).attr('id'); |
|
4 |
var id = type_id.match(/\d*$/); |
|
5 |
|
|
6 |
// console.log("found id " + id); |
|
7 |
|
|
8 |
if ( $(this).val() == "without_skonto" ) |
|
9 |
$('#' + id).val( $('#invoice_open_amount_' + id).val() ); |
|
10 |
|
|
11 |
else if ( $(this).val() == "difference_as_skonto" ) |
|
12 |
$('#' + id).val( $('#invoice_open_amount_' + id).val() ); |
|
13 |
|
|
14 |
else if ( $(this).val() == "with_skonto_pt" ) |
|
15 |
$('#' + id).val( $('#amount_less_skonto_' + id).val() ); |
|
16 |
}; |
|
17 |
|
|
18 |
this.initBankTransferAdd = function(vc) { |
|
19 |
$("#select_all").checkall('INPUT[name="bank_transfers[].selected"]'); |
|
20 |
$(".type_target").change(kivi.Sepa.paymentTypeChanged); |
|
21 |
}; |
|
22 |
}); |
Auch abrufbar als: Unified diff
SEPA: JavaScript-Code in kivi.Sepa.js auslagern