fd58bd7a7fc8536a7b438ac16cea59113116af18
Bernd Wurst JS-Code in separate Datei a...

Bernd Wurst authored 6 years ago

1) function populate_bankinfo(result) {
2)   bank = result[0];
3)   if (bank.iban_ok == 1) {
4)     $("#iban_feedback").html('<img src="../../images/ok.png" style="height: 16px; width: 16px;" alt="" title="" />');
5)     if ($('#bankname').val() == "") 
6)       $('#bankname').val(bank.bankname);
7)     if ($('#bic').val() == "")  
8)       $('#bic').val(bank.bic);
9)   } else {
10)     $("#iban_feedback").html('<img src="../../images/error.png" style="height: 16px; width: 16px;" alt="IBAN scheint nicht gültig zu sein" title="IBAN scheint nicht gültig zu sein" />');
11)     $('#bankname').val("");
12)     $('#bic').val("");
13)   }
14)     
15) }
16) 
17) function searchbank() 
18) {
Bernd Wurst Wandle IBAN in Großbuchstaben

Bernd Wurst authored 5 years ago

19)   var iban = $('#iban').val().toUpperCase().replace(/\s/g, '');
Bernd Wurst JS-Code in separate Datei a...

Bernd Wurst authored 6 years ago

20)   if (iban.substr(0,2) == "DE" && iban.length == 22) {
Bernd Wurst Wandle IBAN in Großbuchstaben

Bernd Wurst authored 5 years ago

21)     $("#iban").val(iban);
Bernd Wurst JS-Code in separate Datei a...

Bernd Wurst authored 6 years ago

22)     $("#bankname").prop("disabled", true);
23)     $("#bic").prop("disabled", true);
24)     $.getJSON("sepamandat_banksearch?iban="+iban, populate_bankinfo)
25)       .always( function() {
26)         $("#bankname").prop("disabled", false);
27)         $("#bic").prop("disabled", false);
28)       });
29)   } else {
30)     $("#iban_feedback").html("");
31)   }
32) }
33) 
34) function copydata_worker( result ) {
35)   $("#kontoinhaber").val(result.kundenname);
36)   $("#adresse").val(result.adresse);
37) }
38) 
39) function copydata( event ) {
40)   event.preventDefault();
41)   var kunde = $.getJSON("sepamandat_copydata", copydata_worker);
42) }
43) 
44) function populate_iban(result) {
45)   info = result[0];
46)   $("#iban").val(info.iban);
47)   populate_bankinfo(result)
48) }
49) 
50) function ktoblz( event ) {
51)   event.preventDefault();
52)   var kto = $("#kto").val();
53)   var blz = $("#blz").val();
54)   $.getJSON("sepamandat_banksearch?kto="+kto+"&blz="+blz, populate_iban)
55) }
56) 
57) function showktoblz( event ) {
58)   event.preventDefault();
59)   $("#ktoblz_button").hide();
60)   $("#ktoblz_input").show();
61) }
62) 
63) 
Bernd Wurst change checkbox when date s...

Bernd Wurst authored 1 year ago

64) // Define a convenience method and use it
65) var ready = (callback) => {
66)   if (document.readyState != "loading") callback();
67)   else document.addEventListener("DOMContentLoaded", callback);
68) }
69) 
70) ready(() => { 
71)   /* Do things after DOM has fully loaded */ 
72) 
73)     document.querySelector("#gueltig_ab_datum").addEventListener("change", (e) => {
74)         document.querySelector("#gueltig_ab_auswahl").checked = true;
75)         })
76) });
77) 
78)