Betriebsmittel

- Neue Felder Anschaffungswert, Anschaffungsdatum, hoehe, breite, tiefe hinzugefügt
- Neue Spalte mastershapename zu Betriebsmitteltyp hinzugefügt
This commit is contained in:
Andreas Österreicher
2011-10-05 10:35:51 +00:00
parent b553ea3695
commit b88e0b80d8
8 changed files with 669 additions and 253 deletions
+24 -4
View File
@@ -62,6 +62,11 @@ class betriebsmittel extends basis_db
public $inventuramum; // timestamp
public $inventurvon; // string
public $anschaffungswert;
public $anschaffungsdatum;
public $hoehe;
public $breite;
public $tiefe;
/**
* Konstruktor
@@ -122,6 +127,11 @@ class betriebsmittel extends basis_db
$this->leasing_bis = $row->leasing_bis;
$this->inventuramum = $row->inventuramum;
$this->inventurvon = $row->inventurvon;
$this->anschaffungsdatum = $row->anschaffungsdatum;
$this->anschaffungswert = $row->anschaffungswert;
$this->hoehe = $row->hoehe;
$this->breite = $row->breite;
$this->tiefe = $row->tiefe;
return true;
}
@@ -257,7 +267,8 @@ class betriebsmittel extends basis_db
$qry='INSERT INTO wawi.tbl_betriebsmittel (beschreibung, betriebsmitteltyp, nummer
, inventarnummer, reservieren, ort_kurzbz
,ext_id, insertamum, insertvon, updateamum, updatevon,oe_kurzbz,hersteller,seriennummer
,bestellung_id,bestelldetail_id,afa,verwendung,anmerkung,leasing_bis, inventuramum, inventurvon) VALUES('.
,bestellung_id,bestelldetail_id,afa,verwendung,anmerkung,leasing_bis, inventuramum, inventurvon,
anschaffungsdatum, anschaffungswert, hoehe, breite, tiefe) VALUES('.
$this->addslashes($this->beschreibung).', '.
$this->addslashes($this->betriebsmitteltyp).', '.
$this->addslashes($this->nummer).', '.
@@ -279,8 +290,12 @@ class betriebsmittel extends basis_db
$this->addslashes($this->anmerkung) .', '.
($this->leasing_bis?$this->addslashes($this->leasing_bis):'null') .', '.
$this->addslashes($this->inventuramum) .', '.
$this->addslashes($this->inventurvon) .');' ;
$this->addslashes($this->inventurvon) .', '.
$this->addslashes($this->anschaffungsdatum).', '.
$this->addslashes($this->anschaffungswert).', '.
$this->addslashes($this->hoehe).', '.
$this->addslashes($this->breite).', '.
$this->addslashes($this->tiefe).');' ;
}
else
{
@@ -310,7 +325,12 @@ class betriebsmittel extends basis_db
'anmerkung='.$this->addslashes($this->anmerkung).', '.
'leasing_bis='.($this->leasing_bis?$this->addslashes($this->leasing_bis):'null').', '.
'inventuramum='.$this->addslashes($this->inventuramum).', '.
'inventurvon='.$this->addslashes($this->inventurvon).' '.
'inventurvon='.$this->addslashes($this->inventurvon).', '.
'anschaffungsdatum='.$this->addslashes($this->anschaffungsdatum).', '.
'anschaffungswert='.$this->addslashes($this->anschaffungswert).', '.
'hoehe='.$this->addslashes($this->hoehe).', '.
'breite='.$this->addslashes($this->breite).', '.
'tiefe='.$this->addslashes($this->tiefe).' '.
'WHERE betriebsmittel_id='.$this->addslashes($this->betriebsmittel_id).';';
}
+1 -1
View File
@@ -95,7 +95,7 @@ class betriebsmitteltyp extends basis_db
{
$this->result=array();
$this->errormsg = '';
$qry = "SELECT * FROM wawi.tbl_betriebsmitteltyp ORDER BY betriebsmitteltyp";
$qry = "SELECT * FROM wawi.tbl_betriebsmitteltyp ORDER BY beschreibung";
if($this->db_query($qry))
{
+473 -227
View File
File diff suppressed because it is too large Load Diff
+40 -3
View File
@@ -2771,7 +2771,7 @@ if(!$result = @$db->db_query("SELECT budget FROM fue.tbl_projekt LIMIT 1;"))
fue.tbl_projekttask: Spalte erledigt hinzugefuegt!<br>';
}
//fue.tbl_projekt neue Spalte budget
//public.tbl_prestudent neue Spalte ausstellungsstaat
if(!$result = @$db->db_query("SELECT ausstellungsstaat FROM public.tbl_prestudent"))
{
$qry = "ALTER TABLE public.tbl_prestudent ADD COLUMN ausstellungsstaat varchar(3);
@@ -2783,6 +2783,43 @@ if(!$result = @$db->db_query("SELECT ausstellungsstaat FROM public.tbl_prestuden
else
echo 'public.tbl_prestudent: Spalte ausstellungsstaat hinzugefuegt!<br>';
}
//wawi.tbl_betriebsmittel neue Spalte anschaffungswert und anschaffungsdatum
if(!$result = @$db->db_query("SELECT anschaffungswert FROM wawi.tbl_betriebsmittel"))
{
$qry = "ALTER TABLE wawi.tbl_betriebsmittel ADD COLUMN anschaffungswert numeric(12,2);
ALTER TABLE wawi.tbl_betriebsmittel ADD COLUMN anschaffungsdatum date;
ALTER TABLE wawi.tbl_betriebsmittel ADD COLUMN tiefe numeric(6,2);
ALTER TABLE wawi.tbl_betriebsmittel ADD COLUMN hoehe numeric(6,2);
ALTER TABLE wawi.tbl_betriebsmittel ADD COLUMN breite numeric(6,2);
ALTER TABLE wawi.tbl_betriebsmitteltyp ADD COLUMN mastershapename varchar(256);
UPDATE wawi.tbl_betriebsmittel SET anschaffungswert = (SELECT (preisprove/100*(100+mwst)) FROM wawi.tbl_bestelldetail WHERE bestelldetail_id=tbl_betriebsmittel.bestelldetail_id);
UPDATE wawi.tbl_betriebsmittel SET anschaffungsdatum = (SELECT datum FROM wawi.tbl_bestellung_bestellstatus WHERE bestellung_id=tbl_betriebsmittel.bestellung_id AND bestellstatus_kurzbz='Lieferung');
";
if(!$db->db_query($qry))
echo '<strong>wawi.tbl_betriebsmittel: '.$db->db_last_error().'</strong><br>';
else
echo 'wawi.tbl_betriebsmittel: Spalte anschaffungswert und anschaffungsdatum hinzugefuegt!<br>';
}
//tbl_ort.planbezeichnung von 5 auf 8 Zeichen verlaengern
if($result = @$db->db_query("SELECT character_maximum_length as len FROM information_schema.columns WHERE column_name='planbezeichnung' AND table_name='tbl_ort' AND table_schema='public';"))
{
if($row = $db->db_fetch_object($result))
{
if($row->len=='5')
{
$qry = "ALTER TABLE public.tbl_ort ALTER COLUMN planbezeichnung TYPE varchar(8);";
if(!$db->db_query($qry))
echo '<strong>public.tbl_ort: '.$db->db_last_error().'</strong><br>';
else
echo 'public.tbl_ort: Spalte planbezeichnung auf 8 Zeichen verlaengert!<br>';
}
}
}
echo '<br>';
$tabellen=array(
@@ -2955,10 +2992,10 @@ $tabellen=array(
"system.tbl_rolleberechtigung" => array("berechtigung_kurzbz","rolle_kurzbz","art"),
"system.tbl_server" => array("server_kurzbz","beschreibung"),
"wawi.tbl_betriebsmittelperson" => array("betriebsmittelperson_id","betriebsmittel_id","person_id", "anmerkung", "kaution", "ausgegebenam", "retouram","insertamum", "insertvon","updateamum", "updatevon","ext_id"),
"wawi.tbl_betriebsmittel" => array("betriebsmittel_id","betriebsmitteltyp","oe_kurzbz", "ort_kurzbz", "beschreibung", "nummer", "hersteller","seriennummer", "bestellung_id","bestelldetail_id", "afa","verwendung","anmerkung","reservieren","updateamum","updatevon","insertamum","insertvon","ext_id","inventarnummer","leasing_bis","inventuramum","inventurvon"),
"wawi.tbl_betriebsmittel" => array("betriebsmittel_id","betriebsmitteltyp","oe_kurzbz", "ort_kurzbz", "beschreibung", "nummer", "hersteller","seriennummer", "bestellung_id","bestelldetail_id", "afa","verwendung","anmerkung","reservieren","updateamum","updatevon","insertamum","insertvon","ext_id","inventarnummer","leasing_bis","inventuramum","inventurvon","anschaffungsdatum","anschaffungswert","hoehe","breite","tiefe"),
"wawi.tbl_betriebsmittel_betriebsmittelstatus" => array("betriebsmittelbetriebsmittelstatus_id","betriebsmittel_id","betriebsmittelstatus_kurzbz", "datum", "updateamum", "updatevon", "insertamum", "insertvon","anmerkung"),
"wawi.tbl_betriebsmittelstatus" => array("betriebsmittelstatus_kurzbz","beschreibung"),
"wawi.tbl_betriebsmitteltyp" => array("betriebsmitteltyp","beschreibung","anzahl","kaution","typ_code"),
"wawi.tbl_betriebsmitteltyp" => array("betriebsmitteltyp","beschreibung","anzahl","kaution","typ_code","mastershapename"),
"wawi.tbl_budget" => array("geschaeftsjahr_kurzbz","kostenstelle_id","budget"),
"wawi.tbl_zahlungstyp" => array("zahlungstyp_kurzbz","bezeichnung"),
"wawi.tbl_konto" => array("konto_id","kontonr","beschreibung","kurzbz","aktiv","insertamum","insertvon","updateamum","updatevon"),
+9 -4
View File
@@ -301,7 +301,7 @@ if (!$uid = get_uid())
// ------------------------------------------------------------------------------------------
// Organisation - Inventarverwalter
$oes=new organisationseinheit();
if (!$oOrganisationseinheit->loadArray($oBenutzerberechtigung->getOEkurzbz($berechtigung_kurzbz),'oe_kurzbz'))
if (!$oOrganisationseinheit->loadArray($oBenutzerberechtigung->getOEkurzbz($berechtigung_kurzbz),'organisationseinheittyp_kurzbz,bezeichnung'))
$errormsg[]=$oOrganisationseinheit->errormsg;
$extend_search=true;
@@ -1029,7 +1029,9 @@ function output_inventarposition($debug=false,$resultBetriebsmittel=null,$result
{
$htmlstring.='<tr>
<th align="right" valign="top">Verwendung&nbsp;:&nbsp;</th>
<td colspan="5">'.$info.'</td>
<td colspan="3">'.$info.'</td>
<th align="right">Leasing bis&nbsp;:&nbsp;</th>
<td>'.$datum_obj->formatDatum($resBetriebsmittel->leasing_bis,'d.m.Y').'</td>
</tr>';
}
@@ -1069,8 +1071,8 @@ function output_inventarposition($debug=false,$resultBetriebsmittel=null,$result
$htmlstring.='<th align="right">AfA Ende&nbsp;:&nbsp;</th>
<td>'.$datum_obj->formatDatum($resBetriebsmittel->betriebsmittelstatus_datum_afa,'d.m.Y').'</td>
<th align="right">Leasing bis&nbsp;:&nbsp;</th>
<td>'.$datum_obj->formatDatum($resBetriebsmittel->leasing_bis,'d.m.Y').'</td>
<th align="right">Anschaffungsdatum&nbsp;:&nbsp;</th>
<td>'.$datum_obj->formatDatum($resBetriebsmittel->anschaffungsdatum,'d.m.Y').'</td>
</tr>';
$htmlstring.='
<tr>
@@ -1083,6 +1085,9 @@ function output_inventarposition($debug=false,$resultBetriebsmittel=null,$result
<input type="submit" value="Inventur" />
</form>
</td>
<td></td>
<th align="right">Anschaffungswert&nbsp;:&nbsp;</th>
<td>'.$resBetriebsmittel->anschaffungswert.'</td>
</tr>';
$htmlstring.='<tr><td colspan="6">&nbsp;</td></tr>';
+1 -1
View File
@@ -181,7 +181,7 @@
if (!$oRresult=$db->SQL($pArt,$pDistinct,$pFields,$pTable,$pWhere,$pOrder,$pLimit,$pSql))
exit(' |'.$db->errormsg."\n");
for ($i=0;$i<count($oRresult);$i++)
echo html_entity_decode($oRresult[$i]->inventarnummer).'|'. (is_null($oRresult[$i]->beschreibung) || empty($oRresult[$i]->beschreibung) || $oRresult[$i]->beschreibung=='NULL' || $oRresult[$i]->beschreibung=='null'?'':html_entity_decode($oRresult[$i]->beschreibung))."\n";
echo html_entity_decode($oRresult[$i]->inventarnummer).'|'. (is_null($oRresult[$i]->beschreibung) || empty($oRresult[$i]->beschreibung) || $oRresult[$i]->beschreibung=='NULL' || $oRresult[$i]->beschreibung=='null'?'':html_entity_decode(mb_str_replace("\n","",$oRresult[$i]->beschreibung)))."\n";
break;
// Ort - Inventarorte suche
+114 -2
View File
@@ -44,6 +44,7 @@
require_once('../../include/wawi_bestelldetail.class.php');
require_once('../../include/wawi_bestellung.class.php');
require_once('../../include/wawi_kostenstelle.class.php');
require_once('../../include/wawi_bestellstatus.class.php');
if (!$uid = get_uid())
die('Keine UID gefunden ! <a href="javascript:history.back()">Zur&uuml;ck</a>');
@@ -82,10 +83,16 @@
$betriebsmittelstatus_kurzbz=trim((isset($_REQUEST['betriebsmittelstatus_kurzbz']) ? $_REQUEST['betriebsmittelstatus_kurzbz']:$default_status_vorhanden));
$firma_id=trim(isset($_REQUEST['firma_id'])?$_REQUEST['firma_id']:'');
$bestellnr=trim(isset($_REQUEST['bestellnr'])?$_REQUEST['bestellnr']:'');
$afa=trim(isset($_REQUEST['afa']) ? $_REQUEST['afa']:3);
$leasing_bis=trim(isset($_REQUEST['leasing_bis']) ? $_REQUEST['leasing_bis']:'');
$anschaffungswert=isset($_REQUEST['anschaffungswert']) ? $_REQUEST['anschaffungswert']:'';
$anschaffungsdatum=isset($_REQUEST['anschaffungsdatum']) ? $_REQUEST['anschaffungsdatum']:'';
$hoehe=isset($_REQUEST['hoehe'])?$_REQUEST['hoehe']:'';
$breite=isset($_REQUEST['breite'])?$_REQUEST['breite']:'';
$tiefe=isset($_REQUEST['tiefe'])?$_REQUEST['tiefe']:'';
$jahr_monat=trim(isset($_REQUEST['jahr_monat']) ? $_REQUEST['jahr_monat']:'');
$inventur_jahr=trim(isset($_REQUEST['inventur_jahr']) ? $_REQUEST['inventur_jahr']:'');
@@ -218,6 +225,11 @@
$verwendung = $oBetriebsmittel->verwendung;
$anmerkung = $oBetriebsmittel->anmerkung;
$leasing_bis = $oBetriebsmittel->leasing_bis;
$anschaffungsdatum = $oBetriebsmittel->anschaffungsdatum;
$anschaffungswert = $oBetriebsmittel->anschaffungswert;
$hoehe = $oBetriebsmittel->hoehe;
$breite = $oBetriebsmittel->breite;
$tiefe = $oBetriebsmittel->tiefe;
$bestellung_id_old=$bestellung_id;
$bestelldetail_id_old=$bestelldetail_id;
@@ -281,6 +293,12 @@
if(!$bestelldetail->load($bestelldetail_id))
$errormsg[]=$bestelldetail->errormsg;
$bestelldetail->result[] = $bestelldetail;
if($anschaffungswert=='')
{
$anschaffungswert = ($bestelldetail->preisprove/100*(100+$bestelldetail->mwst));
$anschaffungswert = number_format(str_replace(',','.',$anschaffungswert),2,'.','');
}
}
else
{
@@ -300,7 +318,10 @@
$kostenstelle->load($bestellung->kostenstelle_id);
$oe_kurzbz=$kostenstelle->oe_kurzbz;
$anmerkung.=trim($bestellung->bemerkung);
$bestellstatus = new wawi_bestellstatus();
$bestellstatus->getStatiFromBestellung('Lieferung', $bestellung_id);
$anschaffungsdatum = $bestellstatus->datum;
foreach($bestelldetail->result as $row)
{
if (isset($row->beschreibung))
@@ -625,8 +646,36 @@
?>
</select>
</td>
<td>&nbsp;<label for="anschaffungsdatum">Anschaffungsdatum</label>&nbsp;</td>
<td>
<input id="anschaffungsdatum" name="anschaffungsdatum" size="10" maxlength="11" value="<?php echo $anschaffungsdatum;?>">
<script type="text/javascript" language="JavaScript1.2">
$(document).ready(function()
{
$( "#anschaffungsdatum" ).datepicker($.datepicker.regional['de']);
});
</script>
</td>
<td>&nbsp;<label for="anschaffungswert">Anschaffungswert</label>&nbsp;</td>
<td>
<input id="anschaffungswert" name="anschaffungswert" size="10" maxlength="11" value="<?php echo $anschaffungswert;?>">
</td>
</tr>
<tr>
<td>&nbsp;<label for="hoehe">Höhe in Meter</label>&nbsp;</td>
<td>
<input id="hoehe" name="hoehe" size="4" maxlength="8" value="<?php echo $hoehe;?>">
</td>
<td>&nbsp;<label for="breite">Breite in Meter</label>&nbsp;</td>
<td>
<input id="breite" name="breite" size="4" maxlength="8" value="<?php echo $breite;?>">
</td>
<td>&nbsp;<label for="tiefe">Tiefe in Meter</label>&nbsp;</td>
<td>
<input id="tiefe" name="tiefe" size="4" maxlength="8" value="<?php echo $tiefe;?>">
</td>
</tr>
</table>
</td>
</tr>
@@ -696,6 +745,11 @@ $anmerkung_array=(isset($_REQUEST['anmerkung_array'])?$_REQUEST['anmerkung_array
$verwendung_array=(isset($_REQUEST['verwendung_array'])?$_REQUEST['verwendung_array']:array());
$leasing_bis_array=(isset($_REQUEST['leasing_bis_array'])?$_REQUEST['leasing_bis_array']:array());
$afa_array=(isset($_REQUEST['afa_array'])?$_REQUEST['afa_array']:array());
$anschaffungsdatum_array=(isset($_REQUEST['anschaffungsdatum_array'])?$_REQUEST['anschaffungsdatum_array']:array());
$anschaffungswert_array=(isset($_REQUEST['anschaffungswert_array'])?$_REQUEST['anschaffungswert_array']:array());
$hoehe_array=(isset($_REQUEST['hoehe_array'])?$_REQUEST['hoehe_array']:array());
$breite_array=(isset($_REQUEST['breite_array'])?$_REQUEST['breite_array']:array());
$tiefe_array=(isset($_REQUEST['tiefe_array'])?$_REQUEST['tiefe_array']:array());
for ($pos=0;$pos<$anzahl;$pos++)
{
@@ -720,6 +774,11 @@ for ($pos=0;$pos<$anzahl;$pos++)
$verwendung_array[$pos]=trim(isset($verwendung_array[$pos]) && $work=='save' ?trim($verwendung_array[$pos]):$verwendung);
$leasing_bis_array[$pos]=trim(isset($leasing_bis_array[$pos]) && $work=='save' ?trim($leasing_bis_array[$pos]):$leasing_bis);
$afa_array[$pos]=trim(isset($afa_array[$pos]) && $work=='save' ?trim($afa_array[$pos]):$afa);
$anschaffungsdatum_array[$pos]=trim(isset($anschaffungsdatum_array[$pos]) && $work=='save' ?trim($anschaffungsdatum_array[$pos]):$anschaffungsdatum);
$anschaffungswert_array[$pos]=trim(isset($anschaffungswert_array[$pos]) && $work=='save' ?trim($anschaffungswert_array[$pos]):$anschaffungswert);
$hoehe_array[$pos]=isset($hoehe_array[$pos]) && $work=='save' ?trim($hoehe_array[$pos]):$hoehe;
$breite_array[$pos]=isset($breite_array[$pos]) && $work=='save' ?trim($breite_array[$pos]):$breite;
$tiefe_array[$pos]=isset($tiefe_array[$pos]) && $work=='save' ?trim($tiefe_array[$pos]):$tiefe;
if ($work=='save')
{
@@ -761,6 +820,31 @@ for ($pos=0;$pos<$anzahl;$pos++)
$oBetriebsmittel->anmerkung=$anmerkung_array[$pos];
$oBetriebsmittel->leasing_bis=$datum_obj->formatDatum($leasing_bis_array[$pos],'Y-m-d');
//wenn kein Anschaffungsdatum eingetragen ist und eine Bestellung zugeordnet ist,
//wird das lieferdatum der Bestellung uebernommen
if($oBetriebsmittel->bestellung_id!='' && $anschaffungsdatum_array[$pos]=='')
{
$bestellung = new wawi_bestellstatus();
$bestellung->getStatiFromBestellung('Lieferung', $oBetriebsmittel->bestellung_id);
$anschaffungsdatum_array[$pos]=$bestellung->datum;
}
$oBetriebsmittel->anschaffungsdatum = $datum_obj->formatDatum($anschaffungsdatum_array[$pos],'Y-m-d');
//Wenn kein Anschaffungswert eingetragen ist, und eine BestelldetailID angegeben ist,
//wird der Anschaffungswert von der Bestellung uebernommen
if($oBetriebsmittel->bestelldetail_id!='' && $anschaffungswert_array[$pos]=='')
{
$bestellung = new wawi_bestelldetail();
$bestellung->load($oBetriebsmittel->bestelldetail_id);
$anschaffungswert_array[$pos]=($bestellung->preisprove/100*(100+$bestellung->mwst));
$anschaffungswert_array[$pos]=number_format(str_replace(',','.',$anschaffungswert_array[$pos]),2,'.','');
}
$oBetriebsmittel->anschaffungswert = $anschaffungswert_array[$pos];
$oBetriebsmittel->hoehe = number_format(str_replace(',','.',$hoehe_array[$pos]),2,'.','');
$oBetriebsmittel->breite = number_format(str_replace(',','.',$breite_array[$pos]),2,'.','');
$oBetriebsmittel->tiefe = number_format(str_replace(',','.',$tiefe_array[$pos]),2,'.','');
if ($oBetriebsmittel->save())
{
$errormsg[]='Inventar / Betriebsmittel '.($oBetriebsmittel->new?'gespeichert ':'ge&auml;ndert ');
@@ -1178,6 +1262,34 @@ for ($pos=0;$pos<$anzahl;$pos++)
?>
</select>
</td>
<td>&nbsp;<label for="anschaffungsdatum_array<?php echo $pos; ?>">Anschaffungsdatum</label>&nbsp;</td>
<td>
<input id="anschaffungsdatum_array<?php echo $pos; ?>" name="anschaffungsdatum_array[]" size="10" maxlength="11" value="<?php echo $anschaffungsdatum_array[$pos]; ?>">
<script type="text/javascript" language="JavaScript1.2">
$(document).ready(function()
{
$( "#anschaffungsdatum_array<?php echo $pos; ?>" ).datepicker($.datepicker.regional['de']);
});
</script>
</td>
<td>&nbsp;<label for="anschaffungswert_array<?php echo $pos; ?>">Anschaffungswert</label>&nbsp;</td>
<td>
<input id="anschaffungswert_array<?php echo $pos; ?>" name="anschaffungswert_array[]" size="10" maxlength="11" value="<?php echo $anschaffungswert_array[$pos]; ?>">
</td>
</tr>
<tr>
<td>&nbsp;<label for="hoehe_array<?php echo $pos; ?>">Höhe in Meter</label>&nbsp;</td>
<td>
<input id="hoehe_array<?php echo $pos; ?>" name="hoehe_array[]" size="4" maxlength="8" value="<?php echo $hoehe_array[$pos];?>">
</td>
<td>&nbsp;<label for="breite">Breite in Meter</label>&nbsp;</td>
<td>
<input id="breite_array<?php echo $pos; ?>" name="breite_array[]" size="4" maxlength="8" value="<?php echo $breite_array[$pos];?>">
</td>
<td>&nbsp;<label for="tiefe">Tiefe in Meter</label>&nbsp;</td>
<td>
<input id="tiefe_array<?php echo $pos; ?>" name="tiefe_array[]" size="4" maxlength="8" value="<?php echo $tiefe_array[$pos];?>">
</td>
</tr>
</table>
</td>
+7 -11
View File
@@ -121,9 +121,11 @@ $maxlength[$spalte]=5;
$worksheet->write($zeile,++$spalte,'Datum',$format_bold);
$maxlength[$spalte]=5;
$worksheet->write($zeile,++$spalte,'Leasing Bis',$format_bold);
$maxlength[$spalte]=7;
$worksheet->write($zeile,++$spalte,'Bruttobetrag',$format_bold);
$maxlength[$spalte]=12;
$maxlength[$spalte]=11;
$worksheet->write($zeile,++$spalte,'Anschaffungsdatum',$format_bold);
$maxlength[$spalte]=17;
$worksheet->write($zeile,++$spalte,'Anschaffungswert',$format_bold);
$maxlength[$spalte]=16;
for ($pos=0;$pos<count($resultBetriebsmittel);$pos++)
{
@@ -163,14 +165,8 @@ for ($pos=0;$pos<count($resultBetriebsmittel);$pos++)
InsertCell($zeile,++$spalte,$datum_obj->formatDatum($resultBetriebsmittel[$pos]->betriebsmittelstatus_datum,'d.m.Y'),$format_date);
InsertCell($zeile,++$spalte,$datum_obj->formatDatum($resultBetriebsmittel[$pos]->leasing_bis,'d.m.Y'),$format_date);
//Wenn Verbindung zu einem Bestelldetail vorhanden ist, wird der Bruttobetrag des Details
//in der Liste angezeigt
if($resultBetriebsmittel[$pos]->bestelldetail_id!='')
{
$bestelldetail = new wawi_bestelldetail();
$bestelldetail->load($resultBetriebsmittel[$pos]->bestelldetail_id);
InsertCell($zeile,++$spalte,$bestelldetail->preisprove/100*(100+$bestelldetail->mwst), $format_right);
}
InsertCell($zeile,++$spalte,$datum_obj->formatDatum($resultBetriebsmittel[$pos]->anschaffungsdatum,'d.m.Y'),$format_date);
InsertCell($zeile,++$spalte,$resultBetriebsmittel[$pos]->anschaffungswert);
}
$maxlength[1]=30;
$maxlength[2]=30;