projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
marei: tl2019 compat
[kivitendo-erp.git]
/
SL
/
Controller
/
ClientConfig.pm
diff --git
a/SL/Controller/ClientConfig.pm
b/SL/Controller/ClientConfig.pm
index
3d5b770
..
9bf0eda
100644
(file)
--- a/
SL/Controller/ClientConfig.pm
+++ b/
SL/Controller/ClientConfig.pm
@@
-20,6
+20,7
@@
use SL::Template;
use SL::Controller::TopQuickSearch;
use SL::DB::Helper::AccountingPeriod qw(get_balance_startdate_method_options);
use SL::Helper::ShippedQty;
use SL::Controller::TopQuickSearch;
use SL::DB::Helper::AccountingPeriod qw(get_balance_startdate_method_options);
use SL::Helper::ShippedQty;
+use SL::VATIDNr;
__PACKAGE__->run_before('check_auth');
__PACKAGE__->run_before('check_auth');
@@
-99,6
+100,11
@@
sub action_save {
}
}
}
}
+ my $cleaned_ustid = SL::VATIDNr->clean($defaults->{co_ustid});
+ if ($cleaned_ustid && !SL::VATIDNr->validate($cleaned_ustid)) {
+ push @errors, t8("The VAT ID number '#1' is invalid.", $defaults->{co_ustid});
+ }
+
# Show form again if there were any errors. Nothing's been changed
# yet in the database.
if (@errors) {
# Show form again if there were any errors. Nothing's been changed
# yet in the database.
if (@errors) {