Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0ce1b04e

Von Jan Büren vor mehr als 15 Jahren hinzugefügt

  • ID 0ce1b04e2a9bbd52692e118debb272e628f327f4
  • Vorgänger 4ce81208
  • Nachfolger 7cb88587

Erweiterung der Kundenmaske um IBAN und BIC - Patch aus xplace Projekt

Unterschiede anzeigen:

SL/CT.pm
306 306
    qq|account_number = ?, | .
307 307
    qq|bank_code = ?, | .
308 308
    qq|bank = ?, | .
309
    qq|iban = ?, | .
310
    qq|bic = ?, | .
309 311
    qq|obsolete = ?, | .
310 312
    qq|direct_debit = ?, | .
311 313
    qq|ustid = ?, | .
......
345 347
    $form->{account_number},
346 348
    $form->{bank_code},
347 349
    $form->{bank},
350
    $form->{iban},
351
    $form->{bic},
348 352
    $form->{obsolete} ? 't' : 'f',
349 353
    $form->{direct_debit} ? 't' : 'f',
350 354
    $form->{ustid},
......
511 515
    qq|  account_number = ?, | .
512 516
    qq|  bank_code = ?, | .
513 517
    qq|  bank = ?, | .
518
    qq|  iban = ?, | .
519
    qq|  bic = ?, | .
514 520
    qq|  obsolete = ?, | .
515 521
    qq|  direct_debit = ?, | .
516 522
    qq|  ustid = ?, | .
......
548 554
    $form->{account_number},
549 555
    $form->{bank_code},
550 556
    $form->{bank},
557
    $form->{iban},
558
    $form->{bic},
551 559
    $form->{obsolete} ? 't' : 'f',
552 560
    $form->{direct_debit} ? 't' : 'f',
553 561
    $form->{ustid},
......
1057 1065
  $main::lxdebug->leave_sub();
1058 1066
}
1059 1067

  
1068
sub get_bank_info {
1069
  $main::lxdebug->enter_sub();
1070

  
1071
  my $self     = shift;
1072
  my %params   = @_;
1073

  
1074
  Common::check_params(\%params, qw(vc id));
1075

  
1076
  my $myconfig = \%main::myconfig;
1077
  my $form     = $main::form;
1078

  
1079
  my $dbh      = $params{dbh} || $form->get_standard_dbh($myconfig);
1080

  
1081
  my $table        = $params{vc} eq 'customer' ? 'customer' : 'vendor';
1082
  my @ids          = ref $params{id} eq 'ARRAY' ? @{ $params{id} } : ($params{id});
1083
  my $placeholders = ('?') x scalar @ids;
1084
  my $query        = qq|SELECT id, name, account_number, bank, bank_code, iban, bic
1085
                        FROM ${table}
1086
                        WHERE id IN (${placeholders})|;
1087

  
1088
  my $result       = selectall_hashref_query($form, $dbh, $query, map { conv_i($_) } @ids);
1089

  
1090
  if (ref $params{id} eq 'ARRAY') {
1091
    $result = { map { $_->{id} => $_ } @{ $result } };
1092
  } else {
1093
    $result = $result->[0] || { 'id' => $params{id} };
1094
  }
1095

  
1096
  $main::lxdebug->leave_sub();
1097

  
1098
  return $result;
1099
}
1100

  
1060 1101
1;

Auch abrufbar als: Unified diff