Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision dda15351

Von Moritz Bunkus vor etwa 8 Jahren hinzugefügt

  • ID dda15351b8be563520d280d1b142754d63fb2a2c
  • Vorgänger 876169ef
  • Nachfolger dc39be66

SEPA: JavaScript-Code in kivi.Sepa.js auslagern

Unterschiede anzeigen:

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