mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 23:42:17 +00:00
Rechnungen Syncro
Rechnungen Suchen
This commit is contained in:
@@ -146,7 +146,6 @@ if($aktion!='zip')
|
||||
LEFT JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom')
|
||||
AND public.tbl_benutzer.aktiv
|
||||
AND lehre.tbl_projektarbeit.note IS NULL
|
||||
";
|
||||
if ($stg_kz!='')
|
||||
$qry_termin.=" AND public.tbl_studiengang.studiengang_kz='$stg_kz'";
|
||||
|
||||
@@ -848,6 +848,8 @@ class benutzerberechtigung extends basis_db
|
||||
|
||||
if(!$all)
|
||||
{
|
||||
if(count($kst_id)==0)
|
||||
return array();
|
||||
$qry.="
|
||||
WHERE
|
||||
(";
|
||||
|
||||
@@ -43,12 +43,17 @@ $menu=array
|
||||
),
|
||||
'Benutzerbereich'=> array
|
||||
(
|
||||
'name'=>'Benutzerbereich', 'opener'=>'true', 'hide'=>'false','permissions'=>array('wawi/bestellung'),
|
||||
'name'=>'Benutzerbereich', 'opener'=>'true', 'hide'=>'false','permissions'=>array('wawi/bestellung','wawi/rechnung'),
|
||||
'Bestellung'=>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'),
|
||||
),
|
||||
'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'),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
@@ -496,6 +496,11 @@ class wawi_kostenstelle extends basis_db
|
||||
*/
|
||||
public function loadArray($array)
|
||||
{
|
||||
if(count($array)==0)
|
||||
{
|
||||
$this->result = array();
|
||||
return true;
|
||||
}
|
||||
$qry = 'SELECT * FROM wawi.tbl_kostenstelle WHERE kostenstelle_id IN('.$this->implode4SQL($array).') ORDER BY bezeichnung;';
|
||||
|
||||
if(!$this->db_query($qry))
|
||||
|
||||
@@ -0,0 +1,365 @@
|
||||
<?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>.
|
||||
*/
|
||||
/**
|
||||
* Klasse WaWi Rechnung
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
|
||||
class wawi_rechnung extends basis_db
|
||||
{
|
||||
public $rechnung_id; // serial
|
||||
public $bestellung_id; // int
|
||||
public $rechnungstyp_kurzbz;// varchar
|
||||
public $buchungsdatum; // date
|
||||
public $rechnungsnr; // varchar
|
||||
public $rechnungsdatum; // date
|
||||
public $transfer_datum; // date
|
||||
public $buchungstext; // text
|
||||
public $freigegeben; // boolean
|
||||
public $freigegebenamum; // timestamp
|
||||
public $freigegebenvon; // varchar
|
||||
public $updateamum; // timestamp
|
||||
public $updatevon; // varchar
|
||||
public $insertamum; // timestamp
|
||||
public $insertvon; // varchar
|
||||
|
||||
public $result = array();
|
||||
public $new; // bool
|
||||
|
||||
/**
|
||||
*
|
||||
* Konstruktor
|
||||
* @param rechnung_id der Rechnung die geladen werden soll (Default=null)
|
||||
*/
|
||||
public function __construct($rechnung_id = null)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if(!is_null($rechnung_id))
|
||||
$this->load($rechnung_id);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Lädt die Rechnung mit der Übergebenen ID
|
||||
* @param $rechnung_id der zu ladenden Rechnung
|
||||
*/
|
||||
public function load($rechnung_id)
|
||||
{
|
||||
if(!is_numeric($rechnung_id))
|
||||
{
|
||||
$this->errormsg='ID ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT * FROM wawi.tbl_rechnung WHERE rechnung_id = '".addslashes($rechnung_id)."'";
|
||||
|
||||
if(!$this->db_query($qry))
|
||||
{
|
||||
$this->errormsg ="Fehler bei der Datenbankabfrage.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->rechnung_id = $row->rechnung_id;
|
||||
$this->bestellung_id = $row->bestellung_id;
|
||||
$this->rechnungstyp_kurzbz = $row->rechnungstyp_kurzbz;
|
||||
$this->buchungsdatum = $row->buchungsdatum;
|
||||
$this->rechnungsnr = $row->rechnungsnr;
|
||||
$this->rechnungsdatum = $row->rechnungsdatum;
|
||||
$this->transfer_datum = $row->transfer_datum;
|
||||
$this->buchungstext = $row->buchungstext;
|
||||
$this->freigegeben = ($row->freigegeben=='t'?true:false);
|
||||
$this->freigegebenamum = $row->freigegebenamum;
|
||||
$this->freigegebenvon = $row->freigegebenvon;
|
||||
$this->updateamum = $row->updateamum;
|
||||
$this->updatevon = $row->updatevon;
|
||||
$this->insertamum = $row->insertamum;
|
||||
$this->insertvon = $row->insertvon;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg ="Fehler bei der Datenbankabfrage.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Laedt alle Rechnung anhand von verschiedenen Parametern
|
||||
*
|
||||
* @param $rechnungsnr
|
||||
* @param $rechnungsdatum_von
|
||||
* @param $rechnungsdatum_bis
|
||||
* @param $buchungsdatum_von
|
||||
* @param $buchungsdatum_bis
|
||||
* @param $erstelldatum_von
|
||||
* @param $erstelldatum_bis
|
||||
* @param $bestelldatum_von
|
||||
* @param $bestelldatum_bis
|
||||
* @param $buchungsnummer
|
||||
* @param $firma_id
|
||||
* @param $oe_kurzbz
|
||||
* @param $konto_id
|
||||
* @param $kostenstelle_id
|
||||
*/
|
||||
public function getAllSearch($rechnungsnr, $rechnungsdatum_von, $rechnungsdatum_bis, $buchungsdatum_von, $buchungsdatum_bis, $erstelldatum_von, $erstelldatum_bis, $bestelldatum_von, $bestelldatum_bis, $bestellnummer, $firma_id, $oe_kurzbz, $konto_id, $kostenstelle_id)
|
||||
{
|
||||
$first = true;
|
||||
$qry = "
|
||||
SELECT
|
||||
distinct on (tbl_rechnung.rechnung_id) tbl_rechnung.*
|
||||
FROM
|
||||
wawi.tbl_rechnung
|
||||
LEFT JOIN wawi.tbl_bestellung USING (bestellung_id)
|
||||
LEFT JOIN wawi.tbl_kostenstelle USING (kostenstelle_id)
|
||||
LEFT JOIN wawi.tbl_bestellung_bestellstatus status USING(bestellung_id)
|
||||
WHERE 1=1
|
||||
";
|
||||
|
||||
if ($rechnungsnr!='')
|
||||
$qry.= " AND UPPER(tbl_rechnung.rechnungsnr) LIKE UPPER('%$rechnungsnr%')";
|
||||
|
||||
if ($rechnungsdatum_von != '')
|
||||
$qry.= ' AND tbl_rechnung.rechnungsdatum >= '.$this->addslashes($rechnungsdatum_von);
|
||||
|
||||
if ($rechnungsdatum_bis != '')
|
||||
$qry.= ' AND tbl_rechnung.rechnungsdatum <= '.$this->addslashes($rechnungsdatum_bis);
|
||||
|
||||
if ($buchungsdatum_von != '')
|
||||
$qry.= ' AND tbl_rechnung.buchungsdatum >= '.$this->addslashes($buchungsdatum_von);
|
||||
|
||||
if ($buchungsdatum_bis != '')
|
||||
$qry.= ' AND tbl_rechnung.buchungsdatum <= '.$this->addslashes($buchungsdatum_bis);
|
||||
|
||||
if ($erstelldatum_von != '')
|
||||
$qry.= ' AND tbl_bestellung.insertamum >= '.$this->addslashes($erstelldatum_von);
|
||||
|
||||
if ($erstelldatum_bis != '')
|
||||
$qry.= ' AND tbl_bestellung.insertamum <= '.$this->addslashes($erstelldatum_bis);
|
||||
|
||||
if ($bestelldatum_von != '')
|
||||
$qry.= " AND status.bestellstatus_kurzbz = 'Bestellung' AND status.datum >= ".$this->addslashes($bestelldatum_von);
|
||||
if ($bestelldatum_bis != '')
|
||||
$qry.= " AND status.bestellstatus_kurzbz = 'Bestellung' AND status.datum <= ".$this->addslashes($bestelldatum_bis);
|
||||
|
||||
if ($firma_id != '')
|
||||
$qry.= ' AND tbl_bestellung.firma_id = '.$this->addslashes($firma_id);
|
||||
|
||||
if ($oe_kurzbz != '')
|
||||
$qry.= ' AND tbl_kostenstelle.oe_kurzbz = '.$this->addslashes($oe_kurzbz);
|
||||
|
||||
if ($konto_id != '')
|
||||
$qry.= ' AND tbl_bestellung.konto_id = '.$this->addslashes($konto_id);
|
||||
|
||||
if ($kostenstelle_id != '')
|
||||
$qry.= ' AND tbl_bestellung.kostenstelle_id = '.$this->addslashes($kostenstelle_id);
|
||||
|
||||
if ($bestellnummer != '')
|
||||
$qry.= ' AND tbl_bestellung.bestell_nr = '.$this->addslashes($bestellnummer);
|
||||
|
||||
$qry.=" LIMIT 1000";
|
||||
if(!$this->db_query($qry))
|
||||
{
|
||||
$this->errormsg = "Fehler bei der Datenbankabfrage.";
|
||||
return false;
|
||||
}
|
||||
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$obj = new wawi_rechnung();
|
||||
|
||||
$obj->rechnung_id = $row->rechnung_id;
|
||||
$obj->bestellung_id = $row->bestellung_id;
|
||||
$obj->rechnungstyp_kurzbz = $row->rechnungstyp_kurzbz;
|
||||
$obj->buchungsdatum = $row->buchungsdatum;
|
||||
$obj->rechnungsnr = $row->rechnungsnr;
|
||||
$obj->rechnungsdatum = $row->rechnungsdatum;
|
||||
$obj->transfer_datum = $row->transfer_datum;
|
||||
$obj->buchungstext = $row->buchungstext;
|
||||
$obj->freigegeben = ($row->freigegeben=='t'?true:false);
|
||||
$obj->freigegebenamum = $row->freigegebenamum;
|
||||
$obj->freigegebenvon = $row->freigegebenvon;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->insertamum = $row->insertamum;
|
||||
$obj->insertvon = $row->insertvon;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Löscht die Rechnung mit der Übergebenen ID
|
||||
* @param $rechnung_id Rechnung die gelöscht werden soll
|
||||
*/
|
||||
public function delete($rechnung_id)
|
||||
{
|
||||
if(!is_numeric($rechnung_id))
|
||||
{
|
||||
$this->errormsg = "Keine gültige ID";
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry ="DELETE FROM wawi.tbl_rechnung WHERE rechnung_id = '".addslashes($rechnung_id)."'";
|
||||
|
||||
if(!$this->db_query($qry))
|
||||
{
|
||||
$this->errormsg ="Fehler beim Löschen der Rechnung ID $rechnung_id aufgetreten.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Prüft ob Richtige Daten eingegeben/vorhanden sind
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
|
||||
if(!is_numeric($this->bestellung_id))
|
||||
{
|
||||
$this->errormsg = "Bestellung_id fehlerhaft.";
|
||||
return false;
|
||||
}
|
||||
if(mb_strlen($this->rechnungstyp_kurzbz)>32)
|
||||
{
|
||||
$this->errormsg ="Rechnungstyp fehlerhaft.";
|
||||
return false;
|
||||
}
|
||||
if(mb_strlen($this->rechnungsnr)>32)
|
||||
{
|
||||
$this->errormsg ="Rechnungsnr fehlerhaft.";
|
||||
return false;
|
||||
}
|
||||
if(!is_bool($this->freigegeben))
|
||||
{
|
||||
$this->errormsg = 'freigegeben ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
if(mb_strlen($this->freigegebenvon)>32)
|
||||
{
|
||||
$this->errormsg ="freigegebenvon zu lang.";
|
||||
return false;
|
||||
}
|
||||
if(mb_strlen($this->insertvon)>32)
|
||||
{
|
||||
$this->errormsg ="insertvon zu lang.";
|
||||
return false;
|
||||
}
|
||||
if(mb_strlen($this->updatevon)>32)
|
||||
{
|
||||
$this->errormsg ="updatevon zu lang.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Speichert eine neue Rechnung in die Datenbank oder Updated eine bestehende
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
if(!$this->validate())
|
||||
return false;
|
||||
|
||||
if($this->new)
|
||||
{
|
||||
$qry = 'BEGIN; INSERT INTO wawi.tbl_rechnung (bestellung_id,rechnungstyp_kurzbz, buchungsdatum,
|
||||
rechnungsnr, rechnugsdatum, transfer_datum, buchungstext, freigegeben, freigegebenvon, freigegebenamum,
|
||||
updateamum, updatevon, insertamum, insertvon) VALUES ('.
|
||||
$this->addslashes($this->bestellung_id).', '.
|
||||
$this->addslashes($this->rechnungstyp_kurzbz).', '.
|
||||
$this->addslashes($this->buchungsdatum).', '.
|
||||
"currval('wawi.seq_rechnung_rechnung_id'), ".
|
||||
$this->addslashes($this->rechnungsdatum).', '.
|
||||
$this->addslashes($this->transfer_datum).", ".
|
||||
$this->addslashes($this->buchungstext).', '.
|
||||
($this->freigegeben?'true':'false').','.
|
||||
$this->addslashes($this->freigegebenvon).', '.
|
||||
$this->addslashes($this->freigegebenamum).', '.
|
||||
$this->addslashes($this->updateamum).', '.
|
||||
$this->addslashes($this->updatevon).', '.
|
||||
$this->addslashes($this->insertamum).', '.
|
||||
$this->addslashes($this->insertvon).'); ';
|
||||
}
|
||||
else
|
||||
{
|
||||
//UPDATE
|
||||
$qry = 'UPDATE wawi.tbl_rechnung SET
|
||||
bestellung_id = '.$this->addslashes($this->bestellung_id).',
|
||||
rechnungstyp_kurzbz = '.$this->addslashes($this->rechnungstyp_kurzbz).',
|
||||
buchungsdatum = '.$this->addslashes($this->buchungsdatum).',
|
||||
rechnungsnr = '.$this->addslashes($this->rechnungsnr).',
|
||||
rechnungsdatum = '.$this->addslashes($this->rechnungsdatum).',
|
||||
transfer_datum = '.$this->addslashes($this->transfer_datum).',
|
||||
buchungstext = '.$this->addslashes($this->buchungstext).',
|
||||
freigegeben = '.($this->freigegeben?'true':'false').',
|
||||
freigegebenvon = '.$this->addslashes($this->freigegebenvon).',
|
||||
freigegebenamum = '.$this->addslashes($this->freigegebenamum).',
|
||||
updateamum = '.$this->addslashes($this->updateamum).',
|
||||
updatevon = '.$this->addslashes($this->updatevon).
|
||||
' WHERE rechnung_id = '.$this->rechnung_id.';';
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($this->new)
|
||||
{
|
||||
//aktuelle Sequence holen
|
||||
$qry="SELECT currval('wawi.seq_rechnung_rechnung_id') as id;";
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->rechnung_id = $row->id;
|
||||
$this->rechnungsnr = $row->rechnungsnr;
|
||||
$this->db_query('COMMIT');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db_query('ROLLBACK');
|
||||
$this->errormsg = "Fehler beim Auslesen der Sequence";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db_query('ROLLBACK');
|
||||
$this->errormsg = 'Fehler beim Auslesen der Sequence';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return $this->rechnung_id;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,275 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 FH 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 <karl.burkhart@technikum-wien.at>.
|
||||
*/
|
||||
/**
|
||||
* Syncronisiert die Aufteilung von WaWi DB in FHComplete DB
|
||||
*/
|
||||
require_once('../../config/wawi.config.inc.php');
|
||||
require_once('../../include/basis_db.class.php');
|
||||
require_once('../../include/mail.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Fehler beim Herstellen der Datenbankverbindung');
|
||||
|
||||
if (!$conn_wawi = pg_pconnect(CONN_STRING_WAWI))
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden. *** File:='.__FILE__.' Line:='.__LINE__."\n");
|
||||
|
||||
$error_log='';
|
||||
$update_log='';
|
||||
$anzahl_gesamt=0;
|
||||
$anzahl_insert=0;
|
||||
$anzahl_update=0;
|
||||
$anzahl_delete=0;
|
||||
$anzahl_fehler=0;
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Synchro - WaWi -> FAS - Rechnungen</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$qry="
|
||||
SET CLIENT_ENCODING TO UNICODE;
|
||||
SELECT
|
||||
*, rechnung.lupdate, bn_update.username_neu as updatevon
|
||||
FROM
|
||||
rechnung
|
||||
LEFT JOIN benutzer bn_update ON(rechnung.luser=bn_update.user_id)
|
||||
ORDER BY r_id;
|
||||
";
|
||||
if($result=pg_query($conn_wawi, $qry))
|
||||
{
|
||||
|
||||
$anzahl_gesamt=pg_num_rows($result);
|
||||
|
||||
while($row = pg_fetch_object($result))
|
||||
{
|
||||
//check, ob rechnung bereits übertragen
|
||||
$qry_check="SELECT * FROM wawi.tbl_rechnung WHERE rechnung_id='".addslashes($row->r_id)."'";
|
||||
if($result_check=$db->db_query($qry_check))
|
||||
{
|
||||
if($db->db_num_rows($result_check)>0)
|
||||
{
|
||||
$update = false;
|
||||
//Rechnung vorhanden
|
||||
if($row_check = $db->db_fetch_object($result_check))
|
||||
{
|
||||
if($row_check->bestellung_id!=$row->bestellung_id)
|
||||
{
|
||||
$update = true;
|
||||
$update_log.="\nBestellung_id von $row_check->bestellung_id auf $row->bestellung_id geändert";
|
||||
}
|
||||
if($row_check->buchungsdatum!=$row->buchungsdatum)
|
||||
{
|
||||
$update=true;
|
||||
$update_log.="\nBuchungsdatum von $row_check->buchungsdatum auf $row->buchungsdatum geändert";
|
||||
}
|
||||
if($row_check->rechnungsnr!=$row->rechnungsnr)
|
||||
{
|
||||
$update=true;
|
||||
$update_log.="\nRechnungsnr von $row_check->rechnungsnr auf $row->rechnungsnr geändert";
|
||||
}
|
||||
if($row_check->transfer_datum!=$row->transfer_datum)
|
||||
{
|
||||
$update=true;
|
||||
$update_log.="\nTransferDatum von $row_check->transfer_datum auf $row->transfer_datum geändert";
|
||||
}
|
||||
if($row_check->buchungstext!=$row->buchungstext)
|
||||
{
|
||||
$update=true;
|
||||
$update_log.="\nBuchungstext von $row_check->buchungstext auf $row->buchungstext geändert";
|
||||
}
|
||||
if($row_check->updatevon!=$row->updatevon)
|
||||
{
|
||||
$update=true;
|
||||
$update_log.="\nUpdatevon von $row_check->updatevon auf $row->updatevon geändert";
|
||||
}
|
||||
if($row_check->updateamum!=$row->lupdate)
|
||||
{
|
||||
$update=true;
|
||||
$update_log.="\nUpdateamum von $row_check->updateamum auf $row->lupdate geändert";
|
||||
}
|
||||
|
||||
if($update)
|
||||
{
|
||||
$qry = "UPDATE wawi.tbl_rechnung SET
|
||||
bestellung_id=".$db->addslashes($row->bestellung_id).",
|
||||
buchungsdatum=".$db->addslashes($row->buchungsdatum).",
|
||||
rechnungsnr=".$db->addslashes($row->rechnungsnr).",
|
||||
transfer_datum=".$db->addslashes($row->transfer_datum).",
|
||||
buchungstext=".$db->addslashes($row->buchungstext).",
|
||||
updatevon=".$db->addslashes($row->updatevon).",
|
||||
updateamum=".$db->addslashes($row->lupdate)."
|
||||
WHERE rechnung_id='".addslashes($row->r_id)."'";
|
||||
if($db->db_query($qry))
|
||||
{
|
||||
$anzahl_update++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$error_log.="\nFehler beim Update: $qry";
|
||||
$anzahl_fehler++;
|
||||
}
|
||||
}
|
||||
|
||||
//Rechnungsbetrag
|
||||
for($i=1;$i<=3;$i++)
|
||||
{
|
||||
$mwst = 'mwst'.$i;
|
||||
$betrag = 'betrag'.$i;
|
||||
|
||||
if($row->$mwst!='')
|
||||
{
|
||||
$qry = "SELECT * FROM wawi.tbl_rechnungsbetrag
|
||||
WHERE rechnung_id=".$db->addslashes($row->r_id)." AND mwst=".$db->addslashes($row->$mwst);
|
||||
if($result_rbetrag = $db->db_query($qry))
|
||||
{
|
||||
if($row_rbetrag = $db->db_fetch_object($result_rbetrag))
|
||||
{
|
||||
//Update
|
||||
if($row_rbetrag->betrag!=$row->$betrag)
|
||||
{
|
||||
$qry = "UPDATE wawi.tbl_rechnungsbetrag
|
||||
SET betrag=".$db->addslashes($row->$betrag)."
|
||||
WHERE rechnungsbetrag_id=".$db->addslashes($row_rbetrag->rechnungsbetrag_id);
|
||||
if($db->db_query($qry))
|
||||
{
|
||||
$anzahl_update++;
|
||||
$update_log.="\nBetrag von $row_rbetrag->betrag auf ".$row->$betrag." geändert bei Mwst ".$row->$mwst;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Insert
|
||||
$qry = "INSERT INTO wawi.tbl_rechnungsbetrag(rechnung_id, mwst, betrag) VALUES(".
|
||||
$db->addslashes($row->r_id).",".
|
||||
$db->addslashes($row->$mwst).",".
|
||||
$db->addslashes($row->$betrag).");";
|
||||
if($db->db_query($qry))
|
||||
{
|
||||
$anzahl_insert++;
|
||||
$update_log.="\nRechnungsbetrag hinzugefügt Mwst $row->$mwst Betrag $row->$betrag";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$anzahl_fehler++;
|
||||
$error_log.="\nFehler beim Select: $qry";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Loeschen von ueberfluessigen Rechnungsbetraegen
|
||||
$qry="DELETE FROM wawi.tbl_rechnungsbetrag
|
||||
WHERE mwst NOT IN(".$db->addslashes($row->mwst1).",".$db->addslashes($row->mwst2).",".$db->addslashes($row->mwst3).")
|
||||
AND rechnung_id=".$db->addslashes($row->r_id);
|
||||
if($result_delete = $db->db_query($qry))
|
||||
{
|
||||
$rechnungsbetrag_delete = $db->db_affected_rows($result_delete);
|
||||
if($rechnungsbetrag_delete>0)
|
||||
{
|
||||
$update_log.="\n $rechnungsbetrag_delete Rechnungsbetrag Einträge gelöscht";
|
||||
$anzahl_delete+=$rechnungsbetrag_delete;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$anzahl_fehler++;
|
||||
$error_log.="\nFehler bei Delete: $qry";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Aufteilung nicht vorhanden
|
||||
$qry="INSERT INTO wawi.tbl_rechnung(rechnung_id, bestellung_id, rechnungstyp_kurzbz,
|
||||
buchungsdatum, rechnungsnr, rechnungsdatum, transfer_datum, buchungstext,
|
||||
freigegeben, freigegebenamum, freigegebenvon, insertamum, insertvon,
|
||||
updateamum, updatevon) VALUES("
|
||||
.$db->addslashes($row->r_id).","
|
||||
.$db->addslashes($row->bestellung_id).","
|
||||
."'Zahlung',"
|
||||
.$db->addslashes($row->buchungsdatum).","
|
||||
.$db->addslashes($row->rechnungsnr).","
|
||||
.$db->addslashes($row->rechnungsdatum).","
|
||||
.$db->addslashes($row->transfer_datum).","
|
||||
.$db->addslashes($row->buchungstext).","
|
||||
."true,"
|
||||
.$db->addslashes($row->lupdate).","
|
||||
.$db->addslashes($row->updatevon).","
|
||||
.$db->addslashes($row->lupdate).","
|
||||
.$db->addslashes($row->updatevon).","
|
||||
.$db->addslashes($row->lupdate).","
|
||||
.$db->addslashes($row->updatevon).");";
|
||||
if($row->mwst1!='')
|
||||
$qry.="INSERT INTO wawi.tbl_rechnungsbetrag(rechnung_id, mwst, betrag) VALUES(".$db->addslashes($row->r_id).",".$db->addslashes($row->mwst1).",".$db->addslashes($row->betrag1).");";
|
||||
if($row->mwst2!='')
|
||||
$qry.="INSERT INTO wawi.tbl_rechnungsbetrag(rechnung_id, mwst, betrag) VALUES(".$db->addslashes($row->r_id).",".$db->addslashes($row->mwst2).",".$db->addslashes($row->betrag2).");";
|
||||
if($row->mwst3!='')
|
||||
$qry.="INSERT INTO wawi.tbl_rechnungsbetrag(rechnung_id, mwst, betrag) VALUES(".$db->addslashes($row->r_id).",".$db->addslashes($row->mwst3).",".$db->addslashes($row->betrag3).");";
|
||||
|
||||
if($db->db_query($qry))
|
||||
{
|
||||
$anzahl_insert++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$error_log.="\nFehler beim Insert: $qry";
|
||||
$anzahl_fehler++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$error_log.="\nFehler bei Select: $qry_check";
|
||||
$anzahl_fehler++;
|
||||
}
|
||||
}
|
||||
|
||||
$qry = "
|
||||
SELECT setval('wawi.seq_rechnung_rechnung_id',(SELECT max(rechnung_id) FROM wawi.tbl_rechnung));
|
||||
SELECT setval('wawi.seq_rechnungsbetrag_rechnungsbetrag_id',(SELECT max(rechnungsbetrag_id) FROM wawi.tbl_rechnungsbetrag));
|
||||
";
|
||||
if(!$db->db_query($qry))
|
||||
{
|
||||
$error_log.="\nFehler beim Update der Sequence";
|
||||
$anzahl_fehler++;
|
||||
}
|
||||
//Mail versenden
|
||||
$statistik="Rechnung Sync\n--------------\n";
|
||||
$statistik.="Beginn: ".date("d.m.Y H:i:s")." von ".DB_NAME." - Anzahl Einträge: ".$anzahl_gesamt."\n\n";
|
||||
$statistik.="\nEingefügte Datensätze: $anzahl_insert";
|
||||
$statistik.="\nGeänderte Datensätze: $anzahl_update";
|
||||
$statistik.="\nFehler: $anzahl_fehler\n";
|
||||
|
||||
$synced=$statistik.$error_log.$update_log;
|
||||
$mail = new mail(MAIL_ADMIN, "vilesci@".DOMAIN, "SYNC Rechnung von ".DB_NAME, $synced);
|
||||
$mail->setReplyTo("vilesci@".DOMAIN);
|
||||
if(!$mail->send())
|
||||
{
|
||||
echo "<font color=\"#FF0000\">Fehler beim Versenden des Durchführungs-Mails!</font><br>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,328 @@
|
||||
<?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/firma.class.php');
|
||||
require_once('../include/organisationseinheit.class.php');
|
||||
require_once('../include/datum.class.php');
|
||||
require_once('../include/wawi_konto.class.php');
|
||||
require_once('../include/wawi_rechnung.class.php');
|
||||
require_once('../include/wawi_kostenstelle.class.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
|
||||
$aktion ='';
|
||||
if (isset($_GET['method']))
|
||||
$aktion = $_GET['method'];
|
||||
else
|
||||
$aktion = 'suche';
|
||||
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>WaWi Rechnung</title>
|
||||
<link rel="stylesheet" href="../skin/wawi.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../skin/tablesort.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../skin/jquery-ui.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../include/js/jquery.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../include/js/jquery.autocomplete.css" type="text/css"/>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<script type="text/javascript" src="../include/js/jquery.js"></script>
|
||||
<script type="text/javascript" src="../include/js/jquery.metadata.js"></script>
|
||||
<script type="text/javascript" src="../include/js/jquery.tablesorter.js"></script>
|
||||
<script type="text/javascript" src="../include/js/jquery.autocomplete.min.js" ></script>
|
||||
<script type="text/javascript" src="../include/js/jquery-ui.js" ></script>
|
||||
<script type="text/javascript" src="..//include/js/jquery.ui.datepicker-de.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function loadFirma(id)
|
||||
{
|
||||
$.post("bestellung.php", {id: id, getFirma: 'true'},
|
||||
function(data){
|
||||
$('#firma').html(data);
|
||||
});
|
||||
}
|
||||
|
||||
function formatItem(row)
|
||||
{
|
||||
return row[0] + " <br/>" + row[1];
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
<?php
|
||||
if($aktion=='suche' && !isset($_POST['submit']))
|
||||
{
|
||||
echo "
|
||||
$('#firmenname').autocomplete('wawi_autocomplete.php',
|
||||
{
|
||||
minChars:2,
|
||||
matchSubset:1,matchContains:1,
|
||||
width:500,
|
||||
formatItem:formatItem,
|
||||
extraParams:{'work':'wawi_firma_search' }
|
||||
}).result(function(event, item) {
|
||||
$('#firma_id').val(item[1]);
|
||||
});
|
||||
|
||||
$( \"#rechnungsdatum_von\" ).datepicker($.datepicker.regional['de']);
|
||||
$( \"#rechnungsdatum_bis\" ).datepicker($.datepicker.regional['de']);
|
||||
$( \"#buchungsdatum_von\" ).datepicker($.datepicker.regional['de']);
|
||||
$( \"#buchungsdatum_bis\" ).datepicker($.datepicker.regional['de']);
|
||||
$( \"#erstelldatum_bis\" ).datepicker($.datepicker.regional['de']);
|
||||
$( \"#erstelldatum_von\" ).datepicker($.datepicker.regional['de']);
|
||||
$( \"#bestelldatum_von\" ).datepicker($.datepicker.regional['de']);
|
||||
$( \"#bestelldatum_bis\" ).datepicker($.datepicker.regional['de']);
|
||||
|
||||
";
|
||||
}
|
||||
?>
|
||||
$("#myTable").tablesorter(
|
||||
{
|
||||
sortList: [[4,1]],
|
||||
widgets: ['zebra']
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
$date = new datum();
|
||||
$user=get_uid();
|
||||
|
||||
$berechtigung_kurzbz='wawi/rechnung';
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
$kst=new wawi_kostenstelle();
|
||||
$kst->loadArray($rechte->getKostenstelle($berechtigung_kurzbz));
|
||||
|
||||
if($aktion == 'suche')
|
||||
{
|
||||
if(!isset($_POST['submit']))
|
||||
{
|
||||
// Suchmaske anzeigen
|
||||
$oe = new organisationseinheit();
|
||||
$oe->getAll();
|
||||
|
||||
$konto = new wawi_konto();
|
||||
$konto->getAll();
|
||||
|
||||
$kostenstelle = new wawi_kostenstelle();
|
||||
$kostenstelle->getAll();
|
||||
|
||||
echo "<h2>Rechnung suchen</h2>\n";
|
||||
echo "<form action ='rechnung.php?method=suche' method='post' name='sucheForm'>\n";
|
||||
echo "<table border =0>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td><b>Rechnungsdaten</b></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td>Rechnungsnummer</td>\n";
|
||||
echo "<td><input type = 'text' size ='32' maxlength = '16' name = 'rechnungsnr'></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td>Rechnungsdatum</td>\n";
|
||||
echo "<td>von <input type='text' id='rechnungsdatum_von' size='12' name='rechnungsdatum_von'> bis <input type ='text' id='rechnungsdatum_bis' size='12' name='rechnungsdatum_bis'></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td>Buchungsdatum</td>\n";
|
||||
echo "<td>von <input type='text' id='buchungsdatum_von' size='12' name='buchungsdatum_von'> bis <input type='text' id='buchungsdatum_bis' size='12' name='buchungsdatum_bis'></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td><b>Bestelldaten</b></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td>Bestellnummer</td>\n";
|
||||
echo "<td><input type='text' size='32' maxlength='16' name='bestellnummer'></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td>Erstelldatum</td>\n";
|
||||
echo "<td>von <input type='text' id='erstelldatum_von' size='12' name='erstelldatum_von'> bis <input type ='text' id='erstelldatum_bis' size='12' name='erstelldatum_bis'></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td>Bestelldatum</td>\n";
|
||||
echo "<td>von <input type='text' id='bestelldatum_von' size='12' name='bestelldatum_von'> bis <input type='text' id='bestelldatum_bis' size='12' name='bestelldatum_bis'></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td> Organisationseinheit: </td>\n";
|
||||
echo "<td><SELECT name='filter_oe_kurzbz' onchange='loadFirma(this.value)'>\n";
|
||||
echo "<option value=''>-- auswählen --</option>\n";
|
||||
foreach ($oe->result as $oei)
|
||||
{
|
||||
if($oei->aktiv)
|
||||
{
|
||||
echo '<option value="'.$oei->oe_kurzbz.'" >'.$oei->organisationseinheittyp_kurzbz.' '.$oei->bezeichnung."</option>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<option style="text-decoration:line-through;" value="'.$oei->oe_kurzbz.'">'.$oei->bezeichnung."</option>\n";
|
||||
}
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "</SELECT>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td> Firma: </td>\n";
|
||||
echo "<td> <input id='firmenname' name='firmenname' size='32' maxlength='30' value=''>\n";
|
||||
echo "</td>\n";
|
||||
echo "<td> <input type ='hidden' id='firma_id' name='firma_id' size='10' maxlength='30' value='' >\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td> Kostenstelle: </td>\n";
|
||||
echo "<td><SELECT name='filter_kostenstelle'>\n";
|
||||
echo "<option value=''>-- auswählen --</option>\n";
|
||||
foreach($kostenstelle->result as $kst)
|
||||
{
|
||||
echo '<option value='.$kst->kostenstelle_id.' >'.$kst->bezeichnung."</option>\n";
|
||||
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "</SELECT>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td> Konto: </td>\n";
|
||||
echo "<td><SELECT name='filter_konto' id='searchKonto' style='width: 230px;'>\n";
|
||||
echo "<option value=''>-- auswählen --</option>\n";
|
||||
foreach($konto->result as $ko)
|
||||
{
|
||||
echo '<option value='.$ko->konto_id.' >'.$ko->kurzbz."</option>\n";
|
||||
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "</SELECT>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<tr><td> </td></tr>\n";
|
||||
echo "<tr><td><input type='submit' name ='submit' value='Suche'></td></tr>\n";
|
||||
echo "</table>\n";
|
||||
echo "</form>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Suchergebnisse anzeigen
|
||||
$rechnungsnr = $_POST['rechnungsnr'];
|
||||
$bestellnummer = $_POST['bestellnummer'];
|
||||
$rechnungsdatum_von = $_POST['rechnungsdatum_von'];
|
||||
$rechnungsdatum_bis = $_POST['rechnungsdatum_bis'];
|
||||
$buchungsdatum_von = $_POST['buchungsdatum_von'];
|
||||
$buchungsdatum_bis = $_POST['buchungsdatum_bis'];
|
||||
$erstelldatum_von = $_POST['erstelldatum_von'];
|
||||
$erstelldatum_bis = $_POST['erstelldatum_bis'];
|
||||
$bestelldatum_von = $_POST['bestelldatum_von'];
|
||||
$bestelldatum_bis = $_POST['bestelldatum_bis'];
|
||||
$firma_id = $_POST['firma_id'];
|
||||
$oe_kurzbz = $_POST['filter_oe_kurzbz'];
|
||||
$filter_konto = $_POST['filter_konto'];
|
||||
$filter_kostenstelle = $_POST['filter_kostenstelle'];
|
||||
|
||||
$rechnung = new wawi_rechnung();
|
||||
|
||||
if($rechnungsdatum_von != '')
|
||||
$rechnungsdatum_von = $date->formatDatum($rechnungsdatum_von);
|
||||
if($rechnungsdatum_bis != '')
|
||||
$rechnungsdatum_bis = $date->formatDatum($rechnungsdatum_bis);
|
||||
if($buchungsdatum_von != '')
|
||||
$buchungsdatum_von = $date->formatDatum($buchungsdatum_von);
|
||||
if($buchungsdatum_bis != '')
|
||||
$buchungsdatum_bis = $date->formatDatum($buchungsdatum_bis);
|
||||
if($erstelldatum_von != '')
|
||||
$erstelldatum_von = $date->formatDatum($erstelldatum_von);
|
||||
if($erstelldatum_bis != '')
|
||||
$erstelldatum_bis = $date->formatDatum($erstelldatum_bis);
|
||||
if($bestelldatum_von != '')
|
||||
$bestelldatum_von = $date->formatDatum($bestelldatum_von);
|
||||
if($bestelldatum_bis != '')
|
||||
$bestelldatum_bis = $date->formatDatum($bestelldatum_bis);
|
||||
|
||||
if($rechnungsdatum_von!==false && $rechnungsdatum_bis!==false
|
||||
&& $buchungsdatum_von!==false && $buchungsdatum_bis!==false
|
||||
&& $erstelldatum_von!==false && $erstelldatum_bis!==false
|
||||
&& $bestelldatum_von!==false && $bestelldatum_bis!==false
|
||||
)
|
||||
{
|
||||
if($rechnung->getAllSearch($rechnungsnr, $rechnungsdatum_von, $rechnungsdatum_bis, $buchungsdatum_von, $buchungsdatum_bis, $erstelldatum_von, $erstelldatum_bis, $bestelldatum_von, $bestelldatum_bis, $bestellnummer, $firma_id, $oe_kurzbz, $filter_konto, $filter_kostenstelle))
|
||||
{
|
||||
$date = new datum();
|
||||
|
||||
echo "<table id='myTable' class='tablesorter' width ='100%'> <thead>\n";
|
||||
echo "<tr>
|
||||
<th></th>
|
||||
<th>Rechnungsnr.</th>
|
||||
<th>Bestell_ID</th>
|
||||
<th>Typ</th>
|
||||
<th>Rechnungsdatum</th>
|
||||
<th>Buchungstext</th>
|
||||
<th>Freigegeben</th>
|
||||
<th>Letzte Änderung</th>
|
||||
</tr></thead><tbody>\n";
|
||||
|
||||
foreach($rechnung->result as $row)
|
||||
{
|
||||
//Zeilen der Tabelle ausgeben
|
||||
echo "<tr>\n";
|
||||
echo "<td nowrap> <a href= \"rechnung.php?method=update&id=$row->rechnung_id\" title=\"Bearbeiten\"> <img src=\"../skin/images/edit.gif\"> </a><a href=\"rechnung.php?method=delete&id=$row->rechnung_id\" onclick='return conf_del()' title='Löschen'> <img src=\"../skin/images/delete.gif\"></a>";
|
||||
echo '<td>'.$row->rechnungsnr."</td>\n";
|
||||
echo '<td>'.$row->bestellung_id."</td>\n";
|
||||
echo '<td>'.$row->rechnungstyp_kurzbz."</td>\n";
|
||||
echo '<td>'.$date->formatDatum($row->rechnungsdatum, 'd.m.Y')."</td>\n";
|
||||
echo '<td>'.$row->buchungstext."</td>\n";
|
||||
echo '<td>'.$freigegeben=($row->freigegeben=='t')?'ja':'nein'."</td>\n";
|
||||
echo '<td>'.$date->formatDatum($row->updateamum,'d.m.Y H:i:s').' '.$row->updatevon ."</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
echo "</tbody></table>\n";
|
||||
}
|
||||
else
|
||||
echo "Fehler bei der Abfrage!";
|
||||
}
|
||||
else
|
||||
echo "ungültiges Datumsformat";
|
||||
}
|
||||
}
|
||||
elseif($aktion == 'new')
|
||||
{
|
||||
echo '<h1>Noch nicht implementiert</h1>';
|
||||
}
|
||||
elseif($aktion == 'save')
|
||||
{
|
||||
echo '<h1>Noch nicht implementiert</h1>';
|
||||
}
|
||||
elseif($aktion=='delete')
|
||||
{
|
||||
echo '<h1>Noch nicht implementiert</h1>';
|
||||
}
|
||||
elseif($aktion=='update')
|
||||
{
|
||||
echo '<h1>Noch nicht implementiert</h1>';
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user