mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Anpassung Inventar an neues WaWi
This commit is contained in:
@@ -739,8 +739,8 @@ class betriebsmittel extends basis_db
|
||||
$qry.=',tbl_betriebsmittelstatus.beschreibung as betriebsmittelstatus_beschreibung ';
|
||||
$qry.=',tbl_betriebsmitteltyp.beschreibung as betriebsmitteltyp_beschreibung ';
|
||||
$qry.=', CASE WHEN EXISTS(SELECT retouram FROM wawi.tbl_betriebsmittelperson WHERE betriebsmittel_id=tbl_betriebsmittel.betriebsmittel_id AND retouram is NULL) THEN \'t\' ELSE \'f\' END ausgegeben';
|
||||
$qry.=', tbl_betriebsmittel.*';
|
||||
$qry.=', wawi_be.*';
|
||||
$qry.=', tbl_betriebsmittel.*, tbl_bestellung.titel as titel';
|
||||
$qry.=', tbl_bestellung.bestell_nr as bestellnr, tbl_firma.name as firmenname, tbl_firma.firma_id as firma_id';
|
||||
|
||||
//AfA Datum ermitteln
|
||||
$qry.=", trim(to_char(date_part('year',
|
||||
@@ -767,14 +767,9 @@ class betriebsmittel extends basis_db
|
||||
$qry.=' LEFT JOIN wawi.tbl_betriebsmittelstatus on (tbl_betriebsmittelstatus.betriebsmittelstatus_kurzbz=tbl_betriebsmittel_betriebsmittelstatus.betriebsmittelstatus_kurzbz ) ';
|
||||
$qry.=' LEFT JOIN public.tbl_ort on (tbl_ort.ort_kurzbz=tbl_betriebsmittel.ort_kurzbz ) ';
|
||||
$qry.=' LEFT JOIN wawi.tbl_betriebsmittelperson on (tbl_betriebsmittelperson.betriebsmittel_id=tbl_betriebsmittel.betriebsmittel_id ) ';
|
||||
$qry.=' LEFT JOIN wawi.tbl_bestellung USING(bestellung_id)
|
||||
LEFT JOIN public.tbl_firma ON(tbl_firma.firma_id=tbl_bestellung.firma_id )';
|
||||
|
||||
// Verbindung zum WAWI aufbauen
|
||||
$qry.=' LEFT JOIN dblink(\''.CONN_STRING_WAWI.'\',\'
|
||||
SELECT distinct bestellung.bestellung_id,bestellung.bestellnr,bestellung.titel,bestellung.firma_id,firma.firmenname from public.bestellung
|
||||
LEFT JOIN public.firma on ( firma.firma_id=bestellung.firma_id ) \' )
|
||||
as wawi_be(bestellung_id int, bestellnr char(32), titel char(120), firma_id int, firmenname char(160) )
|
||||
on ( cast(wawi_be.bestellung_id as INTEGER)=cast(tbl_betriebsmittel.bestellung_id as INTEGER) and cast(tbl_betriebsmittel.bestellung_id as INTEGER)>0 ) ';
|
||||
|
||||
$qry.=" WHERE not tbl_betriebsmittel.betriebsmittel_id is null ";
|
||||
$where=$this->betriebsmittel_inventar_get_where($inventarnummer,$ort_kurzbz,$betriebsmittelstatus_kurzbz,$betriebsmitteltyp,$bestellung_id,$bestelldetail_id,$bestellnr,$hersteller,$afa,$jahr_monat,$firma_id,$inventur_jahr,$beschreibung,$oe_kurzbz,$seriennummer,$person_id,$betriebsmittel_id);
|
||||
if ($where!='' && !$where)
|
||||
@@ -832,15 +827,9 @@ class betriebsmittel extends basis_db
|
||||
$qry.=' left outer join wawi.tbl_betriebsmittelstatus on (tbl_betriebsmittelstatus.betriebsmittelstatus_kurzbz=tbl_betriebsmittel_betriebsmittelstatus.betriebsmittelstatus_kurzbz ) ';
|
||||
$qry.=' left outer join public.tbl_ort on (tbl_ort.ort_kurzbz=tbl_betriebsmittel.ort_kurzbz ) ';
|
||||
$qry.=' left outer join wawi.tbl_betriebsmittelperson on (tbl_betriebsmittelperson.betriebsmittel_id=tbl_betriebsmittel.betriebsmittel_id ) ';
|
||||
|
||||
// Verbindung zum WAWI aufbauen
|
||||
if ( $bestellnr || $firma_id || $beschreibung )
|
||||
$qry.=' left outer join dblink(\''.CONN_STRING_WAWI.'\',\'
|
||||
select distinct bestellung.bestellung_id,bestellung.bestellnr,bestellung.titel,bestellung.firma_id,firma.firmenname from public.bestellung
|
||||
left join public.firma on ( firma.firma_id=bestellung.firma_id ) \' )
|
||||
as wawi_be(bestellung_id int, bestellnr char(32), titel char(120), firma_id int, firmenname char(160) )
|
||||
on ( cast(wawi_be.bestellung_id as INTEGER)=cast(tbl_betriebsmittel.bestellung_id as INTEGER) and cast(tbl_betriebsmittel.bestellung_id as INTEGER)>0 ) ';
|
||||
|
||||
$qry.=' left outer join wawi.tbl_bestellung using(bestellung_id)';
|
||||
$qry.=' left outer join public.tbl_firma using(firma_id)';
|
||||
|
||||
$qry.=" where not tbl_betriebsmittel.bestellung_id is null ";
|
||||
$where='';
|
||||
$where=$this->betriebsmittel_inventar_get_where($inventarnummer,$ort_kurzbz,$betriebsmittelstatus_kurzbz,$betriebsmitteltyp,$bestellung_id,$bestelldetail_id,$bestellnr,$hersteller,$afa,$jahr_monat,$firma_id,$inventur_jahr,$beschreibung,$oe_kurzbz,$seriennummer);
|
||||
@@ -850,6 +839,7 @@ class betriebsmittel extends basis_db
|
||||
$order='tbl_betriebsmittel.bestellung_id';
|
||||
|
||||
$qry.=$where.(!is_null($order) && !empty($order)?' ORDER BY '. $order:'').(!$where?' limit 20 ':' limit 50 ');
|
||||
|
||||
if(!$result=$this->db_query($qry))
|
||||
{
|
||||
$this->errormsg ='Probleme beim lesen der Betriebsmittel '.($this->debug?$this->db_last_error() ."<br />$qry<br />":'') ;
|
||||
@@ -916,7 +906,7 @@ class betriebsmittel extends basis_db
|
||||
$where.=" AND ( UPPER(trim(tbl_betriebsmittel.beschreibung)) like '%".$matchcode."%' ";
|
||||
$where.=" or UPPER(trim(tbl_betriebsmittel.verwendung)) like '%".$matchcode."%' ";
|
||||
if ( $bestellnr || $firma_id || $beschreibung )
|
||||
$where.=" or UPPER(trim(wawi_be.titel)) like '%". $matchcode ."%' " ;
|
||||
$where.=" or UPPER(trim(tbl_bestellung.titel)) like '%". $matchcode ."%' " ;
|
||||
$where.=" or UPPER(trim(tbl_betriebsmittel.anmerkung)) like '%".$matchcode."%' ) ";
|
||||
}
|
||||
|
||||
@@ -1058,17 +1048,17 @@ class betriebsmittel extends basis_db
|
||||
if (!is_null($bestellnr) && !empty($bestellnr) )
|
||||
{
|
||||
$matchcode=mb_strtoupper(addslashes(str_replace(array('*','%',',',';',"'",'"',' '),'%',trim($bestellnr))));
|
||||
$where.=" AND UPPER(trim(wawi_be.bestellnr)) like '%".$matchcode."%' " ;
|
||||
$where.=" AND UPPER(trim(tbl_bestellung.bestell_nr)) like '%".$matchcode."%' " ;
|
||||
}
|
||||
// Lieferant
|
||||
if (!is_null($firma_id) && $firma_id!='' && is_numeric($firma_id))
|
||||
{
|
||||
$where.=" AND wawi_be.firma_id=". trim($firma_id) ;
|
||||
$where.=" AND tbl_bestellung.firma_id=". trim($firma_id) ;
|
||||
}
|
||||
elseif (!is_null($firma_id) && $firma_id!='' )
|
||||
{
|
||||
$matchcode=mb_strtoupper(addslashes(str_replace(array('*','%',',',';',"'",'"',' '),'%',trim($firma_id))));
|
||||
$where.=" AND UPPER(trim(wawi_be.firmenname)) like '%". $matchcode ."%' " ;
|
||||
$where.=" AND UPPER(trim(tbl_firma.name)) like '%". $matchcode ."%' " ;
|
||||
}
|
||||
|
||||
if (!is_null($betriebsmittelstatus_kurzbz) && !empty($betriebsmittelstatus_kurzbz) )
|
||||
|
||||
@@ -49,11 +49,13 @@ $menu=array
|
||||
(
|
||||
'name'=>'Bestellung', 'permissions'=>array('wawi/bestellung'),'link'=>'bestellung.php?method=suche', 'target'=>'content',
|
||||
'BestellungNeu'=>array('name'=>'Neu', 'link'=>'bestellung.php?method=new', 'target'=>'content'),
|
||||
'BestellungSuchen'=>array('name'=>'Suchen', 'link'=>'bestellung.php?method=suche', 'target'=>'content'),
|
||||
),
|
||||
'Rechnung'=>array
|
||||
(
|
||||
'name'=>'Rechnung', 'permissions'=>array('wawi/rechnung'),'link'=>'rechnung.php?method=suche', 'target'=>'content',
|
||||
'RechnungNeu'=>array('name'=>'Neu', 'link'=>'rechnung.php?method=new', 'target'=>'content'),
|
||||
'RechnungSuchen'=>array('name'=>'Suchen', 'link'=>'rechnung.php?method=suche', 'target'=>'content'),
|
||||
),
|
||||
'Personensuche'=>array
|
||||
(
|
||||
@@ -63,6 +65,7 @@ $menu=array
|
||||
(
|
||||
'name'=>'Firma', 'link'=>'firma.php', 'target'=>'content','permissions'=>array('wawi/firma'),
|
||||
'FirmaNeu'=>array('name'=>'Neu', 'link'=>'firma.php?method=new', 'target'=>'content'),
|
||||
'FirmaSuchen'=>array('name'=>'Suchen', 'link'=>'firma.php', 'target'=>'content'),
|
||||
)
|
||||
),
|
||||
'Berichte'=> array
|
||||
|
||||
@@ -1,707 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
|
||||
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
|
||||
*/
|
||||
|
||||
// ---------------- Vilesci Include Dateien einbinden
|
||||
$path='../../';
|
||||
|
||||
include_once($path.'config/vilesci.config.inc.php');
|
||||
require_once($path.'include/functions.inc.php');
|
||||
require_once($path.'include/benutzerberechtigung.class.php');
|
||||
require_once($path.'include/studiengang.class.php');
|
||||
require_once($path.'include/mitarbeiter.class.php');
|
||||
require_once($path.'include/wawi.class.php');
|
||||
require_once($path.'include/betriebsmittel.class.php');
|
||||
|
||||
if (!$uid=get_uid())
|
||||
die('Keine Useranmeldedaten - UID gefunden ! <a href="javascript:history.back()">Zurück</a>');
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Variable Initialisieren
|
||||
// ------------------------------------------------------------------------------------------
|
||||
$errormsg=array();
|
||||
|
||||
//------------ Berechtigungen
|
||||
$berechtigung_kurzbz='wawi/inventar:begrenzt';
|
||||
$recht=false;
|
||||
$schreib_recht=false;
|
||||
$schreib_recht_administration=2; // Admin wert fuer set schreib_recht
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Parameter uebernehmen
|
||||
// ------------------------------------------------------------------------------------------
|
||||
$jahr_monat=trim(isset($_REQUEST['jahr_monat']) ? $_REQUEST['jahr_monat']:'');
|
||||
$jahr_monat=trim(isset($_REQUEST['jahr']) ? $_REQUEST['jahr']:$jahr_monat);
|
||||
$firma_id=trim(isset($_REQUEST['firma_id'])?$_REQUEST['firma_id']:'');
|
||||
$bestellung_id=trim(isset($_REQUEST['bestellung_id'])?$_REQUEST['bestellung_id']:'');
|
||||
$bestellung_id=trim(isset($_REQUEST['purchid'])?$_REQUEST['purchid']:$bestellung_id);
|
||||
$bestelldetail_id=trim(isset($_REQUEST['bestelldetail_id'])?$_REQUEST['bestelldetail_id']:'');
|
||||
$bestellnr=trim(isset($_REQUEST['bestellnr']) ? $_REQUEST['bestellnr']:'');
|
||||
$bestellnr=trim(isset($_REQUEST['purchnr'])?$_REQUEST['purchnr']:$bestellnr);
|
||||
$titel=trim(isset($_REQUEST['titel'])?$_REQUEST['titel']:'');
|
||||
$besteller=trim(isset($_REQUEST['besteller']) ? $_REQUEST['besteller']:'');
|
||||
$kostenstelle_id=trim(isset($_REQUEST['kostenstelle_id']) ? $_REQUEST['kostenstelle_id']:'');
|
||||
$konto_id=trim(isset($_REQUEST['konto_id'])?$_REQUEST['konto_id']:(isset($_REQUEST['konto'])?$_REQUEST['konto']:''));
|
||||
$kontonr=trim(isset($_REQUEST['kontonr'])?$_REQUEST['kontonr']:'');
|
||||
$studiengang_id=trim(isset($_REQUEST['studiengang_id']) ? $_REQUEST['studiengang_id']:'');
|
||||
$pos_wert=trim(isset($_REQUEST['pos_wert'])?$_REQUEST['pos_wert']:0);
|
||||
if (!is_numeric($pos_wert))
|
||||
$pos_wert=0;
|
||||
$debug=trim(isset($_REQUEST['debug']) ? $_REQUEST['debug']:false);
|
||||
|
||||
$extend_search=trim(isset($_REQUEST['extend_search']) ?$_REQUEST['extend_search']:'false');
|
||||
// wurde im Erweitertenbereich etwas eingegeben - diesen auf alle Faelle anzeigen
|
||||
$check=$firma_id.$besteller.$titel.$kostenstelle_id.$konto_id.$studiengang_id;
|
||||
$extend_search=($check?'true':$extend_search);
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Berechtigung
|
||||
// ------------------------------------------------------------------------------------------
|
||||
$oBenutzerberechtigung = new benutzerberechtigung();
|
||||
// read Berechtigung
|
||||
if (!$oBenutzerberechtigung->getBerechtigungen($uid))
|
||||
die('Sie haben keine Berechtigung ! <a href="javascript:history.back()">Zurück</a>');
|
||||
|
||||
$recht=false;
|
||||
if($oBenutzerberechtigung->isBerechtigt($berechtigung_kurzbz,null,'s'))
|
||||
$recht=true;
|
||||
if (!$recht)
|
||||
die('Sie haben keine Berechtigung für diese Seite ! <a href="javascript:history.back()">Zurück</a>');
|
||||
|
||||
// Pruefen ob Schreibrechte (Anzeigen der Aenderungsmoeglichkeit)
|
||||
$schreib_recht=false;
|
||||
if($oBenutzerberechtigung->isBerechtigt($berechtigung_kurzbz,null, 'suid'))
|
||||
$schreib_recht=true;
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Datenbankanbindung
|
||||
// ------------------------------------------------------------------------------------------
|
||||
if (!$oWAWI = new wawi())
|
||||
die('Fehler beim Verbinden mit der Datenbank '.($debug?$oWAWI->errormsg.' *** File:='.__FILE__.' Line:='.__LINE__:''));
|
||||
$oWAWI->debug=$debug;
|
||||
$oWAWI->result=array();
|
||||
$oWAWI->errormsg='';
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// HTML Output
|
||||
// ------------------------------------------------------------------------------------------
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>WAWI Bestellung - Suche</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="<?php echo $path;?>skin/vilesci.css" type="text/css">
|
||||
<link rel="stylesheet" href="<?php echo $path;?>include/js/jquery.css" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" href="<?php echo $path;?>include/js/tablesort/table.css" type="text/css">
|
||||
<script src="<?php echo $path;?>include/js/tablesort/table.js" type="text/javascript"></script>
|
||||
<script src="<?php echo $path;?>include/js/jquery.js" type="text/javascript"></script>
|
||||
<script src="<?php echo $path;?>include/js/jquery.autocomplete.js" type="text/javascript"></script>
|
||||
<script src="<?php echo $path;?>include/js/jquery.autocomplete.min.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 title="Anwender:<?php echo $uid ?>"> WAWI Bestellung - Suche </h1>
|
||||
<form name="sendform" action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<div>
|
||||
<table class="navbar">
|
||||
<tr>
|
||||
<!-- Bestellnr z.B. INFxxxx -->
|
||||
<td><label for="bestellnr">Bestellnr.</label> <input id="bestellnr" name="bestellnr" onchange="if (this.value.length>0) {setTimeout('document.sendform.submit()',1300);}" size="10" maxlength="30" type="Text" value="<?php echo $bestellnr; ?>" >
|
||||
<script type="text/javascript" language="JavaScript1.2">
|
||||
function formatItem(row)
|
||||
{
|
||||
return row[0] + " <i>" + row[1] + "</i> ";
|
||||
}
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#bestellnr').autocomplete('inventar_autocomplete.php',
|
||||
{
|
||||
minChars:4,
|
||||
scroll: true,
|
||||
scrollHeight: 300,
|
||||
width:500,
|
||||
formatItem:formatItem,
|
||||
extraParams:{'work':'wawi_bestellnr'}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
<!-- Bestell ID Eindeutigenummer -->
|
||||
<td><label for="bestellung_id">ID</label> <input id="bestellung_id" name="bestellung_id" maxlength="30" type="Text" value="<?php echo $bestellung_id; ?>" >
|
||||
<script type="text/javascript" language="JavaScript1.2">
|
||||
function formatItem(row)
|
||||
{
|
||||
return row[0] + " <i>" + row[1] + "</i> ";
|
||||
}
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#bestellung_id').autocomplete('inventar_autocomplete.php',
|
||||
{
|
||||
minChars:4,
|
||||
scroll: true,
|
||||
scrollHeight: 300,
|
||||
width:500,
|
||||
formatItem:formatItem,
|
||||
extraParams:{'work':'wawi_bestellung_id'}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
<!-- Lieferant - Vendor -->
|
||||
<td><label for="firma_id">Lieferant</label> <input id="firma_id" name="firma_id" size="10" maxlength="40" value="<?php echo $firma_id; ?>" >
|
||||
<script type="text/javascript" language="JavaScript1.2">
|
||||
function formatItem(row)
|
||||
{
|
||||
return row[0] + " <i>" + row[1] + "</i> ";
|
||||
}
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#firma_id').autocomplete('inventar_autocomplete.php',
|
||||
{
|
||||
minChars:4,
|
||||
scroll: true,
|
||||
scrollHeight: 300,
|
||||
width:500,
|
||||
formatItem:formatItem,
|
||||
extraParams:{'work':'wawi_firma_search'}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
<!-- Bestell-Jahr/Monat -->
|
||||
<td><label for="jahr_monat">Datum</label> <select id="jahr_monat" name="jahr_monat">
|
||||
<?php
|
||||
$jahr_monat_select=(!isset($_REQUEST['jahr_monat'])?date('Y-m'):$jahr_monat);
|
||||
$tmpJahr=(int)date("Y",mktime(0, 0, 0, 1, 1, date("Y")-12));
|
||||
for ($i=0;$i<12;$i++)
|
||||
{
|
||||
$tmpJahr=$tmpJahr + 1;
|
||||
$jjjjmm=$tmpJahr.'-00';
|
||||
echo '<option '.($jahr_monat_select==$tmpJahr?' selected="selected" ':'').' value="'.$tmpJahr.'" >-- '.$tmpJahr.' --</option>';
|
||||
for ($ii=1;$ii<=12;$ii++)
|
||||
{
|
||||
$jjjjm=$tmpJahr.'-'.$ii;
|
||||
$jjjjmm=$tmpJahr.'-'.($ii<10?'0'."$ii":$ii);
|
||||
echo '<option '.($jahr_monat_select==$jjjjm || $jahr_monat_select==$jjjjmm?' selected="selected" ':'').' value="'.$jjjjmm.'"> '.$jjjjmm.' </option>';
|
||||
if ($tmpJahr==date("Y") && $ii==date("m"))
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<option <?php echo ($jahr_monat_select=='-' || empty($jahr_monat_select) ?' selected="selected" ':''); ?> value=""> - </option></select>
|
||||
</td>
|
||||
<!-- Positionswert je VE Wert groesser -->
|
||||
<td><label for="pos_wert">Pos.Wert gr.</label> <input id="pos_wert" name="pos_wert" size="5" maxlength="10" type="Text" value="<?php echo $pos_wert; ?>" > </td>
|
||||
<!-- Buttom suche -->
|
||||
<td class="ac_submit"> <a href="javascript:document.sendform.submit();"><img src="../../skin/images/application_go.png" alt="suchen" /> suchen</a> <input style="display:none;" name="debug" value="<?php echo $debug;?>"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="ext_search" style="display:<?php echo ($extend_search && $extend_search!='false'?'block':'none'); ?>;">
|
||||
<table class="navbar">
|
||||
<tr>
|
||||
<td><label for="titel">Bezeichnung</label> <input id="titel" name="titel" size="26" maxlength="60" type="Text" value="<?php echo $titel; ?>" > </td>
|
||||
<td><label for="besteller">Besteller</label> <input id="besteller" name="besteller" size="10" maxlength="60" type="Text" value="<?php echo $besteller; ?>" > </td> <td><label for="kostenstelle_id">Kostenstelle ID</label> <input id="kostenstelle_id" name="kostenstelle_id" size="8" maxlength="10" type="Text" value="<?php echo $kostenstelle_id; ?>" >
|
||||
<script type="text/javascript" language="JavaScript1.2">
|
||||
function formatItem(row)
|
||||
{
|
||||
return row[0] + " <i>" + row[1] + "</i> ";
|
||||
}
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#kostenstelle_id').autocomplete('inventar_autocomplete.php',
|
||||
{
|
||||
minChars:4,
|
||||
scroll: true,
|
||||
scrollHeight: 200,
|
||||
width:500,
|
||||
formatItem:formatItem,
|
||||
extraParams:{'work':'wawi_kostenstelle_search'}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
<td><label for="konto_id">Konto</label> <input id="konto_id" name="konto_id" size="4" maxlength="10" type="Text" value="<?php echo $konto_id; ?>" >
|
||||
<script type="text/javascript" language="JavaScript1.2">
|
||||
function formatItem(row)
|
||||
{
|
||||
return row[0] + " <i>" + row[1] + "</i> ";
|
||||
}
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#konto_id').autocomplete('inventar_autocomplete.php',
|
||||
{
|
||||
minChars:2,
|
||||
scroll: true,
|
||||
scrollHeight: 200,
|
||||
width:500,
|
||||
formatItem:formatItem,
|
||||
extraParams:{'work':'wawi_konto_search'}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
<td><label for="studiengang_id">Stg.Kz</label> <input id="studiengang_id" name="studiengang_id" size="5" maxlength="10" type="Text" value="<?php echo $studiengang_id; ?>" >
|
||||
<script type="text/javascript" language="JavaScript1.2">
|
||||
function formatItem(row)
|
||||
{
|
||||
return row[0] + " <i>" + row[1] + "</i> ";
|
||||
}
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#studiengang_id').autocomplete('inventar_autocomplete.php',
|
||||
{
|
||||
minChars:1,
|
||||
scroll: true,
|
||||
scrollHeight: 200,
|
||||
width:500,
|
||||
formatItem:formatItem,
|
||||
extraParams:{'work':'wawi_studiengang_search'
|
||||
,'kostenstelle_id':$("#kostenstelle_id").val() }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- erweiterte SUCHE EIN -->
|
||||
<div>
|
||||
<div id="extend_search_on"><div style="cursor: pointer;">
|
||||
<table class="navbar">
|
||||
<tr>
|
||||
<td><img src="../../skin/images/right.png" alt="anzeigen - show" />Erweiterte Suche anzeigen / ausblenden <input style="display:none;" type="text" id="extend_search" name="extend_search" value="<?php echo $extend_search;?>"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" language="JavaScript1.2">
|
||||
$(document).ready(function()
|
||||
{ // Pr�ft, ob das Dokument geladen ist
|
||||
$("div#extend_search_on").click(function(event)
|
||||
{ // Bei Klick auf div#
|
||||
if ( $("#extend_search").val() != 'true')
|
||||
{
|
||||
$("div#ext_search").show("slow"); // div# langsam �ffnen
|
||||
$("#extend_search").val('true')
|
||||
}
|
||||
else
|
||||
{
|
||||
$("div#ext_search").hide("slow"); // div# langsam verbergen
|
||||
$("#extend_search").val('false')
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</form>
|
||||
<hr>
|
||||
<?php
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Datenlesen
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// wenn eine kpl. Bestellnummer eingegeben wurde sind Selectwerte zu leeren sonst wird nichts gefunden
|
||||
if (strlen($bestellnr)>8 || strlen($bestellung_id)>4)
|
||||
{
|
||||
$jahr_monat='';
|
||||
$pos_wert='';
|
||||
}
|
||||
if ($pos_wert=='0' || !is_numeric($pos_wert))
|
||||
$pos_wert='';
|
||||
if ($jahr_monat=='0')
|
||||
$jahr_monat='';
|
||||
$check=$firma_id.$jahr_monat.$bestellung_id.$bestellnr.$besteller.$titel.$kostenstelle_id.$konto_id.$studiengang_id.$pos_wert;
|
||||
if ($check!='' && !$oWAWI->bestellung($firma_id,$jahr_monat,$bestellung_id,$bestellnr,$besteller,$titel,$kostenstelle_id,$konto_id,$studiengang_id,$pos_wert))
|
||||
$errormsg[]=$oWAWI->errormsg;
|
||||
|
||||
// Pruefen ob nur EINE Bestellung gefunden wurde : ja - keine Liste - die Positionen dazu anzeigen
|
||||
if (is_array($oWAWI->result) && count($oWAWI->result)==1)
|
||||
{
|
||||
if (empty($bestellung_id) && isset($oWAWI->result[0]->bestellung_id) )
|
||||
$bestellung_id=$oWAWI->result[0]->bestellung_id;
|
||||
if (empty($bestellnr) && isset($oWAWI->result[0]->bestellnr) )
|
||||
$bestellnr=$oWAWI->result[0]->bestellnr;
|
||||
$result_old = $oWAWI->result;
|
||||
$oWAWI->result=array();
|
||||
$oWAWI->errormsg='';
|
||||
|
||||
if (!empty($check) && !$oWAWI->bestellpositionen($bestellung_id,$bestellnr))
|
||||
$errormsg[]=$oWAWI->errormsg;
|
||||
// Ausgabe Bestelldetailanzeige
|
||||
if(count($oWAWI->result)==0)
|
||||
{
|
||||
//wenn keine Bestellpositionen vorhanden sind, dann nur die Uebersichtsdaten anzeigen
|
||||
echo output_bestellposition($result_old,$schreib_recht,$debug);
|
||||
}
|
||||
else
|
||||
echo output_bestellposition($oWAWI->result,$schreib_recht,$debug);
|
||||
}
|
||||
else if (is_array($oWAWI->result) && count($oWAWI->result)>1)
|
||||
{
|
||||
// Ausgabe Bestellungen in Listenform
|
||||
echo output_bestellung($oWAWI->result,$schreib_recht,$debug);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!empty($check) )
|
||||
$errormsg[]='keine Daten gefunden';
|
||||
else
|
||||
$errormsg[]='Auswahl fehlt';
|
||||
}
|
||||
// Meldungen ausgeben
|
||||
if (is_array($errormsg) && count($errormsg)>0)
|
||||
echo '<font class="error">'. implode("<br />",$errormsg).'</font>';
|
||||
else if (!is_array($errormsg))
|
||||
echo '<font class="error"><br />'.$errormsg.'</font>';
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Ausgabe der Bestellungen in Listenform
|
||||
function output_bestellung($resultBestellung=null,$schreib_recht=false,$debug=false)
|
||||
{
|
||||
// Initialisierung
|
||||
$htmlstring='';
|
||||
|
||||
// Plausib - Pruefung
|
||||
if (is_null($resultBestellung) || !is_array($resultBestellung) || count($resultBestellung)<1)
|
||||
return $htmlstring;
|
||||
|
||||
// Classen
|
||||
if (!$oWAWI = new wawi())
|
||||
die($oWAWI->errormsg . ($debug?' *** File:='.__FILE__.' Line:='.__LINE__:'') );
|
||||
$oWAWI->debug=$debug;
|
||||
$oWAWI->errormsg='';
|
||||
$oWAWI->result=array();
|
||||
|
||||
if (!$oBetriebsmittel = new betriebsmittel())
|
||||
die($oBetriebsmittel->errormsg.($debug?' *** File:='.__FILE__.' Line:='.__LINE__:'') );
|
||||
$oBetriebsmittel->debug=$debug;
|
||||
$oBetriebsmittel->errormsg='';
|
||||
$oBetriebsmittel->result=array();
|
||||
|
||||
// HTML - Outputstring
|
||||
$htmlstring.='<table id="t1" class="liste table-autosort:2 table-stripeclass:alternate table-autostripe">
|
||||
<thead>';
|
||||
if (is_array($resultBestellung) && count($resultBestellung)>1)
|
||||
$htmlstring.='<tr><th colspan="10">Bitte eine Bestellnummer aus den '.count($resultBestellung).' gefundenen auswählen</th></tr>';
|
||||
$htmlstring.='<tr class="liste">
|
||||
<th class="table-sortable:default">Bestellnr.</th>
|
||||
<th class="table-sortable:default">ID</th>
|
||||
<th class="table-sortable:default">Bezeichnung</th>
|
||||
<th class="table-sortable:default">Lieferant</th>
|
||||
<th class="table-sortable:default">Nr.</th>
|
||||
<th class="table-sortable:default">Status</th>
|
||||
<th class="table-sortable:default">Inventar</th>
|
||||
</tr>
|
||||
</thead>
|
||||
';
|
||||
// Listenausgabe der Bestellungen
|
||||
for ($pos=0;$pos<count($resultBestellung);$pos++)
|
||||
{
|
||||
|
||||
if ($pos%2)
|
||||
$classe='liste1';
|
||||
else
|
||||
$classe='liste0';
|
||||
|
||||
$status='';
|
||||
if (!empty($resultBestellung[$pos]->geliefert))
|
||||
$status='<img src="../../skin/images/bullet_green.png" alt="" title="Lieferung am '.$resultBestellung[$pos]->geliefert.'" > Lieferung '.$resultBestellung[$pos]->geliefert;
|
||||
else if (!empty($resultBestellung[$pos]->freigb_kst))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe KST am '.$resultBestellung[$pos]->freigb_kst.'" > Freigabe '.$resultBestellung[$pos]->freigb_kst;
|
||||
else if (!empty($resultBestellung[$pos]->freigb_stg))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe STG am '.$resultBestellung[$pos]->freigb_kst.'" Freigabe '.$resultBestellung[$pos]->freigb_stg;
|
||||
else if (!empty($resultBestellung[$pos]->freigb_gst))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe GST am '.$resultBestellung[$pos]->freigb_kst.'" > Freigabe '.$resultBestellung[$pos]->freigb_gst;
|
||||
else if (!empty($resultBestellung[$pos]->freigb_rek))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe REK am '.$resultBestellung[$pos]->freigb_kst.'" > Freigabe '.$resultBestellung[$pos]->freigb_rek;
|
||||
else if (!empty($resultBestellung[$pos]->freigabe_gmb))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe GMB am '.$resultBestellung[$pos]->freigb_kst.'" > Freigabe '.$resultBestellung[$pos]->freigabe_gmb;
|
||||
else if (!empty($resultBestellung[$pos]->bestellung))
|
||||
$status='<img src="../../skin/images/bullet_red.png" alt="" title="Bestellung am '.$resultBestellung[$pos]->bestellung.'" > Bestellung '.$resultBestellung[$pos]->bestellung;
|
||||
else
|
||||
$status='<img src="../../skin/images/bullet_black.png" alt="" title="Anlage am '.$resultBestellung[$pos]->erstellung.'" > Anlage '.$resultBestellung[$pos]->erstellung;
|
||||
|
||||
$htmlstring.='<!-- Bestellungen Auflisten -->
|
||||
<tr class="'.$classe.'" style="font-size:smaller;">
|
||||
<td><a title="Detail Bestellnummer '.$resultBestellung[$pos]->bestellnr.'" href="'.$_SERVER["PHP_SELF"].'?bestellung_id=&bestellnr='.urlencode($resultBestellung[$pos]->bestellnr).'&jahr_monat=">'.$resultBestellung[$pos]->bestellnr.'</a></td>
|
||||
<td align="right"><a title="Detail Bestell-ID '.$resultBestellung[$pos]->bestellung_id.'" href="'.$_SERVER["PHP_SELF"].'?bestellung_id='.$resultBestellung[$pos]->bestellung_id.'&bestellnr=&jahr_monat=">'.$resultBestellung[$pos]->bestellung_id.'</a></td>
|
||||
|
||||
<td>'.StringCut($resultBestellung[$pos]->titel,25) .'</td>
|
||||
|
||||
<!-- Firmen -->
|
||||
<td>'.StringCut($resultBestellung[$pos]->firmenname,25).'</td>
|
||||
<td align="right"><a href="firma_detail.php?firma_id='.$resultBestellung[$pos]->firma_id.'">'.$resultBestellung[$pos]->firma_id.'</a></td>
|
||||
|
||||
<td> '.$status.' </td>';
|
||||
|
||||
$oBetriebsmittel->result=array();
|
||||
if (!isset($resultBestellung[$pos]->geliefert) || empty($resultBestellung[$pos]->geliefert))
|
||||
$htmlstring.='<td align="right"> <a title="Detail Bestell ID '.$resultBestellung[$pos]->bestellung_id.'" href="'.$_SERVER["PHP_SELF"].'?bestellung_id='.$resultBestellung[$pos]->bestellung_id.'&bestelldetail_id=&bestellnr=&betriebsmittelstatus_kurzbz=">Status <img src="../../skin/images/information.png" alt="Status" ></a> </td>';
|
||||
elseif ($oBetriebsmittel->load_bestellung_id($resultBestellung[$pos]->bestellung_id,null))
|
||||
$htmlstring.='<td align="right"> <a title="Inventar Anzeige Bestell-ID '.$resultBestellung[$pos]->bestellung_id.'" href="inventar.php?bestellung_id='.$resultBestellung[$pos]->bestellung_id.'&bestelldetail_id=&bestellnr=&betriebsmittelstatus_kurzbz=">anzeigen <img src="../../skin/images/application_go.png" alt="Bestellung '.$resultBestellung[$pos]->bestellnr.'" ></a> </td>';
|
||||
elseif ($schreib_recht)
|
||||
$htmlstring.='<td align="right"> <a title="Inventar Neuanlage Bestell-ID '.$resultBestellung[$pos]->bestellung_id.'" href="inventar_pflege.php?bestellung_id='.$resultBestellung[$pos]->bestellung_id.'&bestelldetail_id=&bestellnr=&betriebsmittelstatus_kurzbz=">neuanlage <img src="../../skin/images/application_form_edit.png" alt="Bestellung '.$resultBestellung[$pos]->bestellnr.'" ></a> </td>';
|
||||
else
|
||||
$htmlstring.='<td align="right"> <a title="Detail Bestell-ID '.$resultBestellung[$pos]->bestellung_id.'" href="'.$_SERVER["PHP_SELF"].'?bestellung_id='.$resultBestellung[$pos]->bestellung_id.'&bestelldetail_id=&bestellnr=&betriebsmittelstatus_kurzbz=">Status <img src="../../skin/images/information.png" alt="Status" ></a> </td>';
|
||||
$htmlstring.='</tr>';
|
||||
}
|
||||
$htmlstring.='</table>';
|
||||
return $htmlstring;
|
||||
}
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Ausgabe der Bestellpositionen in Listenform bei einer Bestellung
|
||||
function output_bestellposition($resultBestellungPos=null,$schreib_recht=false,$debug=false)
|
||||
{
|
||||
// Initialisierung
|
||||
$htmlstring='';
|
||||
// Plausib - Pruefung
|
||||
if (is_null($resultBestellungPos) || !is_array($resultBestellungPos) || count($resultBestellungPos)<1)
|
||||
return $htmlstring;
|
||||
|
||||
// Classen
|
||||
if (!$oWAWI = new wawi())
|
||||
die($oWAWI->errormsg . ($debug?' *** File:='.__FILE__.' Line:='.__LINE__:'') );
|
||||
$oWAWI->debug=$debug;
|
||||
$oWAWI->errormsg='';
|
||||
$oWAWI->result=array();
|
||||
|
||||
if (!$oBetriebsmittel = new betriebsmittel())
|
||||
die($oBetriebsmittel->errormsg . ($debug?' *** File:='.__FILE__.' Line:='.__LINE__:'') );
|
||||
$oBetriebsmittel->debug=$debug;
|
||||
$oBetriebsmittel->errormsg='';
|
||||
$oBetriebsmittel->result=array();
|
||||
|
||||
// Wawi Besteller - Namen ermitteln
|
||||
if ($oWAWI->benutzer(null,$resultBestellungPos[0]->besteller))
|
||||
$besteller=$oWAWI->result[0]->anrede.' '.$oWAWI->result[0]->vname.' '.$oWAWI->result[0]->nname;
|
||||
else
|
||||
$besteller=$resultBestellungPos[0]->besteller;
|
||||
// Wawi Kontaktperson - Namen zusammen stellen
|
||||
$kontaktperson=$resultBestellungPos[0]->kontaktperson_anrede.' '.$resultBestellungPos[0]->kontaktperson_vname.' '.$resultBestellungPos[0]->kontaktperson_nname;
|
||||
// Bestellstatus ermitteln
|
||||
if ($resultBestellungPos[0]->freigb_kst != '')
|
||||
$freigabe=' Kst '.$resultBestellungPos[0]->freigb_kst;
|
||||
elseif ($resultBestellungPos[0]->freigb_stg != '')
|
||||
$freigabe=' Stg '.$resultBestellungPos[0]->freigb_stg;
|
||||
elseif ($resultBestellungPos[0]->freigb_gst != '')
|
||||
$freigabe=' Gst '.$resultBestellungPos[0]->freigb_gst;
|
||||
elseif ($resultBestellungPos[0]->freigb_rek != '')
|
||||
$freigabe=' Rek '.$resultBestellungPos[0]->freigb_rek;
|
||||
elseif ($resultBestellungPos[0]->freigabe_gmb != '')
|
||||
$freigabe=' Gmb '.$resultBestellungPos[0]->freigabe_gmb;
|
||||
else
|
||||
$freigabe='';
|
||||
// Lieferstatus ermitteln
|
||||
$status='';
|
||||
if (!empty($resultBestellungPos[0]->geliefert))
|
||||
$status='<img src="../../skin/images/bullet_green.png" alt="" title="Geliefert am '.$resultBestellungPos[0]->geliefert.'" > Geliefert '.$resultBestellungPos[0]->geliefert;
|
||||
else if (!empty($resultBestellungPos[0]->freigb_kst))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe KST am '.$resultBestellungPos[0]->freigb_kst.'" > Freigabe '.$resultBestellungPos[0]->freigb_kst;
|
||||
else if (!empty($resultBestellungPos[0]->freigb_stg))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe STG am '.$resultBestellungPos[0]->freigb_kst.'" > Freigabe '.$resultBestellungPos[0]->freigb_stg;
|
||||
else if (!empty($resultBestellungPos[0]->freigb_gst))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe GST am '.$resultBestellungPos[0]->freigb_kst.'" > Freigabe '.$resultBestellungPos[0]->freigb_gst;
|
||||
else if (!empty($resultBestellungPos[0]->freigb_rek))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe REK am '.$resultBestellungPos[0]->freigb_kst.'" > Freigabe '.$resultBestellungPos[0]->freigb_rek;
|
||||
else if (!empty($resultBestellungPos[0]->freigabe_gmb))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe GMB am '.$resultBestellungPos[0]->freigb_kst.'" > Freigabe '.$resultBestellungPos[0]->freigabe_gmb;
|
||||
else if (!empty($resultBestellungPos[0]->bestellung))
|
||||
$status='<img src="../../skin/images/bullet_red.png" alt="" title="Bestellt am '.$resultBestellungPos[0]->bestellung.'" > Bestellt '.$resultBestellungPos[0]->bestellung;
|
||||
else
|
||||
$status='<img src="../../skin/images/bullet_black.png" alt="" title="Erstellt am '.$resultBestellungPos[0]->erstellung.'" > Anlage '.$resultBestellungPos[0]->erstellung;
|
||||
|
||||
|
||||
// Wawi - Bestelldetail - Ausgabe START
|
||||
$htmlstring.='<fieldset><legend>Bestelldetail '.$resultBestellungPos[0]->bestellnr.'</legend>';
|
||||
$htmlstring.='<fieldset><legend>Besteller </legend>';
|
||||
$htmlstring.='<table class="liste">
|
||||
<tr class="liste1">
|
||||
<th align="right">Bestellnr.</th>
|
||||
<td width="90%">'.$resultBestellungPos[0]->bestellnr.'</td>
|
||||
</tr>
|
||||
<tr class="liste1">
|
||||
<th align="right">Bestell ID</th>
|
||||
<td>'.$resultBestellungPos[0]->bestellung_id.'</a></td>
|
||||
</tr>
|
||||
|
||||
<tr class="liste1">
|
||||
<th align="right">Bestelltitel</th>
|
||||
<td width="90%">'.$resultBestellungPos[0]->titel.'</td>
|
||||
</tr>
|
||||
|
||||
<tr class="liste1">
|
||||
<th align="right">Firmenname</th>
|
||||
<td><a href="firma_detail.php?firma_id='.$resultBestellungPos[0]->firma_id.'">'.$resultBestellungPos[0]->firma_id.' '.$resultBestellungPos[0]->firmenname.'</a></td>
|
||||
</tr>
|
||||
<tr class="liste1">
|
||||
<th align="right">Studiengangkz.</th>
|
||||
<td><a href="studiengang_detail.php?studiengang_id='.(!empty($resultBestellungPos[0]->studiengang_id)?$resultBestellungPos[0]->studiengang_id:(isset($resultBestellungPos[0]->studiengang_kostenstelle_studiengang_id)?$resultBestellungPos[0]->studiengang_kostenstelle_studiengang_id:'')).'">'.(!empty($resultBestellungPos[0]->studiengang_id)?$resultBestellungPos[0]->studiengang_id:(isset($resultBestellungPos[0]->studiengang_kostenstelle_studiengang_id)?$resultBestellungPos[0]->studiengang_kostenstelle_studiengang_id:'')).' '.(isset($resultBestellungPos[0]->studiengang_bezeichnung) && !empty($resultBestellungPos[0]->studiengang_bezeichnung)?$resultBestellungPos[0]->studiengang_bezeichnung:(isset($resultBestellungPos[0]->studiengang_kostenstelle_bezeichnung)?$resultBestellungPos[0]->studiengang_kostenstelle_bezeichnung:'')).'</a></td>
|
||||
</tr>
|
||||
<tr class="liste1">
|
||||
<th align="right">Kostenstelle</th>
|
||||
<td><a href="kostenstelle_detail.php?kostenstelle_id='.$resultBestellungPos[0]->kostenstelle_id.'">'.$resultBestellungPos[0]->kostenstelle_id.' '.(isset($resultBestellungPos[0]->kostenstelle_bezeichnung)?$resultBestellungPos[0]->kostenstelle_bezeichnung:'').'</a></td>
|
||||
</tr>
|
||||
<tr class="liste1">
|
||||
<th align="right">Konto</th>
|
||||
<td><a href="konto_detail.php?konto_id='.$resultBestellungPos[0]->konto_id.'">'.$resultBestellungPos[0]->konto_id.' '.(isset($resultBestellungPos[0]->konto_beschreibung)?$resultBestellungPos[0]->konto_beschreibung:'').'</a></td>
|
||||
</tr>
|
||||
<tr class="liste1">
|
||||
<th align="right">Kontaktperson</th>
|
||||
<td title="user '.$resultBestellungPos[0]->kontaktperson_username.'">'.($resultBestellungPos[0]->kontaktperson_email?'<a title="'.$resultBestellungPos[0]->kontaktperson_email.'" href="mailto:'.$resultBestellungPos[0]->kontaktperson_email.'&subject=Bestellung '.urlencode($resultBestellungPos[0]->bestellnr).' '.$resultBestellungPos[0]->titel.' '.$resultBestellungPos[0]->beschreibung.'"><img src="../../skin/images/email.png" alt="email" > ':'').$kontaktperson.' '.($resultBestellungPos[0]->kontaktperson_email?'</a>':'').' </td>
|
||||
</tr>
|
||||
<tr class="liste1">
|
||||
<th align="right">Besteller</th>
|
||||
<td>'.($resultBestellungPos[0]->besteller?'<a title="'.$resultBestellungPos[0]->besteller.'" href="mailto:'.$resultBestellungPos[0]->besteller.'&subject=Bestellung '.urlencode($resultBestellungPos[0]->bestellnr).' - '.$resultBestellungPos[0]->titel.', '.$resultBestellungPos[0]->beschreibung.'"><img src="../../skin/images/email.png" alt="email" > ':'').$besteller.' '.($resultBestellungPos[0]->besteller?'</a>':'').' </td>
|
||||
</tr>
|
||||
</table>';
|
||||
$htmlstring.='</fieldset>';
|
||||
|
||||
$htmlstring.='<fieldset><legend>Information</legend>';
|
||||
$htmlstring.='<table class="liste">
|
||||
<tr>
|
||||
<thead>
|
||||
<th>Erstellt am</th>
|
||||
<th>Gesendet am</th>
|
||||
<th>Freigabe am</th>
|
||||
<th>Liefertermin</th>
|
||||
<th>Erledigt am</th>
|
||||
<th>Status</th>
|
||||
</thead>
|
||||
</tr>
|
||||
<tr class="liste1">
|
||||
<td>'.$resultBestellungPos[0]->erstellung.'</td>
|
||||
<td>'.$resultBestellungPos[0]->bestellung.'</td>
|
||||
<td> '.$freigabe.' </td>
|
||||
<td>'.$resultBestellungPos[0]->liefertermin.'</td>
|
||||
<td>'.$resultBestellungPos[0]->geliefert.'</td>
|
||||
<td> '.$status.' </td>
|
||||
</tr>
|
||||
</table>';
|
||||
$htmlstring.='</fieldset>';
|
||||
|
||||
$htmlstring.='<fieldset><legend>Positionen zu '.$resultBestellungPos[0]->titel.'</legend>';
|
||||
$htmlstring.='<table class="liste">
|
||||
<thead>
|
||||
<tr><th colspan="8">Positionen</th></tr>
|
||||
<tr>
|
||||
<th>Menge</th>
|
||||
<th>VE</th>
|
||||
<th>Beschreibung</th>
|
||||
<th>Artikel</th>
|
||||
|
||||
<th>Preis/VE</th>
|
||||
<th>Ust</th>
|
||||
<th>Pos.wert</th>
|
||||
<th>Inventar</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
';
|
||||
$summe_netto=0;
|
||||
$summe_brutto=0;
|
||||
for ($pos=0;$pos<count($resultBestellungPos);$pos++)
|
||||
{
|
||||
if(!isset($resultBestellungPos[$pos]->summe))
|
||||
continue;
|
||||
$status='';
|
||||
if (!empty($resultBestellungPos[$pos]->geliefert))
|
||||
$status='<img src="../../skin/images/bullet_green.png" alt="" title="Geliefert am '.$resultBestellungPos[$pos]->geliefert.'" > Geliefert '.$resultBestellungPos[$pos]->geliefert;
|
||||
else if (!empty($resultBestellungPos[$pos]->freigb_kst))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe KST am '.$resultBestellungPos[$pos]->freigb_kst.'" > Freigabe '.$resultBestellungPos[$pos]->freigb_kst;
|
||||
else if (!empty($resultBestellungPos[$pos]->freigb_stg))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe STG am '.$resultBestellungPos[$pos]->freigb_kst.'" > Freigabe '.$resultBestellungPos[$pos]->freigb_stg;
|
||||
else if (!empty($resultBestellungPos[$pos]->freigb_gst))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe GST am '.$resultBestellungPos[$pos]->freigb_kst.'" > Freigabe '.$resultBestellungPos[$pos]->freigb_gst;
|
||||
else if (!empty($resultBestellungPos[$pos]->freigb_rek))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe REK am '.$resultBestellungPos[$pos]->freigb_kst.'" > Freigabe '.$resultBestellungPos[$pos]->freigb_rek;
|
||||
else if (!empty($resultBestellungPos[$pos]->freigabe_gmb))
|
||||
$status='<img src="../../skin/images/bullet_orange.png" alt="" title="Freigabe GMB am '.$resultBestellungPos[$pos]->freigb_kst.'" > Freigabe '.$resultBestellungPos[$pos]->freigabe_gmb;
|
||||
else if (!empty($resultBestellungPos[$pos]->bestellung))
|
||||
$status='<img src="../../skin/images/bullet_red.png" alt="" title="Bestellt am '.$resultBestellungPos[$pos]->bestellung.'" > Bestellt '.$resultBestellungPos[$pos]->bestellung;
|
||||
else
|
||||
$status='<img src="../../skin/images/bullet_black.png" alt="" title="Erstellt am '.$resultBestellungPos[$pos]->erstellung.'" > Anlage '.$resultBestellungPos[$pos]->erstellung;
|
||||
|
||||
$summe_netto=$summe_netto+$resultBestellungPos[$pos]->summe;
|
||||
$brutto=$resultBestellungPos[$pos]->summe + (($resultBestellungPos[$pos]->summe/100)*$resultBestellungPos[$pos]->mwst);
|
||||
|
||||
if (empty($brutto))
|
||||
$brutto=0;
|
||||
$summe_brutto=$summe_brutto+$brutto;
|
||||
|
||||
if ($pos%2)
|
||||
$classe='liste1';
|
||||
else
|
||||
$classe='liste0';
|
||||
$summe=0;
|
||||
|
||||
// Wurde ein Position ausgewaehlt diese Markieren
|
||||
$bestelldetail_id=trim(isset($_REQUEST['bestelldetail_id'])?$_REQUEST['bestelldetail_id']:'');
|
||||
if ($resultBestellungPos[$pos]->bestelldetail_id==$bestelldetail_id)
|
||||
$htmlstring.='<tr class="'.$classe.'" style="background-color: #FAFAD2;">';
|
||||
else
|
||||
$htmlstring.='<tr class="'.$classe.'">';
|
||||
|
||||
$htmlstring.='<td align="right">'.number_format($resultBestellungPos[$pos]->menge, 2).'</td>
|
||||
<td>'.$resultBestellungPos[$pos]->ve.'</td>
|
||||
<td>'.$resultBestellungPos[$pos]->beschreibung.'</td>
|
||||
<td>'.$resultBestellungPos[$pos]->artikelnr.'</td>
|
||||
|
||||
<td align="right">'.number_format($resultBestellungPos[$pos]->preisve,2).'</td>
|
||||
|
||||
<td align="right">'.number_format($resultBestellungPos[$pos]->mwst, 0).'%</td>
|
||||
<td align="right">'.number_format($brutto,2).'</td>
|
||||
';
|
||||
$oBetriebsmittel->result=array();
|
||||
if (!isset($resultBestellungPos[$pos]->geliefert) || empty($resultBestellungPos[$pos]->geliefert))
|
||||
$htmlstring.='<td> - </td>';
|
||||
elseif ($oBetriebsmittel->load_bestellung_id($resultBestellungPos[$pos]->bestellung_id,$resultBestellungPos[$pos]->bestelldetail_id))
|
||||
$htmlstring.='<td> <a title="Inventar Anzeige Bestell-ID '.$resultBestellungPos[$pos]->bestelldetail_id.'" href="inventar.php?bestellung_id='.$resultBestellungPos[$pos]->bestellung_id.'&bestelldetail_id='.$resultBestellungPos[$pos]->bestelldetail_id.'&bestellnr=&betriebsmittelstatus_kurzbz=">anzeigen<img src="../../skin/images/right.gif" alt="Bestellung '.$resultBestellungPos[$pos]->bestellnr.'-'.$resultBestellungPos[$pos]->bestelldetail_id.'" ></a> </td>';
|
||||
elseif ($oBetriebsmittel->load_bestellung_id($resultBestellungPos[$pos]->bestellung_id,null))
|
||||
$htmlstring.='<td> <a title="Inventar Anzeige Bestell-ID '.$resultBestellungPos[$pos]->bestelldetail_id.'" href="inventar.php?bestellung_id='.$resultBestellungPos[$pos]->bestellung_id.'&bestelldetail_id=&bestellnr=&betriebsmittelstatus_kurzbz=">anzeigen<img src="../../skin/images/right.gif" alt="Bestellung '.$resultBestellungPos[$pos]->bestellnr.'" ></a> </td>';
|
||||
elseif ($schreib_recht)
|
||||
$htmlstring.='<td> <a title="Inventar Neuanlage Bestell-ID '.$resultBestellungPos[$pos]->bestelldetail_id.'" href="inventar_pflege.php?bestellung_id='.$resultBestellungPos[$pos]->bestellung_id.'&bestelldetail_id='.$resultBestellungPos[$pos]->bestelldetail_id.'&betriebsmittelstatus_kurzbz=&anzahl='.number_format($resultBestellungPos[$pos]->menge,0).'">neuanlage<img src="../../skin/images/right.gif" alt="Bestellung '.$resultBestellungPos[$pos]->bestellnr.'-'.$resultBestellungPos[$pos]->bestelldetail_id.'" ></a> </td>';
|
||||
else
|
||||
$htmlstring.='<td> - </td>';
|
||||
$htmlstring.='</tr>';
|
||||
}
|
||||
$htmlstring.='<tr>
|
||||
<td colspan="8"><hr /></td>
|
||||
</tr>';
|
||||
$htmlstring.='<tr>
|
||||
<td colspan="6" align="right" nowrap> Summe Netto: </td>
|
||||
<td align="right">'.number_format($summe_netto, 2).'</td>
|
||||
</tr>';
|
||||
$htmlstring.='<tr>
|
||||
<td colspan="6" align="right" nowrap> Summe Brutto: </td>
|
||||
<td align="right">'.number_format($summe_brutto, 2).'</td>
|
||||
</tr>';
|
||||
$htmlstring.='</table>';
|
||||
$htmlstring.='</fieldset>';
|
||||
$htmlstring.='</fieldset>';
|
||||
$htmlstring.='<div style="width:100%;text-align:right;"><a href="javascript:history.back();"><img src="../../skin/images/cross.png" alt="schliessen" title="schliessen/close" /> zurück</a></div />';
|
||||
|
||||
return $htmlstring;
|
||||
}
|
||||
?>
|
||||
@@ -1,319 +0,0 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2008 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
|
||||
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
|
||||
*/
|
||||
|
||||
// ---------------- Vilesci Include Dateien einbinden
|
||||
$path='../../';
|
||||
|
||||
require_once($path.'config/vilesci.config.inc.php');
|
||||
require_once($path.'include/functions.inc.php');
|
||||
require_once($path.'include/benutzerberechtigung.class.php');
|
||||
require_once($path.'include/mitarbeiter.class.php');
|
||||
require_once($path.'include/wawi.class.php');
|
||||
|
||||
if (!$uid = get_uid())
|
||||
die('Keine UID gefunden ! <a href="javascript:history.back()">Zurück</a>');
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Variable Initialisieren
|
||||
// ------------------------------------------------------------------------------------------
|
||||
$errormsg=array();
|
||||
$berechtigung_kurzbz='wawi/inventar:begrenzt';
|
||||
$recht=false;
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Parameter Aufruf uebernehmen
|
||||
// ------------------------------------------------------------------------------------------
|
||||
$firma_id=trim(isset($_REQUEST['firma_id'])?$_REQUEST['firma_id']:(isset($_REQUEST['firma_id'])?$_REQUEST['firma_id']:''));
|
||||
$firma_search=trim((isset($_REQUEST['firma_search']) ? $_REQUEST['firma_search']:''));
|
||||
$debug=trim((isset($_REQUEST['debug']) ? $_REQUEST['debug']:false));
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Berechtigung
|
||||
// ------------------------------------------------------------------------------------------
|
||||
$oBenutzerberechtigung = new benutzerberechtigung();
|
||||
|
||||
// read Berechtigung
|
||||
if (!$oBenutzerberechtigung->getBerechtigungen($uid))
|
||||
die('Sie haben keine Berechtigung ! <a href="javascript:history.back()">Zurück</a>');
|
||||
|
||||
$recht=false;
|
||||
if($oBenutzerberechtigung->isBerechtigt($berechtigung_kurzbz,($oe_kurzbz?$oe_kurzbz:null),'s'))
|
||||
$recht=true;
|
||||
if (!$recht)
|
||||
die('Sie haben keine Berechtigung für diese Seite ! <a href="javascript:history.back()">Zurück</a>');
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Datenbankanbindung
|
||||
// ------------------------------------------------------------------------------------------
|
||||
if (!$oWAWI = new wawi())
|
||||
die('Fehler beim Verbinden mit der Datenbank '.($debug?$oWAWI->errormsg.' *** File:='.__FILE__.' Line:='.__LINE__:''));
|
||||
$oWAWI->debug=$debug;
|
||||
$oWAWI->result=array();
|
||||
$oWAWI->errormsg='';
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// HTML Output
|
||||
// ------------------------------------------------------------------------------------------
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>WAWI Firmen - Suche</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="<?php echo $path;?>skin/vilesci.css" type="text/css">
|
||||
<link rel="stylesheet" href="<?php echo $path;?>include/js/jquery.css" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" href="<?php echo $path;?>include/js/tablesort/table.css" type="text/css">
|
||||
<script src="<?php echo $path;?>include/js/tablesort/table.js" type="text/javascript"></script>
|
||||
<script src="<?php echo $path;?>include/js/jquery.js" type="text/javascript"></script>
|
||||
<script src="<?php echo $path;?>include/js/jquery.autocomplete.js" type="text/javascript"></script>
|
||||
<script src="<?php echo $path;?>include/js/jquery.autocomplete.min.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 title="Anwender:<?php echo $uid ?>"> WAWI Firmen - Suche </h1>
|
||||
<form name="sendform" action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<table class="navbar" style="border:0;width:100%;">
|
||||
<tr>
|
||||
|
||||
<!-- firma_id -->
|
||||
<td><label for="firma_id">ID</label>
|
||||
<input onchange="document.sendform.firma_search.value='';" id="firma_id" name="firma_id" size="5" maxlength="10" value="<?php echo $firma_id; ?>" />
|
||||
<script type="text/javascript">
|
||||
function selectItem(li) {
|
||||
return false;
|
||||
}
|
||||
function formatItem(row) {
|
||||
return row[0] + " <i>" + row[1] + "</i> ";
|
||||
}
|
||||
$(document).ready(function() {
|
||||
$('#firma_id').autocomplete('inventar_autocomplete.php', {
|
||||
minChars:3,
|
||||
matchSubset:1,matchContains:1,
|
||||
width:500,
|
||||
cacheLength:100,
|
||||
onItemSelect:selectItem,
|
||||
formatItem:formatItem,
|
||||
extraParams:{'work':'wawi_firma_id'}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
|
||||
<!-- firma_search -->
|
||||
<td><label for="firma_search">Bezeichnung</label>
|
||||
<input onchange="document.sendform.firma_id.value='';" id="firma_search" name="firma_search" size="40" maxlength="80" value="<?php echo $firma_search; ?>" />
|
||||
<script type="text/javascript">
|
||||
function selectItem(li) {
|
||||
return false;
|
||||
}
|
||||
function formatItem(row) {
|
||||
return row[0] + " <i>" + row[1] + "</i> ";
|
||||
}
|
||||
$(document).ready(function() {
|
||||
$('#firma_search').autocomplete('inventar_autocomplete.php', {
|
||||
minChars:4,
|
||||
matchSubset:1,matchContains:1,
|
||||
width:500,
|
||||
cacheLength:100,
|
||||
onItemSelect:selectItem,
|
||||
formatItem:formatItem,
|
||||
extraParams:{'work':'wawi_firma_search'}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
<td style="width:10%;background-color: #FFFFDD;"><a href="javascript:document.sendform.submit();"><img src="../../skin/images/application_go.png" alt="suchen" /> suchen</a> <input style="display:none;" name="debug" value="<?php echo $debug;?>"></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<hr />
|
||||
<?php
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Datenlesen
|
||||
// ------------------------------------------------------------------------------------------
|
||||
$oWAWI->errormsg='';
|
||||
$oWAWI->result=array();
|
||||
$check=$firma_id.$firma_search;
|
||||
if ($check!='' && !$oWAWI->firma($firma_id,$firma_search))
|
||||
$errormsg[]=$oWAWI->errormsg;
|
||||
|
||||
// check Datenlesen erfolgreich
|
||||
if (is_array($oWAWI->result) && count($oWAWI->result)==1)
|
||||
echo output_firmainformation($oWAWI->result,$debug);
|
||||
else if (is_array($oWAWI->result) && count($oWAWI->result)>1)
|
||||
echo output_firma($oWAWI->result,$debug);
|
||||
else
|
||||
{
|
||||
if ($check!='' )
|
||||
$errormsg[]='keine Daten gefunden';
|
||||
else
|
||||
$errormsg[]='Auswahl fehlt';
|
||||
}
|
||||
// Meldungen ausgeben
|
||||
if (is_array($errormsg) && count($errormsg)>0)
|
||||
echo '<font class="error">'. implode("<br />",$errormsg).'</font>';
|
||||
else if (!is_array($errormsg))
|
||||
echo '<font class="error"><br />'.$errormsg.'</font>';
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?php
|
||||
function output_firma($resultFirma=null,$debug=false)
|
||||
{
|
||||
$htmlstring='';
|
||||
if (is_null($resultFirma) || !is_array($resultFirma) || count($resultFirma)<1)
|
||||
return $htmlstring;
|
||||
|
||||
$htmlstring.='<table id="t1" class="liste table-autosort:2 table-stripeclass:alternate table-autostripe">
|
||||
<thead>';
|
||||
if (is_array($resultFirma) && count($resultFirma)>1)
|
||||
$htmlstring.='<tr><th colspan="10">Bitte eine Firmennummer aus den '.count($resultFirma).' gefundenen auswählen</th></tr>';
|
||||
$htmlstring.='<tr class="liste">
|
||||
<th class="table-sortable:default">ID</th>
|
||||
<th class="table-sortable:default">Firmenname</th>
|
||||
<th class="table-sortable:default">Plz.Ort</th>
|
||||
<th class="table-sortable:default">Strasse</th>
|
||||
<th class="table-sortable:default" style="font-size:x-small;">Bestellung</th>
|
||||
</tr>
|
||||
</thead>
|
||||
';
|
||||
for ($pos=0;$pos<count($resultFirma);$pos++)
|
||||
{
|
||||
if ($pos%2)
|
||||
$classe='liste1';
|
||||
else
|
||||
$classe='liste0';
|
||||
$htmlstring.='<!-- firma_id Auflistung -->
|
||||
<tr class="'.$classe.'">
|
||||
<td><a title="Detail firma_id '.$resultFirma[$pos]->firma_id.'" href="'.$_SERVER["PHP_SELF"].'?firma_id='.$resultFirma[$pos]->firma_id.'">'.$resultFirma[$pos]->firma_id.'</a></td>
|
||||
<td>'.StringCut($resultFirma[$pos]->firmenname,30).'</td>
|
||||
<td>'.$resultFirma[$pos]->plz.' '.StringCut($resultFirma[$pos]->ort,15).'</td>
|
||||
<td>'.StringCut($resultFirma[$pos]->strasse,20).'</td>
|
||||
<td><a title="Bestellungen zum firma_id '.$resultFirma[$pos]->firma_id.' '.$resultFirma[$pos]->firmenname.'" href="bestellung.php?firma_id='.$resultFirma[$pos]->firma_id.'&jahr_monat='.date("Y").'">anzeigen<img src="../../skin/images/application_go.png" alt="Bestellungen anzeigen" /></a> </td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
$htmlstring.='</table>';
|
||||
return $htmlstring;
|
||||
}
|
||||
|
||||
function output_firmainformation($resultFirma=null,$debug=false)
|
||||
{
|
||||
$htmlstring='';
|
||||
if (is_null($resultFirma) || !is_array($resultFirma) || count($resultFirma)<1)
|
||||
return $htmlstring;
|
||||
|
||||
for ($pos=0;$pos<count($resultFirma);$pos++)
|
||||
{
|
||||
$htmlstring.='<fieldset><legend>Firma '.$resultFirma[$pos]->firma_id.' '.$resultFirma[$pos]->firmenname.'</legend>';
|
||||
$htmlstring.='<!-- Firma -->
|
||||
<table class="liste"> ';
|
||||
|
||||
if ($pos%2)
|
||||
$classe='liste1';
|
||||
else
|
||||
$classe='liste0';
|
||||
|
||||
$htmlstring.='<!-- firma_id Auflistung -->
|
||||
<tr class="'.$classe.'">
|
||||
<th align="right">ID </th>
|
||||
<td width="80%">'.$resultFirma[$pos]->firma_id.' </td>
|
||||
</tr>
|
||||
|
||||
<tr class="'.$classe.'">
|
||||
<th align="right">Kurzbez. </th>
|
||||
<td width="80%">'.$resultFirma[$pos]->kurzbezeichnung.' </td>
|
||||
</tr>
|
||||
|
||||
<tr class="'.$classe.'">
|
||||
<th align="right">Firmenname </th>
|
||||
<td>'.$resultFirma[$pos]->firmenname.($resultFirma[$pos]->anmerkung?'<br>'.$resultFirma[$pos]->anmerkung:'').' </td>
|
||||
</tr>
|
||||
|
||||
<tr class="'.$classe.'">
|
||||
<th align="right">Ansprechpartner </th>
|
||||
<td width="80%">'.($resultFirma[$pos]->email?'<a href="mailto:'.$resultFirma[$pos]->email.'?subject=Anfrage von '.$resultFirma[$pos]->anrede.' '.$resultFirma[$pos]->vname.' '.$resultFirma[$pos]->nname.'&body='.$resultFirma[$pos]->ansprechpartner.'"><img src="../../skin/images/email.png" alt="email" > </a>':'').$resultFirma[$pos]->ansprechpartner.' </td>
|
||||
</tr>
|
||||
|
||||
<tr class="'.$classe.'">
|
||||
<th align="right">Kundennummer </th>
|
||||
<td width="80%">'.$resultFirma[$pos]->kundennr.' </td>
|
||||
</tr>
|
||||
|
||||
<tr class="'.$classe.'">
|
||||
<th align="right">Tel </th>
|
||||
<td>'.$resultFirma[$pos]->telefon.' </td>
|
||||
</tr>
|
||||
<tr class="'.$classe.'">
|
||||
<th align="right">Fax </th>
|
||||
<td>'.$resultFirma[$pos]->telefax.' </td>
|
||||
</tr>
|
||||
|
||||
<tr class="'.$classe.'">
|
||||
<th align="right">WEB </th>
|
||||
<td>'.$resultFirma[$pos]->homepage.' </td>
|
||||
</tr>
|
||||
|
||||
<tr class="'.$classe.'">
|
||||
<th align="right">Adresse </th>
|
||||
<td>'.$resultFirma[$pos]->strasse.'<br>'.$resultFirma[$pos]->plz.' '.$resultFirma[$pos]->ort.' </td>
|
||||
</tr>
|
||||
';
|
||||
$htmlstring.='</table>';
|
||||
|
||||
$htmlstring.='<fieldset><legend>Verantwortlich </legend>';
|
||||
$htmlstring.='<table class="liste"> ';
|
||||
$htmlstring.='
|
||||
<tr class="'.$classe.'">
|
||||
<th align="right">Anwender </th>
|
||||
<td width="80%">'.($resultFirma[$pos]->mail?'<a href="mailto:'.$resultFirma[$pos]->mail.'?subject=Firma '.$resultFirma[$pos]->firma_id.' '.$resultFirma[$pos]->firmenname.' Ansprechpartner '.$resultFirma[$pos]->ansprechpartner.'&body='.$resultFirma[$pos]->anrede.' '.$resultFirma[$pos]->vname.' '.$resultFirma[$pos]->nname.'"><img src="../../skin/images/email.png" alt="email" > </a>':'').$resultFirma[$pos]->anrede.' '.$resultFirma[$pos]->vname.' '.$resultFirma[$pos]->nname.' </td>
|
||||
</tr>
|
||||
<tr class="'.$classe.'">
|
||||
<th align="right">Tel </th>
|
||||
<td>'.$resultFirma[$pos]->tel.' </td>
|
||||
</tr>
|
||||
<tr class="'.$classe.'">
|
||||
<th align="right">Fax </th>
|
||||
<td>'.$resultFirma[$pos]->fax.' </td>
|
||||
</tr>
|
||||
|
||||
|
||||
';
|
||||
$htmlstring.='</table>';
|
||||
$htmlstring.='</fieldset>';
|
||||
$htmlstring.='<table class="liste">
|
||||
<tr><td> </td></tr>
|
||||
<tr class="'.$classe.'">
|
||||
<th align="right">Bestellungen </th>
|
||||
<td width="80%"><a title="Bestellungen zum Firma '.$resultFirma[$pos]->firma_id.' '.$resultFirma[$pos]->firmenname.'" href="bestellung.php?firma_id='.$resultFirma[$pos]->firma_id.'&jahr_monat='.date("Y").'">anzeigen<img src="../../skin/images/application_go.png" alt="Bestellungen anzeigen" /></a> </td>
|
||||
</tr>
|
||||
</table>';
|
||||
$htmlstring.='</fieldset>';
|
||||
}
|
||||
$htmlstring.='<div style="width:100%;text-align:right;"><a href="javascript:history.back();"><img src="../../skin/images/cross.png" alt="schliessen" title="schliessen/close" /> zurück</a></div />';
|
||||
return $htmlstring;
|
||||
}
|
||||
?>
|
||||
@@ -929,7 +929,7 @@ function output_inventarposition($debug=false,$resultBetriebsmittel=null,$result
|
||||
|
||||
$htmlstring.='<tr>';
|
||||
$htmlstring.='<th align="right">Bestellnr. : </th>
|
||||
<td><a href="bestellung.php?bestellung_id='.$resBetriebsmittel->bestellung_id.' &bestelldetail_id='.$resBetriebsmittel->bestelldetail_id.'">'.$resBetriebsmittel->bestellnr.'</a></td>';
|
||||
<td><a href="../../wawi/bestellung.php?method=update&id='.$resBetriebsmittel->bestellung_id.'">'.$resBetriebsmittel->bestellnr.'</a></td>';
|
||||
|
||||
$htmlstring.='<th align="right" nowrap>Bestell ID. : </th>';
|
||||
|
||||
@@ -958,7 +958,7 @@ function output_inventarposition($debug=false,$resultBetriebsmittel=null,$result
|
||||
</td>
|
||||
</form>';
|
||||
else
|
||||
$htmlstring.='<td><a href="bestellung.php?bestellung_id='.$resBetriebsmittel->bestellung_id.' &bestelldetail_id='.$resBetriebsmittel->bestelldetail_id.'">'.$resBetriebsmittel->bestellung_id.'</a></td>';
|
||||
$htmlstring.='<td><a href="../../wawi/bestellung.php?method=update&id='.$resBetriebsmittel->bestellung_id.'">'.$resBetriebsmittel->bestellung_id.'</a></td>';
|
||||
|
||||
$htmlstring.='<th align="right" nowrap>Bestellpos. ID. : </th>';
|
||||
if ($schreib_recht && $resBetriebsmittel->bestellung_id)
|
||||
@@ -1004,7 +1004,7 @@ function output_inventarposition($debug=false,$resultBetriebsmittel=null,$result
|
||||
|
||||
$htmlstring.='<tr>
|
||||
<th align="right">Lieferant : </th>
|
||||
<td colspan="3"><a href="firma_detail.php?firma_id='.$resBetriebsmittel->firma_id.'">'.$resBetriebsmittel->firma_id.'</a> '.$resBetriebsmittel->firmenname.'</td>
|
||||
<td colspan="3">'.$resBetriebsmittel->firmenname.' ('.$resBetriebsmittel->firma_id.')</td>
|
||||
<th align="right">Hersteller : </th>
|
||||
<td>'.$resBetriebsmittel->hersteller.'</td>
|
||||
</tr>';
|
||||
|
||||
@@ -727,10 +727,10 @@ function output_inventarposition($debug=false,$resultBetriebsmittel=null,$result
|
||||
|
||||
$htmlstring.='<tr>
|
||||
<th align="right">Bestellnr. : </th>
|
||||
<td><a href="bestellung.php?bestellung_id='.$resBetriebsmittel->bestellung_id.' &bestelldetail_id='.$resBetriebsmittel->bestelldetail_id.'">'.$resBetriebsmittel->bestellnr.'</a></td>
|
||||
<td><a href="../../wawi/bestellung.php?method=update&id='.$resBetriebsmittel->bestellung_id.'">'.$resBetriebsmittel->bestellnr.'</a></td>
|
||||
|
||||
<th align="right" nowrap>Bestell ID. : </th>
|
||||
<td><a href="bestellung.php?bestellung_id='.$resBetriebsmittel->bestellung_id.' &bestelldetail_id='.$resBetriebsmittel->bestelldetail_id.'">'.$resBetriebsmittel->bestellung_id.'</a></td>
|
||||
<td><a href="../../wawi/bestellung.php?method=update&id='.$resBetriebsmittel->bestellung_id.'">'.$resBetriebsmittel->bestellung_id.'</a></td>
|
||||
|
||||
<th align="right" nowrap>Bestellpos. ID. : </th>
|
||||
';
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
if ($bestellung->getAllSearch($filter, '', '', '', '', '', '', '', '', '', '', ''))
|
||||
{
|
||||
foreach($bestellung->result as $row)
|
||||
echo html_entity_decode($row->bestellung_id).'|'.html_entity_decode($bestellung->insertamum).', '.html_entity_decode($row->bestell_nr).', '.html_entity_decode($row->titel).' '.html_entity_decode($row->bemerkung)."\n";
|
||||
echo html_entity_decode($row->bestell_nr).'|'.html_entity_decode($bestellung->insertamum).', '.html_entity_decode($row->bestell_nr).', '.html_entity_decode($row->titel).' '.html_entity_decode($row->bemerkung)."\n";
|
||||
}
|
||||
else
|
||||
exit($bestellung->errormsg."\n");
|
||||
|
||||
@@ -26,7 +26,6 @@ require_once('../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../include/mitarbeiter.class.php');
|
||||
require_once('../../include/ort.class.php');
|
||||
require_once('../../include/organisationseinheit.class.php');
|
||||
require_once('../../include/wawi.class.php');
|
||||
require_once('../../include/person.class.php');
|
||||
require_once('../../include/betriebsmittel.class.php');
|
||||
require_once('../../include/betriebsmittelperson.class.php');
|
||||
@@ -34,6 +33,7 @@ require_once('../../include/betriebsmitteltyp.class.php');
|
||||
require_once('../../include/betriebsmittelstatus.class.php');
|
||||
require_once('../../include/betriebsmittel_betriebsmittelstatus.class.php');
|
||||
require_once('../../include/datum.class.php');
|
||||
require_once('../../include/wawi_bestelldetail.class.php');
|
||||
|
||||
if (!$uid = get_uid())
|
||||
die('Keine UID gefunden ! <a href="javascript:history.back()">Zurück</a>');
|
||||
@@ -117,6 +117,7 @@ function output_inventar($debug=false,$resultBetriebsmittel=null,$resultBetriebs
|
||||
<th class="table-sortable:default">Ser.nr.</th>
|
||||
<th class="table-sortable:default">Ort</th>
|
||||
<th class="table-sortable:default">Bestellnr</th>
|
||||
<th class="table-sortable:default">BruttoEKP</th>
|
||||
<th class="table-sortable:default">Datum</th>
|
||||
<th class="table-sortable:default">Org.</th>
|
||||
<th class="table-sortable:default">Inventur</th>
|
||||
@@ -164,13 +165,18 @@ function output_inventar($debug=false,$resultBetriebsmittel=null,$resultBetriebs
|
||||
<td>'.$resultBetriebsmittel[$pos]->ort_kurzbz.' </td>
|
||||
';
|
||||
|
||||
$htmlstring.='<td align="right">'.$resultBetriebsmittel[$pos]->bestellnr.' </td>';
|
||||
/*
|
||||
$htmlstring.='<td align="right"><a href="../../wawi/bestellung.php?method=update&id='.$resultBetriebsmittel[$pos]->bestellung_id.'" target="_blank">'.$resultBetriebsmittel[$pos]->bestellnr.' </a></td>';
|
||||
|
||||
$htmlstring.='
|
||||
<td align="right">';
|
||||
$htmlstring.=$resultBetriebsmittel[$pos]->bestelldetail_id;
|
||||
if($resultBetriebsmittel[$pos]->bestelldetail_id!='')
|
||||
{
|
||||
$bestelldetail = new wawi_bestelldetail();
|
||||
$bestelldetail->load($resultBetriebsmittel[$pos]->bestelldetail_id);
|
||||
$htmlstring.= $bestelldetail->preisprove/100*(100+$bestelldetail->mwst);
|
||||
}
|
||||
$htmlstring.=' </td>';
|
||||
*/
|
||||
|
||||
$htmlstring.='<td><span style="display: none;">'.$resultBetriebsmittel[$pos]->betriebsmittelstatus_datum.'</span>'.$datum_obj->formatDatum($resultBetriebsmittel[$pos]->betriebsmittelstatus_datum,'d.m.Y').' </td>';
|
||||
$htmlstring.='<td>'.StringCut(($oOrganisationseinheit->bezeichnung?$oOrganisationseinheit->bezeichnung:$resultBetriebsmittel[$pos]->oe_kurzbz),20).' </td>';
|
||||
$htmlstring.='<td align="right">'.$datum_obj->formatDatum($resultBetriebsmittel[$pos]->inventuramum, 'Y-m-d').' </td>';
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ foreach($menu AS $m1)
|
||||
{
|
||||
if (isset($m2['permissions']) && !checkpermission($m2['permissions']))
|
||||
continue;
|
||||
echo "\n\t\t".'<img title="'.$m2['name'].'" src="../skin/images/bullet_go.png" alt="page go" border="0"> ';
|
||||
echo "\n\t\t".'<img title="'.$m2['name'].'" src="../skin/images/bullet_arrow_down.png" alt="page go" border="0"> ';
|
||||
if (isset($m2['link']))
|
||||
echo '<a href="'.$m2['link'].'" ';
|
||||
if (isset($m2['target']))
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
header( 'Pragma: no-cache' );
|
||||
header('Content-Type: text/html;charset=UTF-8');
|
||||
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../config/wawi.config.inc.php');
|
||||
require_once('auth.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
|
||||
Reference in New Issue
Block a user