X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/7c667c9093239a08aec7e9ab0958f6f721a8d6af..c6dd542b51ae9549ad42a54f9023b905412bbab9:/SL/DB/Vendor.pm diff --git a/SL/DB/Vendor.pm b/SL/DB/Vendor.pm index 9a36afb39..b1458efc3 100644 --- a/SL/DB/Vendor.pm +++ b/SL/DB/Vendor.pm @@ -2,6 +2,8 @@ package SL::DB::Vendor; use strict; +use Rose::DB::Object::Helpers qw(as_tree); + use SL::DB::MetaSetup::Vendor; use SL::DB::Manager::Vendor; use SL::DB::Helper::TransNumberGenerator; @@ -39,6 +41,15 @@ sub _before_save_set_vendornumber { return 1; } +sub validate { + my ($self) = @_; + + my @errors; + push @errors, $::locale->text('The vendor name is missing.') if !$self->name; + + return @errors; +} + sub displayable_name { my $self = shift; @@ -47,5 +58,6 @@ sub displayable_name { sub is_customer { 0 }; sub is_vendor { 1 }; +sub payment_terms { goto &payment } 1;