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.
my $query =
qq|UPDATE bank_accounts
- SET account_number = ?, bank_code = ?, bank = ?, iban = ?, bic = ?, chart_id = ?
+ SET name= ?, account_number = ?, bank_code = ?, bank = ?, iban = ?, bic = ?, chart_id = ?
WHERE id = ?|;
- my @values = (@params{qw(account_number bank_code bank iban bic)}, conv_i($params{chart_id}), conv_i($params{id}));
+ my @values = (@params{qw(name account_number bank_code bank iban bic)}, conv_i($params{chart_id}), conv_i($params{id}));
do_query($form, $dbh, $query, @values);
my $dbh = $params{dbh} || $form->get_standard_dbh($myconfig);
my %sort_columns = (
+ 'name' => [ 'ba.name', ],
'account_number' => [ 'ba.account_number', ],
'bank_code' => [ 'ba.bank_code', 'ba.account_number', ],
'bank' => [ 'ba.bank', 'ba.account_number', ],
my %sort_spec = create_sort_spec('defs' => \%sort_columns, 'default' => 'bank', 'column' => $params{sortorder}, 'dir' => $params{sortdir});
my $query =
- qq|SELECT ba.id, ba.account_number, ba.bank_code, ba.bank, ba.iban, ba.bic, ba.chart_id,
+ qq|SELECT ba.id, ba.name, ba.account_number, ba.bank_code, ba.bank, ba.iban, ba.bic, ba.chart_id,
c.accno AS chart_accno, c.description AS chart_description
FROM bank_accounts ba
LEFT JOIN chart c ON (ba.chart_id = c.id)
chart_id => { type => 'integer', not_null => 1 },
iban => { type => 'varchar', length => 100 },
id => { type => 'integer', not_null => 1, sequence => 'id' },
+ name => { type => 'text' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
my $account = $form->{account} && (ref $form->{account} eq 'HASH') ? $form->{account} : { };
- if (any { !$account->{$_} } qw(account_number bank_code iban bic)) {
+ if (any { !$account->{$_} } qw(name account_number bank_code iban bic)) {
bank_account_display_form('account' => $account,
- 'error' => $locale->text('You have to fill in at least an account number, the bank code, the IBAN and the BIC.'));
+ 'error' => $locale->text('You have to fill in at least a name, an account number, the bank code, the IBAN and the BIC.'));
$main::lxdebug->leave_sub();
return;
my $href = build_std_url('action=bank_account_list');
my %column_defs = (
+ 'name' => { 'text' => $locale->text('Name'), },
'account_number' => { 'text' => $locale->text('Account number'), },
'bank_code' => { 'text' => $locale->text('Bank code'), },
'bank' => { 'text' => $locale->text('Bank'), },
'iban' => { 'text' => $locale->text('IBAN'), },
);
- my @columns = qw(account_number bank bank_code bic iban);
+ my @columns = qw(name account_number bank bank_code bic iban);
foreach my $name (@columns) {
my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir};
# from us automatically and we don't have to send money manually.
$_->{checked} = ($vc eq 'customer' ? $_->{direct_debit} : !$_->{direct_debit}) for @{ $invoices };
- my $bank_account_label_sub = sub { $locale->text('Account number #1, bank code #2, #3', $_[0]->{account_number}, $_[0]->{bank_code}, $_[0]->{bank}) };
+ 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} ) };
my $translation_list = GenericTranslations->list(translation_type => 'sepa_remittance_info_pfx');
my %translations = map { ( ($_->{language_id} || 'default') => $_->{translation} ) } @{ $translation_list };
'id' => \@vc_ids);
my @vc_bank_info = sort { lc $a->{name} cmp lc $b->{name} } values %{ $vc_bank_info };
- my $bank_account_label_sub = sub { $locale->text('Account number #1, bank code #2, #3', $_[0]->{account_number}, $_[0]->{bank_code}, $_[0]->{bank}) };
+ 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} ) };
$form->header();
print $form->parse_html_template('sepa/bank_transfer_create',
' Part Number missing!' => ' Artikelnummer fehlt!',
' missing!' => ' fehlt!',
'#1 (custom variable)' => '#1 (benutzerdefinierte Variable)',
+ '#1 - Account number #2, bank code #3, #4' => '#1 - Kontonummber #2, BLZ #3, #4',
'#1 MD' => '#1 PT',
'#1 h' => '#1 h',
'#1 of #2 importable objects were imported.' => '#1 von #2 importierbaren Objekten wurden importiert.',
'Account for fees' => 'Konto für Gebühren',
'Account for interest' => 'Konto für Zinsen',
'Account number' => 'Kontonummer',
- 'Account number #1, bank code #2, #3' => 'Kontonummer #1, BLZ #2, #3',
'Account number not unique!' => 'Kontonummer bereits vorhanden!',
'Account saved!' => 'Konto gespeichert!',
'Accounting Group deleted!' => 'Buchungsgruppe gelöscht!',
'You have to define a unit as a multiple of a smaller unit.' => 'Sie müssen Einheiten als ein Vielfaches einer kleineren Einheit eingeben.',
'You have to enter a company name in the client configuration.' => 'Sie müssen in der Mandantenkonfiguration einen Firmennamen angeben.',
'You have to enter the SEPA creditor ID in the client configuration.' => 'Sie müssen in der Mandantenkonfiguration eine SEPA-Kreditoren-Identifikation angeben.',
- '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.',
+ '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.',
'You have to grant users access to one or more clients.' => 'Benutzern muss dann Zugriff auf einzelne Mandanten gewährt werden.',
'You have to specify a department.' => 'Sie müssen eine Abteilung wählen.',
'You have to specify an execution date for each antry.' => 'Sie müssen für jeden zu buchenden Eintrag ein Ausführungsdatum angeben.',
--- /dev/null
+-- @tag: bank_accounts_add_name
+-- @description: Bankkonten bekommen nun einen Namen
+-- @depends: release_3_1_0 bank_accounts
+
+ALTER TABLE bank_accounts ADD COLUMN name text;
<p>
<table>
+ <tr>
+ <td align="right">[% 'Name' | $T8 %]</td>
+ <td><input name="account.name" size="20" maxlength="100" value="[% HTML.escape(account.name) %]"></td>
+ </tr>
+
<tr>
<td align="right">[% 'Account number' | $T8 %]</td>
<td><input name="account.account_number" size="20" maxlength="100" value="[% HTML.escape(account.account_number) %]"></td>