Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 7ef224c0

Von Cem Aydin vor 8 Monaten hinzugefügt

  • ID 7ef224c09c2c46f0790153e6ec9c934f8bb9e232
  • Vorgänger be93d983
  • Nachfolger f1ad3371

Schweizer Banküberweisung via XML: IBAN von QR-Rechnungen zur Überprüfung der Kontoinformationen anzeigen

Unterschiede anzeigen:

bin/mozilla/sepa.pl
273 273
  my %unique_vendor_types;
274 274
  for my $bt (@$bank_transfers) {
275 275
    my $uid = "$bt->{vc_id}_$bt->{type}";
276

  
277
    # if qr-bill get iban from qr-bill data to display in vendor account information,
278
    # important for manual verification
279
    my $qr_iban;
280
    if ($bt->{type} eq 'QRBILL') {
281
      my $qr_bill_data = SL::Helper::QrBillParser->new($bt->{qrbill_data});
282
      $qr_iban = $qr_bill_data->{creditor_information}->{iban};
283
    }
284

  
276 285
    $unique_vendor_types{$uid} = {
277 286
      vc_id => $bt->{vc_id},
278
      type => $bt->{type}
287
      type => $bt->{type},
288
      qr_iban => $qr_iban,
279 289
    } unless defined $unique_vendor_types{$uid};
280 290
  }
281 291

  
......
287 297
  # combine bank info with unique vendor types
288 298
  for my $unique_vendor (values %unique_vendor_types) {
289 299
    $vendors->{$unique_vendor->{vc_id}}->{type} = $unique_vendor->{type};
300
    if ($unique_vendor->{type} eq 'QRBILL') {
301
      $vendors->{$unique_vendor->{vc_id}}->{qr_iban} = $unique_vendor->{qr_iban};
302
    }
290 303
  }
291 304

  
292 305
  # validate bank info for unique vendor types
templates/design40_webpages/sepa/bank_transfer_create.html
75 75
          [% L.hidden_tag('vc_bank_info[+].id', vbi.id) %]
76 76
          [% L.hidden_tag('vc_bank_info[].type', vbi.type) %]
77 77
          [% IF vbi.type == 'QRBILL' %]
78
            [% L.hidden_tag('vc_bank_info[].name', vbi.name) %]
78
            <td>
79
              [% HTML.escape(vbi.name) %]
80
              [% L.hidden_tag('vc_bank_info[].name', vbi.name) %]
81
            </td>
82
            <td>[% HTML.escape(vbi.qr_iban) %]</td>
83
            <td>-</td>
79 84
          [% ELSIF vbi.type == 'DOMESTIC' %]
80 85
            <td>
81 86
              [% HTML.escape(vbi.name) %]
82 87
              [% L.hidden_tag('vc_bank_info[].name', vbi.name) %]
83 88
            </td>
84 89
            <td>[% L.input_tag('vc_bank_info[].iban', vbi.iban) %]</td>
90
            <td>-</td>
85 91
          [% ELSE %]
86 92
            <td>
87 93
              [% HTML.escape(vbi.name) %]
templates/webpages/sepa/bank_transfer_create.html
75 75
        [% L.hidden_tag('vc_bank_info[+].id', vbi.id) %]
76 76
        [% L.hidden_tag('vc_bank_info[].type', vbi.type) %]
77 77
        [%- IF vbi.type == 'QRBILL' %]
78
          [% L.hidden_tag('vc_bank_info[].name', vbi.name) %]
78
          <td>
79
            [% HTML.escape(vbi.name) %]
80
            [% L.hidden_tag('vc_bank_info[].name', vbi.name) %]
81
          </td>
82
          <td>[% HTML.escape(vbi.qr_iban) %]</td>
83
          <td>-</td>
79 84
        [%- ELSIF vbi.type == 'DOMESTIC' %]
80 85
          <td>
81 86
            [% HTML.escape(vbi.name) %]
82 87
            [% L.hidden_tag('vc_bank_info[].name', vbi.name) %]
83 88
          </td>
84 89
          <td>[% L.input_tag('vc_bank_info[].iban', vbi.iban) %]</td>
90
          <td>-</td>
85 91
        [%- ELSE %]
86 92
          <td>
87 93
            [% HTML.escape(vbi.name) %]

Auch abrufbar als: Unified diff