mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Checkscript für Freigegebene aber nicht gelieferte Bestellungen
This commit is contained in:
@@ -0,0 +1,152 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 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> and
|
||||
* Karl Burkhart <burkhart@technikum-wien.at>.
|
||||
*/
|
||||
require_once '../config/wawi.config.inc.php';
|
||||
require_once('auth.php');
|
||||
|
||||
require_once '../include/wawi_konto.class.php';
|
||||
require_once '../include/wawi_bestellung.class.php';
|
||||
require_once '../include/wawi_kostenstelle.class.php';
|
||||
require_once '../include/wawi_bestelldetail.class.php';
|
||||
require_once '../include/wawi_aufteilung.class.php';
|
||||
require_once '../include/wawi_bestellstatus.class.php';
|
||||
require_once '../include/wawi_zahlungstyp.class.php';
|
||||
require_once '../include/datum.class.php';
|
||||
require_once '../include/firma.class.php';
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Checksrikpt für Bestellungen</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../skin/tablesort.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../skin/jquery.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../skin/fhcomplete.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../skin/wawi.css" type="text/css"/>
|
||||
<script type="text/javascript" src="../include/js/jquery.js"></script>
|
||||
<script type="text/javascript">
|
||||
function checkKst()
|
||||
{
|
||||
if(isNaN(document.checkForm.min.value) || isNaN(document.checkForm.max.value))
|
||||
{
|
||||
alert("Bitte geben Sie eine Nummer ein.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
|
||||
//$aktion = (isset($_GET['method'])?$_GET['method']:'');
|
||||
//echo "method: $aktion";
|
||||
$min = (isset($_POST['min'])?$_REQUEST['min']:'3');
|
||||
$max = (isset($_POST['max'])?$_REQUEST['max']:'42');
|
||||
|
||||
echo ' <form action ="check_bestellung.php?method=suche" method="post" name="checkForm">
|
||||
<table>
|
||||
<tr><td>min (Wochen): </td><td><input type="text" name="min" id="min" value="'.$min.'"></td></tr>
|
||||
<tr><td>max (Wochen): </td><td><input type="text" name="max" id="max" value="'.$max.'"></td></tr>
|
||||
<tr><td> </td><td><input type="submit" name="submit" value="anzeigen" onclick="return checkKst();"></td></tr>
|
||||
</table>
|
||||
</form>';
|
||||
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#checkTable").tablesorter(
|
||||
{
|
||||
sortList: [[4,1]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
|
||||
if(isset($_POST['submit']))
|
||||
{
|
||||
$date = new datum();
|
||||
$firma = new firma();
|
||||
if(is_numeric($min = $_POST['min']) && is_numeric($max = $_POST['max']))
|
||||
{
|
||||
$bestellung = new wawi_bestellung();
|
||||
$bestellung->loadBestellungForCheck($min, $max);
|
||||
|
||||
echo ' <table id="checkTable" class="tablesorter" width ="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Bestellnr.</th>
|
||||
<th>Bestell_ID</th>
|
||||
<th>Firma</th>
|
||||
<th>Erstellung</th>
|
||||
<th>Freigegeben</th>
|
||||
<th>Geliefert</th>
|
||||
<th>Brutto</th>
|
||||
<th>Titel</th>
|
||||
<th>Letze Änderung</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
foreach($bestellung->result as $row)
|
||||
{
|
||||
$firmenname = '';
|
||||
$geliefert ='nein';
|
||||
$status = new wawi_bestellstatus();
|
||||
if(is_numeric($row->firma_id))
|
||||
{
|
||||
$firma->load($row->firma_id);
|
||||
$firmenname = $firma->name;
|
||||
}
|
||||
if($row->freigegeben == '1')
|
||||
$freigegeben = 'ja';
|
||||
else
|
||||
$freigegeben = 'nein';
|
||||
|
||||
if($status->isStatiVorhanden($row->bestellung_id, 'Lieferung'))
|
||||
$geliefert = 'ja';
|
||||
|
||||
$brutto = $bestellung->getBrutto($row->bestellung_id);
|
||||
echo ' <tr>
|
||||
<td nowrap><a href="bestellung.php?method=update&id='.$row->bestellung_id.'" title="Bestellung bearbeiten"> <img src="../skin/images/edit_wawi.gif"></a><a href="bestellung.php?method=delete&id='.$row->bestellung_id.'" onclick="return conf_del()" title="Bestellung löschen"> <img src="../skin/images/delete_x.png"></a></td>
|
||||
<td>'.$row->bestell_nr.'</td>
|
||||
<td>'.$row->bestellung_id.'</td>
|
||||
<td>'.$firmenname.'</td>
|
||||
<td>'.$date->formatDatum($row->insertamum, "d.m.Y").'</td>
|
||||
<td>'.$freigegeben.'</td>
|
||||
<td>'.$geliefert.'</td>
|
||||
<td>'.number_format($brutto, 2, ",",".").'</td>
|
||||
<td>'.$row->titel.'</td>
|
||||
<td nowrap>'.$date->formatDatum($row->updateamum, "d.m.Y").' '.$row->updatevon.'</td>
|
||||
</tr>';
|
||||
}
|
||||
echo ' </tbody>
|
||||
</table>';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user