From 3a4ddae030f1f4542ca9641c2807b549b583a61e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 18 Apr 2012 15:17:06 +0200 Subject: [PATCH] Order->number dispacher methode, die je nach typ ordnumber oder quonumber aufruft. --- SL/DB/Order.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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__ -- 2.20.1