Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0e36c22a

Von Moritz Bunkus vor fast 11 Jahren hinzugefügt

  • ID 0e36c22a2610966d3c83957426d0c91b25c65da3
  • Vorgänger b1ed0099
  • Nachfolger b021f0f5

SEPA: Feld »Signaturdatum«; Bearbeiten der Felder in Stammdatenmasken; Speichern in sepa_export_items

Unterschiede anzeigen:

bin/mozilla/sepa.pl
110 110
  my ($vc_bank_info);
111 111
  my $error_message;
112 112

  
113
  my @bank_columns    = qw(iban bic);
114
  push @bank_columns, qw(mandator_id mandate_date_of_signature) if $vc eq 'customer';
115

  
113 116
  if ($form->{confirmation}) {
114 117
    $vc_bank_info = { map { $_->{id} => $_ } @{ $form->{vc_bank_info} || [] } };
115 118

  
116 119
    foreach my $info (values %{ $vc_bank_info }) {
117
      if (any { !$info->{$_} } qw(iban bic)) {
120
      if (any { !$info->{$_} } @bank_columns) {
118 121
        $error_message = $locale->text('The bank information must not be empty.');
119 122
        last;
120 123
      }
......
143 146

  
144 147
  } else {
145 148
    foreach my $bank_transfer (@bank_transfers) {
146
      foreach (qw(iban bic)) {
149
      foreach (@bank_columns) {
147 150
        $bank_transfer->{"vc_${_}"}  = $vc_bank_info->{ $bank_transfer->{vc_id} }->{$_};
148 151
        $bank_transfer->{"our_${_}"} = $bank_account->{$_};
149 152
      }
......
506 509
      my ($yy, $mm, $dd)      = $locale->parse_date($myconfig, $item->{reference_date});
507 510
      $item->{reference_date} = sprintf '%04d-%02d-%02d', $yy, $mm, $dd;
508 511
      $mandator_id = $item->{mandator_id};
512
      if ($item->{mandate_date_of_signature}) {
513
        ($yy, $mm, $dd)                    = $locale->parse_date($myconfig, $item->{mandate_date_of_signature});
514
        $item->{mandate_date_of_signature} = sprintf '%04d-%02d-%02d', $yy, $mm, $dd;
515
      }
509 516
    }
510 517

  
511 518
    $sepa_xml->add_transaction({ 'src_iban'       => $item->{our_iban},
......
519 526
                                 'mandator_id'    => $mandator_id,
520 527
                                 'reference_date' => $item->{reference_date},
521 528
                                 'execution_date' => $requested_execution_date,
522
                                 'end_to_end_id'  => $item->{end_to_end_id} });
529
                                 'end_to_end_id'  => $item->{end_to_end_id},
530
                                 'date_of_signature' => $item->{mandate_date_of_signature}, });
523 531
  }
524 532

  
525 533
  my $xml = $sepa_xml->to_xml();

Auch abrufbar als: Unified diff