projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug #199 - Kundenrabatt in Einkaufsrechnungspositionen
[kivitendo-erp.git]
/
SL
/
DB
/
BankAccount.pm
diff --git
a/SL/DB/BankAccount.pm
b/SL/DB/BankAccount.pm
index
7bbd897
..
fba783c
100644
(file)
--- a/
SL/DB/BankAccount.pm
+++ b/
SL/DB/BankAccount.pm
@@
-1,6
+1,3
@@
-# This file has been auto-generated only because it didn't exist.
-# Feel free to modify it at will; it will not be overwritten automatically.
-
package SL::DB::BankAccount;
use strict;
package SL::DB::BankAccount;
use strict;
@@
-8,6
+5,7
@@
use strict;
use SL::DB::MetaSetup::BankAccount;
use SL::DB::Manager::BankAccount;
use SL::DB::Helper::ActsAsList;
use SL::DB::MetaSetup::BankAccount;
use SL::DB::Manager::BankAccount;
use SL::DB::Helper::ActsAsList;
+use SL::DB::Helper::IBANValidation;
__PACKAGE__->meta->initialize;
__PACKAGE__->meta->initialize;
@@
-24,6
+22,7
@@
sub validate {
# chart_id)
my $chart_id = $self->chart_id;
# chart_id)
my $chart_id = $self->chart_id;
+ require SL::DB::Chart;
my $chart = SL::DB::Manager::Chart->find_by( id => $chart_id );
if ( $chart ) {
my $linked_bank = SL::DB::Manager::BankAccount->find_by( chart_id => $chart_id );
my $chart = SL::DB::Manager::Chart->find_by( id => $chart_id );
if ( $chart ) {
my $linked_bank = SL::DB::Manager::BankAccount->find_by( chart_id => $chart_id );
@@
-38,6
+37,7
@@
sub validate {
};
push @errors, $::locale->text('The IBAN is missing.') unless $self->{iban};
};
push @errors, $::locale->text('The IBAN is missing.') unless $self->{iban};
+ push @errors, $self->validate_ibans;
return @errors;
}
return @errors;
}