Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 28fee2e2

Von Kivitendo Admin vor mehr als 9 Jahren hinzugefügt

  • ID 28fee2e2ebc6746bcfeb47c0318e79789ba1c850
  • Vorgänger 77061a7b
  • Nachfolger 6a12a968

Bankkonten auf Controller umgestellt

Außerdem wurde neue Datenbankspalten eingeführt: obsolete, sortkey

In Vorbereitung auf den Kontenabgleich wurden zwei neue Spalten
eingeführt:
reconciliation_starting_balance
reconciliation_starting_date

Damit kann man einstellen, ab welchem Datum der Kontenabgleich für das
jeweilige Konto beginnen soll, und, für den Abgleich des Gesamtsaldos,
welchen Saldo das Konto zu dem Zeitpunkt hatte. Dies ist nützlich, wenn
man mit dem Kontenabgleich im laufenden Betrieb anfangen möchte, aber
nicht alle Buchungen der Vergangenheit nachträglich abgleichen möchte.

Unterschiede anzeigen:

SL/BankAccount.pm
1
package SL::BankAccount;
2

  
3
use strict;
4

  
5
use SL::DBUtils;
6

  
7
sub save {
8
  $main::lxdebug->enter_sub();
9

  
10
  my $self     = shift;
11
  my %params   = @_;
12

  
13
  my $myconfig = \%main::myconfig;
14
  my $form     = $main::form;
15

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

  
18
  if (!$params{id}) {
19
    ($params{id}) = selectfirst_array_query($form, $dbh, qq|SELECT nextval('id')|);
20
    do_query($form, $dbh, qq|INSERT INTO bank_accounts (id, chart_id)
21
                             VALUES (?, (SELECT id FROM chart LIMIT 1))|, conv_i($params{id}));
22
  }
23

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

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

  
32
  $dbh->commit() unless ($params{dbh});
33

  
34
  $main::lxdebug->leave_sub();
35

  
36
  return $params{id};
37
}
38

  
39
sub retrieve {
40
  $main::lxdebug->enter_sub();
41

  
42
  my $self     = shift;
43
  my %params   = @_;
44

  
45
  Common::check_params(\%params, qw(id));
46

  
47
  my $myconfig = \%main::myconfig;
48
  my $form     = $main::form;
49

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

  
52
  my $query    = qq|SELECT * FROM bank_accounts WHERE id = ?|;
53
  my $account  = selectfirst_hashref_query($form, $dbh, $query, conv_i($params{id}));
54

  
55
  $main::lxdebug->leave_sub();
56

  
57
  return $account;
58
}
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

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

  
85
  my $self     = shift;
86
  my %params   = @_;
87

  
88
  my $myconfig = \%main::myconfig;
89
  my $form     = $main::form;
90

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

  
93
  my %sort_columns = (
94
    'name'              => [ 'ba.name', ],
95
    'account_number'    => [ 'ba.account_number', ],
96
    'bank_code'         => [ 'ba.bank_code', 'ba.account_number', ],
97
    'bank'              => [ 'ba.bank',      'ba.account_number', ],
98
    'iban'              => [ 'ba.iban',      'ba.account_number', ],
99
    'bic'               => [ 'ba.bic',       'ba.account_number', ],
100
    'chart_accno'       => [ 'c.accno', ],
101
    'chart_description' => [ 'c.description', ],
102
    );
103

  
104
  my %sort_spec = create_sort_spec('defs' => \%sort_columns, 'default' => 'bank', 'column' => $params{sortorder}, 'dir' => $params{sortdir});
105

  
106
  my $query =
107
    qq|SELECT ba.id, ba.name, ba.account_number, ba.bank_code, ba.bank, ba.iban, ba.bic, ba.chart_id,
108
         c.accno AS chart_accno, c.description AS chart_description
109
       FROM bank_accounts ba
110
       LEFT JOIN chart c ON (ba.chart_id = c.id)
111
       ORDER BY $sort_spec{sql}|;
112

  
113
  my $results = selectall_hashref_query($form, $dbh, $query);
114

  
115
  $main::lxdebug->leave_sub();
116

  
117
  return $results;
118
}
119

  
120

  
121
1;
SL/Controller/BankAccount.pm
1
 SL::Controller::BankAccount;
2

  
3
use strict;
4

  
5
use parent qw(SL::Controller::Base);
6

  
7
use SL::Helper::Flash;
8
use SL::Locale::String;
9
use SL::DB::Default;
10
use SL::DB::Manager::BankAccount;
11
use SL::DB::Manager::BankTransaction;
12

  
13
use Rose::Object::MakeMethods::Generic (
14
  scalar                  => [ qw(bank_account) ],
15
);
16

  
17
__PACKAGE__->run_before('check_auth');
18
__PACKAGE__->run_before('load_bank_account', only => [ qw(edit update delete) ]);
19

  
20
#
21
# actions
22
#
23

  
24
sub action_list {
25
  my ($self) = @_;
26

  
27
  $self->render('bankaccounts/list',
28
                title           => t8('Bank accounts'),
29
                BANKACCOUNTS    => SL::DB::Manager::BankAccount->get_all_sorted,
30
               );
31
}
32

  
33
sub action_new {
34
  my ($self) = @_;
35

  
36
  $self->{bank_account} = SL::DB::BankAccount->new;
37
  $self->render('bankaccounts/form',
38
                 title => t8('Add bank account'));
39
}
40

  
41
sub action_edit {
42
  my ($self) = @_;
43

  
44
  $self->render('bankaccounts/form', title => t8('Edit bank account'));
45
}
46

  
47
sub action_create {
48
  my ($self) = @_;
49

  
50
  $self->{bank_account} = SL::DB::BankAccount->new;
51
  $self->create_or_update;
52
}
53

  
54
sub action_update {
55
  my ($self) = @_;
56
  $self->create_or_update;
57
}
58

  
59
sub action_delete {
60
  my ($self) = @_;
61

  
62
  if ( $self->{bank_account}->{number_of_bank_transactions} > 0 ) {
63
    flash_later('error', $::locale->text('The bank account has been used and cannot be deleted.'));
64
  } elsif ( eval { $self->{bank_account}->delete; 1; } ) {
65
    flash_later('info',  $::locale->text('The bank account has been deleted.'));
66
  } else {
67
    flash_later('error', $::locale->text('The bank account has been used and cannot be deleted.'));
68
  };
69
  $self->redirect_to(action => 'list');
70

  
71
}
72

  
73
sub action_reorder {
74
  my ($self) = @_;
75

  
76
  SL::DB::BankAccount->reorder_list(@{ $::form->{account_id} || [] });
77
  $self->render(\'', { type => 'json' });
78
}
79

  
80
#
81
# filters
82
#
83

  
84
sub check_auth {
85
  $::auth->assert('config');
86
}
87

  
88
sub load_bank_account {
89
  my ($self) = @_;
90

  
91
  $self->{bank_account} = SL::DB::BankAccount->new(id => $::form->{id})->load;
92
  $self->{bank_account}->{number_of_bank_transactions} = SL::DB::Manager::BankTransaction->get_all_count( query => [ local_bank_account_id => $self->{bank_account}->{id} ] );
93
}
94

  
95
#
96
# helpers
97
#
98

  
99
sub create_or_update {
100
  my ($self) = @_;
101
  my $is_new = !$self->{bank_account}->id;
102

  
103
  my $params = delete($::form->{bank_account}) || { };
104

  
105
  $self->{bank_account}->assign_attributes(%{ $params });
106

  
107
  my @errors = $self->{bank_account}->validate;
108

  
109
  if (@errors) {
110
    flash('error', @errors);
111
    $self->render('bankaccounts/form',
112
                   title => $is_new ? t8('Add bank account') : t8('Edit bank account'));
113
    return;
114
  }
115

  
116
  $self->{bank_account}->save;
117

  
118
  flash_later('info', $is_new ? t8('The bank account has been created.') : t8('The bank account has been saved.'));
119
  $self->redirect_to(action => 'list');
120
}
121

  
122
1;
SL/DB/BankAccount.pm
6 6
use strict;
7 7

  
8 8
use SL::DB::MetaSetup::BankAccount;
9
use SL::DB::Manager::BankAccount;
10
use SL::DB::Helper::ActsAsList;
9 11

  
10 12
__PACKAGE__->meta->initialize;
11
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
12
__PACKAGE__->meta->make_manager_class;
13

  
14
sub validate {
15
  my ($self) = @_;
16

  
17
  my @errors;
18

  
19
  if ( not $self->{chart_id} ) {
20
    push @errors, $::locale->text('There is no connected chart.');
21
  } else {
22
    # check whether the assigned chart is valid or is already being used by
23
    # another bank account (there is also a UNIQUE database constraint on
24
    # chart_id)
25

  
26
    my $chart_id = $self->chart_id;
27
    my $chart = SL::DB::Chart->new( id => $chart_id );
28
    if ( $chart->load(speculative => 1) ) {
29
      my $linked_bank = SL::DB::Manager::BankAccount->find_by( chart_id => $chart_id );
30
      if ( $linked_bank ) {
31
        if ( not $self->{id} or ( $self->{id} && $linked_bank->id != $self->{id} )) {
32
          push @errors, $::locale->text('The account #1 is already being used by bank account #2.', $chart->displayable_name, $linked_bank->{name});
33
        };
34
      };
35
    } else {
36
      push @errors, $::locale->text('The chart is not valid.');
37
    };
38
  };
39

  
40
  push @errors, $::locale->text('The IBAN is missing.') unless $self->{iban};
41

  
42
  return @errors;
43
}
13 44

  
14 45
1;
SL/DB/MetaSetup/BankAccount.pm
9 9
__PACKAGE__->meta->table('bank_accounts');
10 10

  
11 11
__PACKAGE__->meta->columns(
12
  account_number => { type => 'varchar', length => 100 },
13
  bank           => { type => 'text' },
14
  bank_code      => { type => 'varchar', length => 100 },
15
  bic            => { type => 'varchar', length => 100 },
16
  chart_id       => { type => 'integer', not_null => 1 },
17
  iban           => { type => 'varchar', length => 100 },
18
  id             => { type => 'integer', not_null => 1, sequence => 'id' },
19
  name           => { type => 'text' },
12
  account_number                  => { type => 'varchar', length => 100 },
13
  bank                            => { type => 'text' },
14
  bank_code                       => { type => 'varchar', length => 100 },
15
  bic                             => { type => 'varchar', length => 100 },
16
  chart_id                        => { type => 'integer', not_null => 1 },
17
  iban                            => { type => 'varchar', length => 100 },
18
  id                              => { type => 'integer', not_null => 1, sequence => 'id' },
19
  name                            => { type => 'text' },
20
  obsolete                        => { type => 'boolean' },
21
  reconciliation_starting_balance => { type => 'numeric', precision => 15, scale => 5 },
22
  reconciliation_starting_date    => { type => 'date' },
23
  sortkey                         => { type => 'integer', not_null => 1 },
20 24
);
21 25

  
22 26
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
23 27

  
28
__PACKAGE__->meta->unique_keys([ 'chart_id' ]);
29

  
24 30
__PACKAGE__->meta->foreign_keys(
25 31
  chart => {
26 32
    class       => 'SL::DB::Chart',
27 33
    key_columns => { chart_id => 'id' },
34
    rel_type    => 'one to one',
28 35
  },
29 36
);
30 37

  
bin/mozilla/bankaccounts.pl
1
use strict;
2

  
3
use List::MoreUtils qw(any);
4
use POSIX qw(strftime);
5

  
6
use SL::BankAccount;
7
use SL::Chart;
8
use SL::Form;
9
use SL::ReportGenerator;
10

  
11
require "bin/mozilla/common.pl";
12
require "bin/mozilla/reportgenerator.pl";
13

  
14
sub bank_account_add {
15
  $main::lxdebug->enter_sub();
16

  
17
  bank_account_display_form('account' => {});
18

  
19
  $main::lxdebug->leave_sub();
20
}
21

  
22
sub bank_account_edit {
23
  $main::lxdebug->enter_sub();
24

  
25
  my %params  = @_;
26
  my $form    = $main::form;
27

  
28
  my $account = SL::BankAccount->retrieve('id' => $params{id} || $form->{id});
29

  
30
  bank_account_display_form('account' => $account);
31

  
32
  $main::lxdebug->leave_sub();
33
}
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

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

  
48
  my %params     = @_;
49
  my $account    = $params{account} || {};
50
  my $form       = $main::form;
51
  my $locale     = $main::locale;
52

  
53
  my $charts     = SL::Chart->list('link' => 'AP_paid');
54
  my $label_sub  = sub { join '--', map { $_[0]->{$_} } qw(accno description) };
55

  
56
  $form->{title} = $account->{id} ? $locale->text('Edit bank account') : $locale->text('Add bank account');
57

  
58
  $form->header();
59
  print $form->parse_html_template('bankaccounts/bank_account_display_form',
60
                                   { 'CHARTS'      => $charts,
61
                                     'account'     => $account,
62
                                     'chart_label' => $label_sub,
63
                                     'params'      => \%params });
64

  
65
  $main::lxdebug->leave_sub();
66
}
67

  
68
sub bank_account_save {
69
  $main::lxdebug->enter_sub();
70

  
71
  my $form    = $main::form;
72
  my $locale  = $main::locale;
73

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

  
76
  if (any { !$account->{$_} } qw(name account_number bank_code iban bic)) {
77
    bank_account_display_form('account' => $account,
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

  
80
    $main::lxdebug->leave_sub();
81
    return;
82
  }
83

  
84
  my $id = SL::BankAccount->save(%{ $account });
85

  
86
  if ($form->{callback}) {
87
    $form->redirect();
88

  
89
  } else {
90
    bank_account_edit('id' => $id);
91
  }
92

  
93
  $main::lxdebug->leave_sub();
94
}
95

  
96

  
97
sub bank_account_list {
98
  $main::lxdebug->enter_sub();
99

  
100
  my $form   = $main::form;
101
  my $locale = $main::locale;
102

  
103
  $form->{title}     = $locale->text('List of bank accounts');
104

  
105
  $form->{sort}    ||= 'account_number';
106
  $form->{sortdir}   = '1' if (!defined $form->{sortdir});
107

  
108
  $form->{callback}  = build_std_url('action=bank_account_list', 'sort', 'sortdir');
109

  
110
  my $accounts       = SL::BankAccount->list('sortorder' => $form->{sort},
111
                                             'sortdir'   => $form->{sortdir});
112

  
113
  my $report         = SL::ReportGenerator->new(\%main::myconfig, $form);
114

  
115
  my $href           = build_std_url('action=bank_account_list');
116

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

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

  
128
  foreach my $name (@columns) {
129
    my $sortdir                 = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir};
130
    $column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir";
131
  }
132

  
133
  $report->set_options('raw_bottom_info_text'  => $form->parse_html_template('bankaccounts/bank_account_list_bottom'),
134
                       'std_column_visibility' => 1,
135
                       'output_format'         => 'HTML',
136
                       'title'                 => $form->{title},
137
                       'attachment_basename'   => $locale->text('bankaccounts') . strftime('_%Y%m%d', localtime time),
138
    );
139
  $report->set_options_from_form();
140
  $locale->set_numberformat_wo_thousands_separator(\%::myconfig) if lc($report->{options}->{output_format}) eq 'csv';
141

  
142
  $report->set_columns(%column_defs);
143
  $report->set_column_order(@columns);
144
  $report->set_export_options('bank_account_list');
145
  $report->set_sort_indicator($form->{sort}, $form->{sortdir});
146

  
147
  my $edit_url = build_std_url('action=bank_account_edit', 'callback');
148

  
149
  foreach my $account (@{ $accounts }) {
150
    my $row = { map { $_ => { 'data' => $account->{$_} } } keys %{ $account } };
151

  
152
    $row->{account_number}->{link} = $edit_url . '&id=' . E($account->{id});
153

  
154
    $report->add_data($row);
155
  }
156

  
157
  $report->generate_with_headers();
158

  
159
  $main::lxdebug->leave_sub();
160
}
161

  
162
sub dispatcher {
163
  my $form = $main::form;
164

  
165
  foreach my $action (qw(bank_account_save bank_account_delete)) {
166
    if ($form->{"action_${action}"}) {
167
      call_sub($action);
168
      return;
169
    }
170
  }
171

  
172
  $form->error($main::locale->text('No action defined.'));
173
}
174

  
175
1;
js/locale/de.js
69 69
"The recipient, subject or body is missing.":"Der Empfäger, der Betreff oder der Text ist leer.",
70 70
"The selected database is still configured for client \"#1\". If you delete the database that client will stop working until you re-configure it. Do you still want to delete the database?":"Die auswählte Datenbank ist noch für Mandant \"#1\" konfiguriert. Wenn Sie die Datenbank löschen, wird der Mandanten nicht mehr funktionieren, bis er anders konfiguriert wurde. Wollen Sie die Datenbank trotzdem löschen?",
71 71
"There are still transfers not matching the qty of the delivery order. Stock operations can not be changed later. Do you really want to proceed?":"Einige der Lagerbewegungen sind nicht vollständig und Lagerbewegungen können nachträglich nicht mehr verändert werden. Wollen Sie wirklich fortfahren?",
72
"There is no connected chart.":"Es fehlt ein verknüpftes Buchungskonto.",
72 73
"There is one or more sections for which no part has been assigned yet; therefore creating the new record is not possible yet.":"Es gibt einen oder mehrere Abschnitte ohne Artikelzuweisung; daher kann der neue Beleg noch nicht erstellt werden.",
73 74
"This sales order has an active configuration for periodic invoices. If you save then all subsequently created invoices will contain those changes as well, but not those that have already been created. Do you want to continue?":"Dieser Auftrag besitzt eine aktive Konfiguration für wiederkehrende Rechnungen. Wenn Sie jetzt speichern, so werden alle zukünftig hieraus erzeugten Rechnungen die Änderungen enthalten, nicht aber die bereits erzeugten Rechnungen. Wollen Sie speichern?",
74 75
"Time/cost estimate actions":"Aktionen für Kosten-/Zeitabschätzung",
locale/de/all
1598 1598
  'New Purchase Price Rule'     => 'Neue Einkaufspreisregel',
1599 1599
  'New Sales Price Rule'        => 'Neue Verkaufspreisregel',
1600 1600
  'New assembly'                => 'Neues Erzeugnis',
1601
  'New bank account'            => 'Neues Bankkonto',
1602 1601
  'New client #1: The database configuration fields "host", "port", "name" and "user" must not be empty.' => 'Neuer Mandant #1: Die Datenbankkonfigurationsfelder "Host", "Port" und "Name" dürfen nicht leer sein.',
1603 1602
  'New client #1: The name must be unique and not empty.' => 'Neuer Mandant #1: Der Name darf nicht leer und muss eindeutig sein.',
1604 1603
  'New contact'                 => 'Neue Ansprechperson',
......
2369 2368
  'Start the correction assistant' => 'Korrekturassistenten starten',
2370 2369
  'Startdate_coa'               => 'Gültig ab',
2371 2370
  'Starting Balance'            => 'Eröffnungsbilanzwerte',
2371
  'Starting balance'            => 'Anfangssaldo',
2372
  'Starting date'               => 'Anfangsdatum',
2372 2373
  'Starting the task server failed.' => 'Das Starten des Task-Servers schlug fehl.',
2373 2374
  'Starting with version 2.6.3 the configuration files in "config" have been consolidated.' => 'Ab Version 2.6.3 wurden die Konfiguration vereinfacht und es gibt nur noch eine Konfigurationsdatei im Verzeichnis config',
2374 2375
  'Statement'                   => 'Sammelrechnung',
......
2488 2489
  'The Buchungsgruppe has been created.' => 'Die Buchungsgruppe wurde erstellt.',
2489 2490
  'The Buchungsgruppe has been saved.' => 'Die Buchungsgruppe wurde gespeichert.',
2490 2491
  'The GL transaction #1 has been deleted.' => 'Die Dialogbuchung #1 wurde gelöscht.',
2492
  'The IBAN is missing.'        => 'Die IBAN fehlt.',
2491 2493
  'The LDAP server "#1:#2" is unreachable. Please check config/kivitendo.conf.' => 'Der LDAP-Server "#1:#2" ist nicht erreichbar. Bitte überprüfen Sie die Angaben in config/kivitendo.conf.',
2492 2494
  'The SEPA export has been created.' => 'Der SEPA-Export wurde erstellt',
2493 2495
  'The SEPA strings have been saved.' => 'Die bei SEPA-Überweisungen verwendeten Begriffe wurden gespeichert.',
......
2498 2500
  'The acceptance status is in use and cannot be deleted.' => 'Der Abnahmestatus wird verwendet und kann nicht gelöscht werden.',
2499 2501
  'The access rights a user has within a client instance is still governed by his group membership.' => 'Welche Zugriffsrechte ein Benutzer innerhalb eines Mandanten hat, wird weiterhin über Gruppenmitgliedschaften geregelt.',
2500 2502
  'The access rights have been saved.' => 'Die Zugriffsrechte wurden gespeichert.',
2503
  'The account #1 is already being used by bank account #2.' => 'Das Konto #1 wird schon von Bankkonto #2 benutzt.',
2501 2504
  'The account 3804 already exists, the update will be skipped.' => 'Das Konto 3804 existiert schon, das Update wird übersprungen.',
2502 2505
  'The account 3804 will not be added automatically.' => 'Das Konto 3804 wird nicht automatisch hinzugefügt.',
2503 2506
  'The action is missing or invalid.' => 'Die action fehlt, oder sie ist ungültig.',
......
2513 2516
  'The background job has been deleted.' => 'Der Hintergrund-Job wurde gelöscht.',
2514 2517
  'The background job has been saved.' => 'Der Hintergrund-Job wurde gespeichert.',
2515 2518
  'The background job was executed successfully.' => 'Der Hintergrund-Job wurde erfolgreich ausgeführt.',
2519
  'The bank account has been created.' => 'Das Bankkonto wurde erstellt.',
2520
  'The bank account has been deleted.' => 'Das Bankkonto wurde gelöscht.',
2521
  'The bank account has been saved.' => 'Das Bankkonto wurde gespeichert',
2522
  'The bank account has been used and cannot be deleted.' => 'Das Bankkonto wurde benutzt und kann nicht gelöscht werden.',
2516 2523
  'The bank information must not be empty.' => 'Die Bankinformationen müssen vollständig ausgefüllt werden.',
2517 2524
  'The base file name without a path or an extension to be used for printing for this type of requirement spec.' => 'Der Basisdateiname ohne Pfadanteil oder Erweiterung, der bei Drucken dieses Pflichtenhefttyps verwendet wird.',
2518 2525
  'The base unit does not exist or it is about to be deleted in row %d.' => 'Die Basiseinheit in Zeile %d existiert nicht oder soll gelöscht werden.',
......
2527 2534
  'The business has been saved.' => 'Der Kunden-/Lieferantentyp wurde gespeichert.',
2528 2535
  'The business is in use and cannot be deleted.' => 'Der Kunden-/Lieferantentyp wird benutzt und kann nicht gelöscht werden.',
2529 2536
  'The changing of tax-o-matic account is NOT recommended, but if you do so please also (re)configure buchungsgruppen and reconfigure ALL charts which point to this tax-o-matic account. ' => 'Es wird nicht empfohlen Steuerkonten (Umsatzsteuer oder Vorsteuer) "umzuhängen", aber falls es gemacht wird, bitte auch entsprechend konsequent die Buchungsgruppen und die Konten die mit dieser Steuer verknüpft sind umkonfigurieren.',
2537
  'The chart is not valid.'     => 'Das Konto ist nicht gültig.',
2530 2538
  'The client could not be deleted.' => 'Der Mandant konnte nicht gelöscht werden.',
2531 2539
  'The client has been created.' => 'Der Mandant wurde angelegt.',
2532 2540
  'The client has been deleted.' => 'Der Mandant wurde gelöscht.',
......
2562 2570
  'The database user is missing.' => 'Der Datenbankbenutzer fehlt.',
2563 2571
  'The dataset #1 has been created.' => 'Die Datenbank #1 wurde angelegt.',
2564 2572
  'The dataset #1 has been deleted.' => 'Die Datenbank #1 wurde gelöscht.',
2565
  'The date is missing.'        => 'Das Datum fehlt',
2566 2573
  'The deductible amount'       => 'Der abziehbare Skontobetrag',
2567 2574
  'The default delivery plan only checks if all delivery orders have been created not if the goods are transferred. This feature will check if all the goods are transferred. Caveat: Only the state of the delivery orders are checked not partial transferred delivery orders (in technical terms: the table inventory is not checked' => 'Standardmässig wird beim Lieferplan überprüft, ob es eine vollständige Liefermenge über alle Lieferscheine gibt. Dies ist dann die Statusbedingung für geliefert oder nicht geliefert. Mit dieser Erweiterung wird geprüft ob die Lieferbelege auch wirklich ausgelagert sind oder nicht. Teilausgelagerte Lieferscheine werden allerdings nicht berücksichtigt (Technischer Hintergrund: Keine Überprüfung der Lagertabelle inventory).',
2568 2575
  'The default value depends on the variable type:' => 'Die Bedeutung des Standardwertes hängt vom Variablentypen ab:',
......
2771 2778
  'There is an inconsistancy in your database.' => 'In Ihrer Datenbank sind Unstimmigkeiten vorhanden.',
2772 2779
  'There is at least one sales or purchase invoice for which kivitendo recorded an inventory transaction with taxkeys even though no tax was recorded.' => 'Es gibt mindestens eine Verkaufs- oder Einkaufsrechnung, für die kivitendo eine Warenbestandsbuchung ohne dazugehörige Steuerbuchung durchgeführt hat.',
2773 2780
  'There is at least one transaction for which the user has chosen a logically wrong taxkey.' => 'Es gibt mindestens eine Buchung, bei der ein logisch nicht passender Steuerschlüssel ausgewählt wurde.',
2781
  'There is no connected chart.' => 'Es fehlt ein verknüpftes Buchungskonto.',
2774 2782
  'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4, #5, nicht genügend eingelagert, um insgesamt #6 auszulagern.',
2775 2783
  'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4 nicht genügend eingelagert, um insgesamt #5 auszulagern.',
2776 2784
  'There is not enough left of \'#1\' in bin \'#2\' for the removal of #3.' => 'In Lagerplatz \'#2\' ist nicht genug von \'#1\' vorhanden, um #3 zu entnehmen.',
menus/erp.ini
619 619
action=list_tax
620 620

  
621 621
[System--Bank accounts]
622
module=bankaccounts.pl
623
action=bank_account_list
622
module=controller.pl
623
action=BankAccount/list
624 624

  
625 625
[System--Groups]
626 626
module=pe.pl
sql/Pg-upgrade2/bank_accounts_unique_chart_constraint.sql
1
-- @tag: bank_accounts_unique_chart_constraint
2
-- @description: Bankkonto - Constraint für eindeutiges Konto
3
-- @depends: release_3_2_0
4
-- @encoding: utf-8
5

  
6
ALTER TABLE bank_accounts ADD CONSTRAINT chart_id_unique UNIQUE (chart_id);
sql/Pg-upgrade2/bankaccounts_reconciliation.sql
1
-- @tag: bankaccounts_reconciliation
2
-- @description: Kontenabgleichsststartdatum und -saldo
3
-- @depends: release_3_2_0
4
-- @encoding: utf-8
5

  
6
ALTER TABLE bank_accounts ADD COLUMN reconciliation_starting_date DATE;
7
ALTER TABLE bank_accounts ADD COLUMN reconciliation_starting_balance numeric(15,5);
sql/Pg-upgrade2/bankaccounts_sortkey_and_obsolete.sql
1
-- @tag: bankaccounts_sortkey_and_obsolete
2
-- @description: Bankkonto - Sortierreihenfolge und Ungültig
3
-- @depends: release_3_2_0
4
-- @encoding: utf-8
5

  
6
ALTER TABLE bank_accounts ADD COLUMN obsolete BOOLEAN;
7

  
8
ALTER TABLE bank_accounts ADD COLUMN sortkey INTEGER;
9
CREATE SEQUENCE tmp_counter;
10
UPDATE bank_accounts SET sortkey = nextval('tmp_counter');
11
DROP SEQUENCE tmp_counter;
12
ALTER TABLE bank_accounts ALTER COLUMN sortkey SET NOT NULL;
templates/webpages/bankaccounts/bank_account_display_form.html
1
[%- USE T8 %]
2
[% USE HTML %]
3
<h1>[% title %]</h1>
4

  
5
[%- IF params.error %]
6
 <p><div class="message_error">[% params.error %]</div></p>
7
[%- END %]
8

  
9
 <form method="post" action="bankaccounts.pl">
10

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

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

  
23
    <tr>
24
     <td align="right">[% 'Bank code' | $T8 %]</td>
25
     <td><input name="account.bank_code" size="20" maxlength="100" value="[% HTML.escape(account.bank_code) %]"></td>
26
    </tr>
27

  
28
    <tr>
29
     <td align="right">[% 'Bank' | $T8 %]</td>
30
     <td><input name="account.bank" size="30" value="[% HTML.escape(account.bank) %]"></td>
31
    </tr>
32

  
33
    <tr>
34
     <td align="right">[% 'IBAN' | $T8 %]</td>
35
     <td><input name="account.iban" size="30" maxlength="100" value="[% HTML.escape(account.iban) %]"></td>
36
    </tr>
37

  
38
    <tr>
39
     <td align="right">[% 'BIC' | $T8 %]</td>
40
     <td><input name="account.bic" size="30" maxlength="100" value="[% HTML.escape(account.bic) %]"></td>
41
    </tr>
42

  
43
    <tr>
44
     <td align="right">[% 'Chart' | $T8 %]</td>
45
     <td>
46
      [%- INCLUDE generic/multibox.html
47
            name      = 'account.chart_id',
48
            DATA      = CHARTS,
49
            id_key    = 'id',
50
            label_sub = 'chart_label',
51
            style     = 'width: 300px',
52
      -%]
53
     </td>
54
    </tr>
55

  
56
   </table>
57
  </p>
58

  
59
  <p>
60
   <input type="hidden" name="action" value="dispatcher">
61
   <input type="hidden" name="account.id" value="[% HTML.escape(account.id) %]">
62
   <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
63

  
64
[%- IF account.id %]
65
   <input type="submit" name="action_bank_account_save" value="[% 'Save' | $T8 %]">
66
   <input type="submit" name="action_bank_account_delete" value="[% 'Delete' | $T8 %]">
67
[%- ELSE %]
68
   <input type="submit" name="action_bank_account_save" value="[% 'Add' | $T8 %]">
69
[%- END %]
70
  </p>
71
 </form>
72

  
templates/webpages/bankaccounts/bank_account_list_bottom.html
1
[% USE T8 %][% USE HTML %]
2
 <p>
3
  <a href="dispatcher.pl?M=bankaccounts&A=bank_account_add&callback=[% HTML.url(callback) %]">[%- 'New bank account' | $T8 %]</a>
4
 </p>
templates/webpages/bankaccounts/form.html
1
[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
2

  
3
[% SET style="width: 400px" %]
4
[% SET size=34 %]
5

  
6
<h1>[% HTML.escape(title) %]</h1>
7

  
8
<form action="controller.pl" method="post">
9

  
10
[%- INCLUDE 'common/flash.html' %]
11

  
12
[%- L.hidden_tag("id", SELF.bank_account.id) %]
13

  
14
<table>
15
  <tr>
16
    <th align="right">[% 'Description' | $T8 %]</th>
17
    <td>[%- L.input_tag("bank_account.name", SELF.bank_account.name, size=size) %]</td>
18
  </tr>
19
  <tr>
20
    <th align="right">[% 'IBAN' | $T8 %]</th>
21
    <td>[%- L.input_tag("bank_account.iban", SELF.bank_account.iban, size=size) %]</td>
22
  </tr>
23
  <tr>
24
    <th align="right">[% 'Bank' | $T8 %]</th>
25
    <td>[%- L.input_tag("bank_account.bank", SELF.bank_account.bank, size=size) %]</td>
26
  </tr>
27
  <tr>
28
    <th align="right">[% 'Account number' | $T8 %]</th>
29
    <td>[%- L.input_tag("bank_account.account_number", SELF.bank_account.account_number, size=size) %]</td>
30
  </tr>
31
  <tr>
32
    <th align="right">[% 'BIC' | $T8 %]</th>
33
    <td>[%- L.input_tag("bank_account.bic", SELF.bank_account.bic, size=size) %]</td>
34
  </tr>
35
  <tr>
36
    <th align="right">[% 'Bank code' | $T8 %]</th>
37
    <td>[%- L.input_tag("bank_account.bank_code", SELF.bank_account.bank_code, size=size) %]</td>
38
  </tr>
39
  <tr>
40
    <th align="right">[% 'Chart' | $T8 %]</th>
41
    <td>[% L.chart_picker('bank_account.chart_id', SELF.bank_account.chart_id, type='AR_paid,AP_paid', category='A,L,Q', choose=1, style=style) %]</td>
42
  </tr>
43
  <tr>
44
    <th align="right">[% 'Obsolete' | $T8 %]</th>
45
    <td>[% L.checkbox_tag('bank_account.obsolete', checked = SELF.bank_account.obsolete, for_submit=1) %]</td>
46
  </tr>
47
  <tr>
48
    <td align="left">[% 'Reconciliation' | $T8 %]:</td>
49
    <td></td>
50
  </tr>
51
  <tr>
52
    <th align="right">[% 'Starting date' | $T8 %]</th>
53
    <td>[% L.date_tag('bank_account.reconciliation_starting_date', SELF.bank_account.reconciliation_starting_date) %]</td>
54
  </tr>
55
  <tr>
56
    <th align="right">[% 'Starting balance' | $T8 %]</th>
57
    <td>[%- L.input_tag('bank_account.reconciliation_starting_balance_as_number', SELF.bank_account.reconciliation_starting_balance_as_number) %]</td>
58
  </tr>
59
</table>
60

  
61
 <p>
62
  [% L.hidden_tag("action", "BankAccount/dispatch") %]
63
  [% L.submit_tag("action_" _  (SELF.bank_account.id ? "update" : "create"), LxERP.t8('Save'), onclick="return check_prerequisites();") %]
64
  [%- IF SELF.bank_account.id AND SELF.bank_account.number_of_bank_transactions == 0 -%]
65
    [% L.submit_tag("action_delete", LxERP.t8('Delete')) %]
66
  [%- END %]
67
  <a href="[% SELF.url_for(action='list') %]">[%- LxERP.t8("Cancel") %]</a>
68
 </p>
69

  
70
 <hr>
71

  
72
<script type="text/javascript">
73
<!--
74
function check_prerequisites() {
75
  if ($('#bank_account_name').val() === "") {
76
    alert(kivi.t8('The name is missing.'));
77
    return false;
78
  }
79
  if ($('#bank_account_iban').val() === "") {
80
    alert(kivi.t8('The IBAN is missing.'));
81
    return false;
82
  }
83
  if ($('#bank_account_chart_id').val() === "") {
84
    alert(kivi.t8('There is no connected chart.'));
85
    return false;
86
  }
87

  
88
  return true;
89
}
90
-->
91
</script>
92
</form>
templates/webpages/bankaccounts/list.html
1
[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%][%- INCLUDE 'common/flash.html' %]
2

  
3
<h1>[% title %]</h1>
4

  
5
<p>
6
 <table width="100%" id="bankaccount_list">
7
  <thead>
8
   <tr class="listheading">
9
    <th align="center" width="1%"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
10
    <th>[% 'Name' | $T8 %]</th>
11
    <th>[% 'IBAN' | $T8 %]</th>
12
    <th>[% 'Bank' | $T8 %]</th>
13
    <th>[% 'Bank code' | $T8 %]</th>
14
    <th>[% 'BIC' | $T8 %]</th>
15
    <th>[% 'Date' | $T8 %]</th>
16
    <th>[% 'Balance' | $T8 %]</th>
17
   </tr>
18
  </thead>
19

  
20
  <tbody>
21
   [%- FOREACH account = BANKACCOUNTS %]
22
    <tr class="listrow" id="account_id_[% account.id %]">
23
     <td align="center" class="dragdrop"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></td>
24
     <td><a href="[% SELF.url_for(action='edit', id=account.id) %]">[% HTML.escape(account.name) %]</a></td>
25
     <td>[% HTML.escape(account.iban) %]</a></td>
26
     <td>[% HTML.escape(account.bank) %]</a></td>
27
     <td>[% HTML.escape(account.bank_code) %]</a></td>
28
     <td>[% HTML.escape(account.bic) %]</a></td>
29
     <td>[% HTML.escape(account.reconciliation_starting_date.to_kivitendo) %]</a></td>
30
     <td align="right">[% HTML.escape(account.reconciliation_starting_balance_as_number) %]</a></td>
31
    </tr>
32
   [%- END %]
33
  </tbody>
34
 </table>
35
</p>
36

  
37
<hr height="3">
38

  
39
[% L.sortable_element('#bankaccount_list tbody', url=SELF.url_for(action='reorder'), with='account_id') %]
40

  
41
<p>
42
 <a href="[% SELF.url_for(action='new') %]">[%- 'Add' | $T8 %]</a>
43
</p>

Auch abrufbar als: Unified diff