From a71146462873484c46a08cbb42ff31c6df86dac4 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Mon, 29 Jun 2015 17:13:18 +0200 Subject: [PATCH] =?utf8?q?Einheitliche=20displayable=5Fname=20Methode=20f?= =?utf8?q?=C3=BCr=20ar/ap/oe/do=20Objekte?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bestehend aus Dokumentenname und Dokumentennummer, z.B. Rechnung 12 Gutschrift 20 Verkaufslieferschein 15b --- SL/DB/DeliveryOrder.pm | 3 +++ SL/DB/Invoice.pm | 4 ++++ SL/DB/Order.pm | 3 +++ 3 files changed, 10 insertions(+) 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; -- 2.20.1