From: Sven Schöling Date: Wed, 18 Apr 2012 13:17:06 +0000 (+0200) Subject: Order->number dispacher methode, die je nach typ ordnumber oder quonumber aufruft. X-Git-Tag: release-3.0.0beta1~343^2~14 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=3a4ddae030f1f4542ca9641c2807b549b583a61e;p=kivitendo-erp.git Order->number dispacher methode, die je nach typ ordnumber oder quonumber aufruft. --- diff --git a/SL/DB/Order.pm b/SL/DB/Order.pm index e28a87c7d..8212a647e 100644 --- a/SL/DB/Order.pm +++ b/SL/DB/Order.pm @@ -149,6 +149,19 @@ sub convert_to_invoice { return $invoice; } +sub number { + my $self = shift; + + my %number_method = ( + sales_order => 'ordnumber', + sales_quotation => 'quonumber', + puchase_order => 'ordnumber', + request_quotation => 'quonumber', + ); + + return $self->${ \ $number_method{$self->type} }(@_); +} + 1; __END__