X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/7c667c9093239a08aec7e9ab0958f6f721a8d6af..c6dd542b51ae9549ad42a54f9023b905412bbab9:/SL/DB/Customer.pm?ds=inline diff --git a/SL/DB/Customer.pm b/SL/DB/Customer.pm index a19520ed7..048db7c10 100644 --- a/SL/DB/Customer.pm +++ b/SL/DB/Customer.pm @@ -2,6 +2,8 @@ package SL::DB::Customer; use strict; +use Rose::DB::Object::Helpers qw(as_tree); + use SL::DB::MetaSetup::Customer; use SL::DB::Manager::Customer; use SL::DB::Helper::TransNumberGenerator; @@ -39,6 +41,15 @@ sub _before_save_set_customernumber { return 1; } +sub validate { + my ($self) = @_; + + my @errors; + push @errors, $::locale->text('The customer name is missing.') if !$self->name; + + return @errors; +} + sub short_address { my ($self) = @_; @@ -53,5 +64,6 @@ sub displayable_name { sub is_customer { 1 }; sub is_vendor { 0 }; +sub payment_terms { goto &payment } 1;