Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ebd37c0e

Von Thomas Heck vor fast 12 Jahren hinzugefügt

  • ID ebd37c0ea7536ff0b41bda6e259d6348063edea9
  • Vorgänger da6d6eb0
  • Nachfolger d7c4629d

Bankkonten löschbar machen

Da Bankkonten nur von SEPA verwendet
werden, muss nicht geprüft werden, ob das Konto noch verwendet wird.
fixt #2085

Unterschiede anzeigen:

SL/BankAccount.pm
57 57
  return $account;
58 58
}
59 59

  
60
sub delete {
61
  $::lxdebug->enter_sub();
62

  
63
  my $self     = shift;
64
  my %params   = @_;
65

  
66
  Common::check_params(\%params, qw(id));
67

  
68
  my $dbh = $params{dbh} || $::form->get_standard_dbh(%::myconfig);
69

  
70
  my $query = '
71
    DELETE
72
    FROM bank_accounts
73
    WHERE id = ?';
74

  
75
  do_query($::form, $dbh, $query, conv_i($params{id}));
76

  
77
  $dbh->commit();
78

  
79
  $::lxdebug->leave_sub();
80
}
81

  
60 82
sub list {
61 83
  $main::lxdebug->enter_sub();
62 84

  
bin/mozilla/bankaccounts.pl
32 32
  $main::lxdebug->leave_sub();
33 33
}
34 34

  
35
sub bank_account_delete {
36
  $::lxdebug->enter_sub();
37

  
38
  SL::BankAccount->delete(id => $::form->{account}{id});
39

  
40
  print $::form->redirect_header('bankaccounts.pl?action=bank_account_list');
41

  
42
  $::lxdebug->leave_sub();
43
}
44

  
35 45
sub bank_account_display_form {
36 46
  $main::lxdebug->enter_sub();
37 47

  
templates/webpages/bankaccounts/bank_account_display_form.html
59 59

  
60 60
[%- IF account.id %]
61 61
   <input type="submit" name="action_bank_account_save" value="[% 'Save' | $T8 %]">
62
   <!-- <input type="submit" name="action_bank_account_delete" value="[% 'Delete' | $T8 %]"> -->
62
   <input type="submit" name="action_bank_account_delete" value="[% 'Delete' | $T8 %]">
63 63
[%- ELSE %]
64 64
   <input type="submit" name="action_bank_account_save" value="[% 'Add' | $T8 %]">
65 65
[%- END %]

Auch abrufbar als: Unified diff