mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +00:00
Firmenverwaltung klein für WaWi
This commit is contained in:
@@ -163,6 +163,11 @@ class adresse extends basis_db
|
||||
|
||||
/**
|
||||
* Laedt alle Adressen zu der Firma die uebergeben wird
|
||||
*
|
||||
* ACHTUNG: Diese Funktion wird nur mehr fuer Lehrauftraege benoetigt.
|
||||
* Die Adresse zu einer Firma wird nun ueber die Tabelle Standort hergestellt!
|
||||
*
|
||||
* @deprec 2.0
|
||||
* @param $firma_id ID der Firma zu der die Adressen geladen werden sollen
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
|
||||
@@ -392,6 +392,41 @@ class kontakt extends basis_db
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt einen Kontakt eines Standortes
|
||||
* Es wird nur der erste Eintrag zurueckgeliefert!
|
||||
*
|
||||
* @param $standort_id
|
||||
* @param $kontakttyp
|
||||
*/
|
||||
public function loadFirmaKontakttyp($standort_id, $kontakttyp)
|
||||
{
|
||||
if(!is_numeric($standort_id))
|
||||
{
|
||||
$this->errormsg='StandortID ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT * FROM public.tbl_kontakt WHERE standort_id='".addslashes($standort_id)."' AND kontakttyp='".addslashes($kontakttyp)."' ORDER BY kontakt_id LIMIT 1";
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$this->kontakt = $row->kontakt;
|
||||
$this->kontakt_id = $row->kontakt_id;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt alle Kontakttypen
|
||||
* @return true wenn ok
|
||||
|
||||
@@ -186,7 +186,7 @@ class standort extends basis_db
|
||||
}
|
||||
|
||||
//Lesen der Daten aus der Datenbank
|
||||
$qry = "SELECT * FROM public.tbl_standort WHERE firma_id='".addslashes($firma_id)."'";
|
||||
$qry = "SELECT * FROM public.tbl_standort WHERE firma_id='".addslashes($firma_id)."' ORDER BY standort_id";
|
||||
|
||||
if(!$this->db_query($qry))
|
||||
{
|
||||
|
||||
@@ -61,7 +61,8 @@ $menu=array
|
||||
),
|
||||
'Firma'=>array
|
||||
(
|
||||
'name'=>'Firma anlegen', 'link'=>'firma.php?method=new', 'target'=>'content',
|
||||
'name'=>'Firma', 'link'=>'firma.php', 'target'=>'content','permissions'=>array('wawi/firma'),
|
||||
'FirmaNeu'=>array('name'=>'Neu', 'link'=>'firma.php?method=new', 'target'=>'content'),
|
||||
)
|
||||
),
|
||||
'Auswertungen'=> array
|
||||
|
||||
Reference in New Issue
Block a user