From 576dd7723df10c6eec3e1dc54555a127390f8e77 Mon Sep 17 00:00:00 2001 From: Karl Burkhart Date: Tue, 15 Mar 2011 15:58:07 +0000 Subject: [PATCH] - checkOrgForm ()neu --- include/organisationsform.class.php | 30 +++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/include/organisationsform.class.php b/include/organisationsform.class.php index e0d9d2ee2..c87dbb646 100644 --- a/include/organisationsform.class.php +++ b/include/organisationsform.class.php @@ -71,8 +71,34 @@ class organisationsform extends basis_db } } - public function checkCode($orgform_kurzbz) - { + /** + * + * Orgform Kurzbezeichnung wird übergeben und alle passenden Kurzbezeichnungen werden zurückgegeben + * @param $orgform_kurzbz + */ + + public function checkOrgForm($orgform_kurzbz) + { + + if(is_null($orgform_kurzbz)) + { + $this->errormsg ="Kein gültiger Wert für Orgform Kurzbz."; + return false; + } + switch ($orgform_kurzbz) + { + case "VZ": + $vzArray= array('VZ', ''); + return $vzArray; + case "BB": + $bbArray=array('BB','DL','DDP',''); + return $bbArray; + case "VBB": + $vbbArray = array('VZ','BB','DDP','DL'); + return $vbbArray; + default: + return false; + } } }