Browse code

Wandle IBAN in GroƟbuchstaben

Bernd Wurst authored on 16/07/2018 12:57:24
Showing 2 changed files
... ...
@@ -51,7 +51,7 @@ if ($_GET['action'] == 'new') {
51 51
     if (empty($_REQUEST['iban'])) {
52 52
         system_failure('Es wurde keine IBAN angegeben.');
53 53
     }
54
-    $iban = str_replace(' ', '', $_REQUEST['iban']);
54
+    $iban = str_replace(' ', '', strtoupper($_REQUEST['iban']));
55 55
     if (! verify_iban($iban)) {
56 56
         system_failure("Die IBAN scheint nicht korrekt zu sein!");
57 57
     }
... ...
@@ -16,8 +16,9 @@ function populate_bankinfo(result) {
16 16
 
17 17
 function searchbank() 
18 18
 {
19
-  var iban = $('#iban').val().replace(/\s/g, '');
19
+  var iban = $('#iban').val().toUpperCase().replace(/\s/g, '');
20 20
   if (iban.substr(0,2) == "DE" && iban.length == 22) {
21
+    $("#iban").val(iban);
21 22
     $("#bankname").prop("disabled", true);
22 23
     $("#bic").prop("disabled", true);
23 24
     $.getJSON("sepamandat_banksearch?iban="+iban, populate_bankinfo)