From: G. Richardson Date: Mon, 29 Jun 2015 15:13:18 +0000 (+0200) Subject: Einheitliche displayable_name Methode für ar/ap/oe/do Objekte X-Git-Tag: release-3.3.0beta~31^2~46 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a71146462873484c46a08cbb42ff31c6df86dac4;p=kivitendo-erp.git Einheitliche displayable_name Methode für ar/ap/oe/do Objekte Bestehend aus Dokumentenname und Dokumentennummer, z.B. Rechnung 12 Gutschrift 20 Verkaufslieferschein 15b --- diff --git a/SL/DB/DeliveryOrder.pm b/SL/DB/DeliveryOrder.pm index 15ceb5ddb..e6538e92e 100644 --- a/SL/DB/DeliveryOrder.pm +++ b/SL/DB/DeliveryOrder.pm @@ -82,6 +82,9 @@ sub displayable_type { die 'invalid type'; } +sub displayable_name { + join ' ', grep $_, map $_[0]->$_, qw(displayable_type record_number); +}; sub displayable_state { my ($self) = @_; diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 5456a376b..239280b2a 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -337,6 +337,10 @@ sub displayable_type { return t8('Invoice'); } +sub displayable_name { + join ' ', grep $_, map $_[0]->$_, qw(displayable_type record_number); +}; + sub abbreviation { my ($self) = @_; diff --git a/SL/DB/Order.pm b/SL/DB/Order.pm index fe0571fae..d61ec31eb 100644 --- a/SL/DB/Order.pm +++ b/SL/DB/Order.pm @@ -95,6 +95,9 @@ sub displayable_type { die 'invalid type'; } +sub displayable_name { + join ' ', grep $_, map $_[0]->$_, qw(displayable_type record_number); +}; sub is_sales { croak 'not an accessor' if @_ > 1;