Revision dda15351
Von Moritz Bunkus vor etwa 8 Jahren hinzugefügt
bin/mozilla/sepa.pl | ||
---|---|---|
$invoice->{reference_prefix_vc} = ' ' . $prefix_vc_number unless $prefix_vc_number =~ m/^ /;
|
||
}
|
||
|
||
$::request->layout->use_javascript('js/kivi.Sepa.js');
|
||
|
||
$form->header();
|
||
print $form->parse_html_template('sepa/bank_transfer_add',
|
||
{ 'INVOICES' => $invoices,
|
js/kivi.Sepa.js | ||
---|---|---|
namespace('kivi.Sepa', function(ns) {
|
||
this.paymentTypeChanged = function() {
|
||
var type_id = $(this).attr('id');
|
||
var id = type_id.match(/\d*$/);
|
||
|
||
// console.log("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() );
|
||
};
|
||
|
||
this.initBankTransferAdd = function(vc) {
|
||
$("#select_all").checkall('INPUT[name="bank_transfers[].selected"]');
|
||
$(".type_target").change(kivi.Sepa.paymentTypeChanged);
|
||
};
|
||
});
|
Auch abrufbar als: Unified diff
SEPA: JavaScript-Code in kivi.Sepa.js auslagern