Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 843de783

Von Kivitendo Admin vor mehr als 10 Jahren hinzugefügt

  • ID 843de7839af752ec61b80616aaca6af5aadbf7fc
  • Vorgänger 353e6d25
  • Nachfolger 402bcb73

Bankkonten einen Namen geben

Damit kann man seinen Bankkonten einfache Namen geben, wie z.B.
"Tagegeld", damit man bei der Auswahl nicht immer genau auf die
Kontonummer achten muß.

Bei der Bankkontenauswahl in Dropdowns ist die Beschriftung jetzt im
Format:
Name - Kontonummer, BLZ, Bank

Der nächste Schritt wäre wahrscheinlich IBAN statt Kontonummer und BLZ
zu benutzen.

Unterschiede anzeigen:

SL/BankAccount.pm
23 23

  
24 24
  my $query =
25 25
    qq|UPDATE bank_accounts
26
       SET account_number = ?, bank_code = ?, bank = ?, iban = ?, bic = ?, chart_id = ?
26
       SET name= ?, account_number = ?, bank_code = ?, bank = ?, iban = ?, bic = ?, chart_id = ?
27 27
       WHERE id = ?|;
28
  my @values = (@params{qw(account_number bank_code bank iban bic)}, conv_i($params{chart_id}), conv_i($params{id}));
28
  my @values = (@params{qw(name account_number bank_code bank iban bic)}, conv_i($params{chart_id}), conv_i($params{id}));
29 29

  
30 30
  do_query($form, $dbh, $query, @values);
31 31

  
......
91 91
  my $dbh      = $params{dbh} || $form->get_standard_dbh($myconfig);
92 92

  
93 93
  my %sort_columns = (
94
    'name'              => [ 'ba.name', ],
94 95
    'account_number'    => [ 'ba.account_number', ],
95 96
    'bank_code'         => [ 'ba.bank_code', 'ba.account_number', ],
96 97
    'bank'              => [ 'ba.bank',      'ba.account_number', ],
......
103 104
  my %sort_spec = create_sort_spec('defs' => \%sort_columns, 'default' => 'bank', 'column' => $params{sortorder}, 'dir' => $params{sortdir});
104 105

  
105 106
  my $query =
106
    qq|SELECT ba.id, ba.account_number, ba.bank_code, ba.bank, ba.iban, ba.bic, ba.chart_id,
107
    qq|SELECT ba.id, ba.name, ba.account_number, ba.bank_code, ba.bank, ba.iban, ba.bic, ba.chart_id,
107 108
         c.accno AS chart_accno, c.description AS chart_description
108 109
       FROM bank_accounts ba
109 110
       LEFT JOIN chart c ON (ba.chart_id = c.id)
SL/DB/MetaSetup/BankAccount.pm
16 16
  chart_id       => { type => 'integer', not_null => 1 },
17 17
  iban           => { type => 'varchar', length => 100 },
18 18
  id             => { type => 'integer', not_null => 1, sequence => 'id' },
19
  name           => { type => 'text' },
19 20
);
20 21

  
21 22
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
bin/mozilla/bankaccounts.pl
73 73

  
74 74
  my $account = $form->{account} && (ref $form->{account} eq 'HASH') ? $form->{account} : { };
75 75

  
76
  if (any { !$account->{$_} } qw(account_number bank_code iban bic)) {
76
  if (any { !$account->{$_} } qw(name account_number bank_code iban bic)) {
77 77
    bank_account_display_form('account' => $account,
78
                              'error'   => $locale->text('You have to fill in at least an account number, the bank code, the IBAN and the BIC.'));
78
                              'error'   => $locale->text('You have to fill in at least a name, an account number, the bank code, the IBAN and the BIC.'));
79 79

  
80 80
    $main::lxdebug->leave_sub();
81 81
    return;
......
115 115
  my $href           = build_std_url('action=bank_account_list');
116 116

  
117 117
  my %column_defs = (
118
    'name'           => { 'text' => $locale->text('Name'), },
118 119
    'account_number' => { 'text' => $locale->text('Account number'), },
119 120
    'bank_code'      => { 'text' => $locale->text('Bank code'), },
120 121
    'bank'           => { 'text' => $locale->text('Bank'), },
......
122 123
    'iban'           => { 'text' => $locale->text('IBAN'), },
123 124
  );
124 125

  
125
  my @columns = qw(account_number bank bank_code bic iban);
126
  my @columns = qw(name account_number bank bank_code bic iban);
126 127

  
127 128
  foreach my $name (@columns) {
128 129
    my $sortdir                 = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir};
bin/mozilla/sepa.pl
47 47
  # from us automatically and we don't have to send money manually.
48 48
  $_->{checked} = ($vc eq 'customer' ? $_->{direct_debit} : !$_->{direct_debit}) for @{ $invoices };
49 49

  
50
  my $bank_account_label_sub = sub { $locale->text('Account number #1, bank code #2, #3', $_[0]->{account_number}, $_[0]->{bank_code}, $_[0]->{bank}) };
50
  my $bank_account_label_sub = sub { $locale->text('#1 - Account number #2, bank code #3, #4', $_[0]->{name}, $_[0]->{account_number}, $_[0]->{bank_code}, $_[0]->{bank} ) };
51 51

  
52 52
  my $translation_list = GenericTranslations->list(translation_type => 'sepa_remittance_info_pfx');
53 53
  my %translations     = map { ( ($_->{language_id} || 'default') => $_->{translation} ) } @{ $translation_list };
......
130 130
                                                   'id' => \@vc_ids);
131 131
    my @vc_bank_info           = sort { lc $a->{name} cmp lc $b->{name} } values %{ $vc_bank_info };
132 132

  
133
    my $bank_account_label_sub = sub { $locale->text('Account number #1, bank code #2, #3', $_[0]->{account_number}, $_[0]->{bank_code}, $_[0]->{bank}) };
133
    my $bank_account_label_sub = sub { $locale->text('#1 - Account number #2, bank code #3, #4', $_[0]->{name}, $_[0]->{account_number}, $_[0]->{bank_code}, $_[0]->{bank} ) };
134 134

  
135 135
    $form->header();
136 136
    print $form->parse_html_template('sepa/bank_transfer_create',
locale/de/all
15 15
  ' Part Number missing!'       => ' Artikelnummer fehlt!',
16 16
  ' missing!'                   => ' fehlt!',
17 17
  '#1 (custom variable)'        => '#1 (benutzerdefinierte Variable)',
18
  '#1 - Account number #2, bank code #3, #4' => '#1 - Kontonummber #2, BLZ #3, #4',
18 19
  '#1 MD'                       => '#1 PT',
19 20
  '#1 h'                        => '#1 h',
20 21
  '#1 of #2 importable objects were imported.' => '#1 von #2 importierbaren Objekten wurden importiert.',
......
111 112
  'Account for fees'            => 'Konto für Gebühren',
112 113
  'Account for interest'        => 'Konto für Zinsen',
113 114
  'Account number'              => 'Kontonummer',
114
  'Account number #1, bank code #2, #3' => 'Kontonummer #1, BLZ #2, #3',
115 115
  'Account number not unique!'  => 'Kontonummer bereits vorhanden!',
116 116
  'Account saved!'              => 'Konto gespeichert!',
117 117
  'Accounting Group deleted!'   => 'Buchungsgruppe gelöscht!',
......
2822 2822
  'You have to define a unit as a multiple of a smaller unit.' => 'Sie müssen Einheiten als ein Vielfaches einer kleineren Einheit eingeben.',
2823 2823
  'You have to enter a company name in the client configuration.' => 'Sie müssen in der Mandantenkonfiguration einen Firmennamen angeben.',
2824 2824
  'You have to enter the SEPA creditor ID in the client configuration.' => 'Sie müssen in der Mandantenkonfiguration eine SEPA-Kreditoren-Identifikation angeben.',
2825
  'You have to fill in at least an account number, the bank code, the IBAN and the BIC.' => 'Sie müssen zumindest die Kontonummer, die Bankleitzahl, die IBAN und den BIC angeben.',
2825
  'You have to fill in at least a name, an account number, the bank code, the IBAN and the BIC.' => 'Sie müssen zumindest einen Namen, die Kontonummer, die Bankleitzahl, die IBAN und den BIC angeben.',
2826 2826
  'You have to grant users access to one or more clients.' => 'Benutzern muss dann Zugriff auf einzelne Mandanten gewährt werden.',
2827 2827
  'You have to specify a department.' => 'Sie müssen eine Abteilung wählen.',
2828 2828
  'You have to specify an execution date for each antry.' => 'Sie müssen für jeden zu buchenden Eintrag ein Ausführungsdatum angeben.',
sql/Pg-upgrade2/bank_accounts_add_name.sql
1
-- @tag: bank_accounts_add_name
2
-- @description: Bankkonten bekommen nun einen Namen
3
-- @depends: release_3_1_0 bank_accounts
4

  
5
ALTER TABLE bank_accounts ADD COLUMN name text;
templates/webpages/bankaccounts/bank_account_display_form.html
11 11

  
12 12
  <p>
13 13
   <table>
14
    <tr>
15
     <td align="right">[% 'Name' | $T8 %]</td>
16
     <td><input name="account.name" size="20" maxlength="100" value="[% HTML.escape(account.name) %]"></td>
17
    </tr>
18

  
14 19
    <tr>
15 20
     <td align="right">[% 'Account number' | $T8 %]</td>
16 21
     <td><input name="account.account_number" size="20" maxlength="100" value="[% HTML.escape(account.account_number) %]"></td>

Auch abrufbar als: Unified diff