From 5b192e717db8efbf4b76162797b08cb65fc4922f Mon Sep 17 00:00:00 2001
From: Moritz Bunkus <m.bunkus@linet-services.de>
Date: Thu, 8 Aug 2013 11:30:35 +0200
Subject: [PATCH] Customer-/Vendor-Models: Funktionen "is_customer"/"is_vendor"
 zur einfachen Unterscheidung

---
 SL/DB/Customer.pm | 3 +++
 SL/DB/Vendor.pm   | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/SL/DB/Customer.pm b/SL/DB/Customer.pm
index 2e3fa6856..36bddc0c7 100644
--- a/SL/DB/Customer.pm
+++ b/SL/DB/Customer.pm
@@ -51,4 +51,7 @@ sub displayable_name {
   return join ' ', grep $_, $self->customernumber, $self->name;
 }
 
+sub is_customer { 1 };
+sub is_vendor   { 0 };
+
 1;
diff --git a/SL/DB/Vendor.pm b/SL/DB/Vendor.pm
index 1dd936907..23886eaef 100644
--- a/SL/DB/Vendor.pm
+++ b/SL/DB/Vendor.pm
@@ -39,4 +39,7 @@ sub _before_save_set_vendornumber {
   return 1;
 }
 
+sub is_customer { 0 };
+sub is_vendor   { 1 };
+
 1;
-- 
2.20.1