add functionality of buchbar to project overview

This commit is contained in:
OliiverHacker
2021-03-31 18:22:56 +02:00
parent 09a5072a4a
commit 1b38b1adca
10 changed files with 188 additions and 88 deletions
+101 -71
View File
@@ -149,12 +149,22 @@ function onselectProjekt()
var beginn=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#beginn" ));
var ende=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#ende" ));
var budget=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#budget" ));
var farbe=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#farbe" ));
var aufwand_pt=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#aufwand_pt" ));
var farbe=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#farbe" ));
var aufwand_pt=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#aufwand_pt" ));
var anzahl_ma=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#anzahl_ma" ));
var aufwandstyp_kurzbz=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#aufwandstyp_kurzbz" ));
//Daten den Feldern zuweisen
var buchbar=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#buchbar" ));
if (!buchbar)
{
buchbar='Nein';
}
else
{
buchbar='Ja';
}
//Daten den Feldern zuweisen
document.getElementById('textbox-projekt-detail-projekt_kurzbz').value=projekt_kurzbz;
//document.getElementById('menulist-projekt-detail-oe_kurzbz').value=oe_kurzbz;
@@ -166,9 +176,14 @@ function onselectProjekt()
document.getElementById('textbox-projekt-detail-ende').value=ende;
document.getElementById('textbox-projekt-detail-budget').value=budget;
document.getElementById('textbox-projekt-detail-farbe').value=farbe;
document.getElementById('checkbox-projekt-detail-neu').checked=false;
document.getElementById('textbox-projekt-anzahl_ma').value=anzahl_ma;
document.getElementById('checkbox-projekt-detail-neu').checked=false;
document.getElementById('textbox-projekt-anzahl_ma').value=anzahl_ma;
document.getElementById('textbox-projekt-aufwand_pt').value=aufwand_pt;
if(buchbar=='Nein')
document.getElementById('checkbox-projekt-detail-buchbar').checked=false;
else
document.getElementById('checkbox-projekt-detail-buchbar').checked=true;
MenulistSelectItemOnValue('menulist-projekt-detail-aufwandstyp', aufwandstyp_kurzbz);
@@ -197,12 +212,13 @@ function saveProjektDetail()
beginn = document.getElementById('textbox-projekt-detail-beginn').iso;
ende = document.getElementById('textbox-projekt-detail-ende').iso;
budget = document.getElementById('textbox-projekt-detail-budget').value;
farbe = document.getElementById('textbox-projekt-detail-farbe').value;
farbe = document.getElementById('textbox-projekt-detail-farbe').value;
neu = document.getElementById('checkbox-projekt-detail-neu').checked;
aufwandstyp_kurzbz = MenulistGetSelectedValue('menulist-projekt-detail-aufwandstyp');
anzahl_ma = document.getElementById('textbox-projekt-anzahl_ma').value;
aufwandstyp_kurzbz = MenulistGetSelectedValue('menulist-projekt-detail-aufwandstyp');
anzahl_ma = document.getElementById('textbox-projekt-anzahl_ma').value;
aufwand_pt = document.getElementById('textbox-projekt-aufwand_pt').value;
buchbar = document.getElementById('checkbox-projekt-detail-buchbar').checked;
var soapBody = new SOAPObject("saveProjekt");
//soapBody.appendChild(new SOAPObject("username")).val('joe');
//soapBody.appendChild(new SOAPObject("passwort")).val('waschl');
@@ -217,14 +233,28 @@ function saveProjektDetail()
projekt.appendChild(new SOAPObject("ende")).val(ende);
projekt.appendChild(new SOAPObject("budget")).val(budget);
projekt.appendChild(new SOAPObject("farbe")).val(farbe);
projekt.appendChild(new SOAPObject("aufwandstyp_kurzbz")).val(aufwandstyp_kurzbz);
projekt.appendChild(new SOAPObject("anzahl_ma")).val(anzahl_ma);
projekt.appendChild(new SOAPObject("aufwandstyp_kurzbz")).val(aufwandstyp_kurzbz);
projekt.appendChild(new SOAPObject("anzahl_ma")).val(anzahl_ma);
projekt.appendChild(new SOAPObject("aufwand_pt")).val(aufwand_pt);
console.log(buchbar);
if(buchbar)
{
projekt.appendChild(new SOAPObject("buchbar")).val('true');
}
else
{
projekt.appendChild(new SOAPObject("buchbar")).val('false');
}
if(neu)
{
projekt.appendChild(new SOAPObject("neu")).val('true');
else
}
else
{
projekt.appendChild(new SOAPObject("neu")).val('false');
}
soapBody.appendChild(projekt);
var sr = new SOAPRequest("saveProjekt",soapBody);
@@ -342,9 +372,9 @@ function ProjektDetailReset()
document.getElementById('textbox-projekt-detail-beschreibung').value='';
document.getElementById('textbox-projekt-detail-beginn').value='';
document.getElementById('textbox-projekt-detail-ende').value='';
document.getElementById('textbox-projekt-detail-budget').value='';
document.getElementById('textbox-projekt-anzahl_ma').value='';
document.getElementById('textbox-projekt-aufwand_pt').value='';
document.getElementById('textbox-projekt-detail-budget').value='';
document.getElementById('textbox-projekt-anzahl_ma').value='';
document.getElementById('textbox-projekt-aufwand_pt').value='';
document.getElementById('textbox-projekt-detail-projektwuerdigkeit').value='';
}
@@ -362,7 +392,7 @@ function ProjektDisableFields(val)
document.getElementById('textbox-projekt-detail-budget').disabled=val;
document.getElementById('textbox-projekt-detail-farbe').disabled=val;
document.getElementById('button-projekt-detail-speichern').disabled=val;
document.getElementById('menulist-projekt-detail-aufwandstyp').disabled=val;
document.getElementById('menulist-projekt-detail-aufwandstyp').disabled=val;
document.getElementById('textbox-projekt-anzahl_ma').disabled=val;
document.getElementById('textbox-projekt-aufwand_pt').disabled=val;
}
@@ -385,65 +415,65 @@ function ProjektNeu()
document.getElementById('textbox-projekt-detail-projekt_kurzbz').disabled=false;
document.getElementById('checkbox-projekt-detail-neu').checked=true;
document.getElementById('caption-projekt-detail').label='Neues Projekt';
document.getElementById('textbox-projekt-detail-farbe').value='#FF0000';
document.getElementById('textbox-projekt-anzahl_ma').disabled=false;
document.getElementById('textbox-projekt-detail-farbe').value='#FF0000';
document.getElementById('textbox-projekt-anzahl_ma').disabled=false;
document.getElementById('textbox-projekt-aufwand_pt').disabled=false;
//Detail Tab auswaehlen
document.getElementById('tabs-projekt-main').selectedItem=document.getElementById('tab-projekt-detail');
}
function makeProjektAnalyse(){
var ergebnis_el = document.getElementById('textbox-projekt-detail-projektwuerdigkeit');
ergebnis_el.value="";
var anzahl_ma = document.getElementById('textbox-projekt-anzahl_ma').value;
var aufwand_pt = document.getElementById('textbox-projekt-aufwand_pt').value;
var budget = document.getElementById('textbox-projekt-detail-budget').value;
function makeProjektAnalyse(){
var ergebnis_el = document.getElementById('textbox-projekt-detail-projektwuerdigkeit');
ergebnis_el.value="";
var anzahl_ma = document.getElementById('textbox-projekt-anzahl_ma').value;
var aufwand_pt = document.getElementById('textbox-projekt-aufwand_pt').value;
var budget = document.getElementById('textbox-projekt-detail-budget').value;
var beginn = document.getElementById('textbox-projekt-detail-beginn').value;
var ende = document.getElementById('textbox-projekt-detail-ende').value;
if (!anzahl_ma || !aufwand_pt || !budget || !beginn || !ende)
{
ergebnis_el.value = 'Angaben unvollständig';
}
else
{
var beginn_arr = beginn.split(".");
var ende_arr = ende.split(".");
var date1 = new Date(beginn_arr[2],beginn_arr[1],beginn_arr[0]);
var date2 = new Date(ende_arr[2],ende_arr[1],ende_arr[0]);
var dauerTage = parseInt((date2 - date1) / (1000 * 60 * 60 * 24));
var punkte_gesamt = 0;
var projekttyp = '';
if (aufwand_pt < 10) punkte_gesamt += 1;
else if (aufwand_pt <= 50) punkte_gesamt += 4;
else if (aufwand_pt <= 250) punkte_gesamt += 8;
else punkte_gesamt += 8;
if (anzahl_ma < 3) punkte_gesamt += 1;
else if (anzahl_ma <= 5) punkte_gesamt += 3;
else if (anzahl_ma <= 20) punkte_gesamt += 6;
else punkte_gesamt += 9;
if (budget < 5000) punkte_gesamt += 1;
else if (budget <= 25000) punkte_gesamt += 2;
else if (budget <= 500000) punkte_gesamt += 4;
else punkte_gesamt += 6;
if (dauerTage < 30) punkte_gesamt += 0;
else if (dauerTage <= 90) punkte_gesamt += 4;
else if (dauerTage <= 360) punkte_gesamt += 5;
else punkte_gesamt += 7;
if (punkte_gesamt <= 8) projekttyp = 'Vorhaben';
else if (punkte_gesamt <= 15) projekttyp = 'Kleinprojekt';
else if (punkte_gesamt <= 30) projekttyp = 'Projekt';
else projekttyp = 'Großrojekt';
ergebnis_el.value = projekttyp;
}
}
var ende = document.getElementById('textbox-projekt-detail-ende').value;
if (!anzahl_ma || !aufwand_pt || !budget || !beginn || !ende)
{
ergebnis_el.value = 'Angaben unvollständig';
}
else
{
var beginn_arr = beginn.split(".");
var ende_arr = ende.split(".");
var date1 = new Date(beginn_arr[2],beginn_arr[1],beginn_arr[0]);
var date2 = new Date(ende_arr[2],ende_arr[1],ende_arr[0]);
var dauerTage = parseInt((date2 - date1) / (1000 * 60 * 60 * 24));
var punkte_gesamt = 0;
var projekttyp = '';
if (aufwand_pt < 10) punkte_gesamt += 1;
else if (aufwand_pt <= 50) punkte_gesamt += 4;
else if (aufwand_pt <= 250) punkte_gesamt += 8;
else punkte_gesamt += 8;
if (anzahl_ma < 3) punkte_gesamt += 1;
else if (anzahl_ma <= 5) punkte_gesamt += 3;
else if (anzahl_ma <= 20) punkte_gesamt += 6;
else punkte_gesamt += 9;
if (budget < 5000) punkte_gesamt += 1;
else if (budget <= 25000) punkte_gesamt += 2;
else if (budget <= 500000) punkte_gesamt += 4;
else punkte_gesamt += 6;
if (dauerTage < 30) punkte_gesamt += 0;
else if (dauerTage <= 90) punkte_gesamt += 4;
else if (dauerTage <= 360) punkte_gesamt += 5;
else punkte_gesamt += 7;
if (punkte_gesamt <= 8) projekttyp = 'Vorhaben';
else if (punkte_gesamt <= 15) projekttyp = 'Kleinprojekt';
else if (punkte_gesamt <= 30) projekttyp = 'Projekt';
else projekttyp = 'Großrojekt';
ergebnis_el.value = projekttyp;
}
}
function ProjektPrintStatusbericht()
{
+10 -1
View File
@@ -125,7 +125,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
</hbox>
</row>
<row style="background-color:#eeeeee">
<label value="Anzahl MA" control="textbox-projekt-anzahl_ma"/>
<label value="AzgrAnzahl MA" control="textbox-projekt-anzahl_ma"/>
<hbox>
<textbox id="textbox-projekt-anzahl_ma" size="7" maxlength="7" disabled="true" onchange="makeProjektAnalyse()"/>
</hbox>
@@ -164,6 +164,15 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
<spacer />
</hbox>
</row>
<row>
<label value="Buchbar" control="checkbox-projekt-detail-buchbar"/>
<hbox>
<checkbox id="checkbox-projekt-detail-buchbar"/>
<spacer />
</hbox>
</row>
</rows>
</grid>
<hbox>
+15 -1
View File
@@ -161,7 +161,16 @@ function onselectTreeProjektphase()
var budget=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#budget" ));
var personentage=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#personentage" ));
var farbe=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#farbe" ));
var buchbar=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#buchbar" ));
if (!buchbar)
{
buchbar='Nein';
}
else
{
buchbar='Ja';
}
//alert(typ);
//Daten den Feldern zuweisen
@@ -180,6 +189,11 @@ function onselectTreeProjektphase()
document.getElementById('textbox-projektphase-detail-personentage').value=personentage;
document.getElementById('textbox-projektphase-detail-farbe').value=farbe;
document.getElementById('checkbox-projektphase-detail-neu').checked=false;
if(buchbar=='Nein')
document.getElementById('checkbox-projekt-detail-buchbar').checked=false;
else
document.getElementById('checkbox-projekt-detail-buchbar').checked=true;
MenulistSelectItemOnValue('menulist-projektphase-detail-projektphase_fk', projektphase_fk);
MenulistSelectItemOnValue('menulist-projektphase-detail-ressource', ressource_id);
@@ -143,6 +143,15 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
<spacer />
</hbox>
</row>
<row>
<label value="Buchbar" control="checkbox-projektphase-detail-buchbar"/>
<hbox>
<checkbox id="checkbox-projektphase-detail-buchbar"/>
<spacer />
</hbox>
</row>
</rows>
</grid>
<hbox>
+15 -5
View File
@@ -47,7 +47,7 @@ class projekt extends basis_db
public $farbe;
public $anzahl_ma; // integer
public $aufwand_pt; // integer
public $buchbar; //bool
/**
@@ -86,6 +86,7 @@ class projekt extends basis_db
$this->farbe = $row->farbe;
$this->anzahl_ma = $row->anzahl_ma;
$this->aufwand_pt = $row->aufwand_pt;
$this->buchbar = $this->db_parse_bool($row->buchbar);
return true;
}
@@ -140,6 +141,7 @@ class projekt extends basis_db
$obj->aufwandstyp_kurzbz = $row->aufwandstyp_kurzbz;
$obj->anzahl_ma = $row->anzahl_ma;
$obj->aufwand_pt = $row->aufwand_pt;
$obj->buchbar = $this->db_parse_bool($row->buchbar);
$this->result[] = $obj;
}
@@ -183,6 +185,7 @@ class projekt extends basis_db
$obj->farbe = $row->farbe;
$obj->anzahl_ma = $row->anzahl_ma;
$obj->aufwand_pt = $row->aufwand_pt;
$obj->buchbar = $this->db_parse_bool($row->buchbar);
$this->result[] = $obj;
}
@@ -226,6 +229,7 @@ class projekt extends basis_db
$obj->aufwandstyp_kurzbz = $row->aufwandstyp_kurzbz;
$obj->anzahl_ma = $row->anzahl_ma;
$obj->aufwand_pt = $row->aufwand_pt;
$obj->buchbar = $this->db_parse_bool($row->buchbar);
$this->result[] = $obj;
}
@@ -293,7 +297,7 @@ class projekt extends basis_db
{
//Neuen Datensatz einfuegen
$qry = 'INSERT INTO fue.tbl_projekt (projekt_kurzbz, nummer, titel,beschreibung, beginn, ende, budget, farbe, oe_kurzbz, aufwand_pt, anzahl_ma, aufwandstyp_kurzbz) VALUES('.
$qry = 'INSERT INTO fue.tbl_projekt (projekt_kurzbz, nummer, titel,beschreibung, beginn, ende, budget, farbe, oe_kurzbz, aufwand_pt, anzahl_ma, aufwandstyp_kurzbz, buchbar) VALUES('.
$this->db_add_param($this->projekt_kurzbz).', '.
$this->db_add_param($this->nummer).', '.
$this->db_add_param($this->titel).', '.
@@ -305,7 +309,8 @@ class projekt extends basis_db
$this->db_add_param($this->oe_kurzbz).','.
$this->db_add_param($this->aufwand_pt).','.
$this->db_add_param($this->anzahl_ma).','.
$this->db_add_param($this->aufwandstyp_kurzbz).');';
$this->db_add_param($this->aufwandstyp_kurzbz).', '.
$this->db_add_param($this->buchbar,FHC_BOOLEAN).');';
}
else
{
@@ -323,7 +328,8 @@ class projekt extends basis_db
'oe_kurzbz='.$this->db_add_param($this->oe_kurzbz).', '.
'anzahl_ma='.$this->db_add_param($this->anzahl_ma).', '.
'aufwand_pt='.$this->db_add_param($this->aufwand_pt).', '.
'aufwandstyp_kurzbz='.$this->db_add_param($this->aufwandstyp_kurzbz).' '.
'aufwandstyp_kurzbz='.$this->db_add_param($this->aufwandstyp_kurzbz).', '.
'buchbar='.$this->db_add_param($this->buchbar,FHC_BOOLEAN).' '.
'WHERE projekt_kurzbz='.$this->db_add_param($this->projekt_kurzbz).';';
}
@@ -333,7 +339,9 @@ class projekt extends basis_db
}
else
{
$this->errormsg = 'Fehler beim Speichern der Daten';
$this->getErrorMsg();
var_dump($this->getErrorMsg());
$this->errormsg = $this->getErrorMsg();
return false;
}
}
@@ -416,6 +424,7 @@ class projekt extends basis_db
$obj->beginn = $row->beginn;
$obj->ende = $row->ende;
$obj->oe_kurzbz = $row->oe_kurzbz;
$obj->buchbar = $this->db_parse_bool($row->buchbar);
$this->result[] = $obj;
}
@@ -448,6 +457,7 @@ class projekt extends basis_db
$this->farbe = $row->farbe;
$this->anzahl_ma = $row->anzahl_ma;
$this->aufwand_pt = $row->aufwand_pt;
$this->buchbar = $this->db_parse_bool($row->buchbar);
return true;
}
+9 -3
View File
@@ -48,6 +48,7 @@ class projektphase extends basis_db
public $insertvon; // bigint
public $updateamum; // timestamp
public $updatevon; // bigint
public $buchbar; // bool
/**
@@ -100,6 +101,7 @@ class projektphase extends basis_db
$this->insertvon = $row->insertvon;
$this->updateamum = $row->updateamum;
$this->updatevon = $row->updatevon;
$this->buchbar = $this->db_parse_bool($row->buchbar);
return true;
}
else
@@ -158,6 +160,7 @@ class projektphase extends basis_db
$obj->insertvon = $row->insertvon;
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$obj->buchbar = $this->db_parse_bool($row->buchbar);
$this->result[] = $obj;
}
@@ -213,7 +216,7 @@ class projektphase extends basis_db
$obj->insertvon = $row->insertvon;
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$obj->buchbar = $this->db_parse_bool($row->buchbar);
$this->result[] = $obj;
}
//var_dump($this->result);
@@ -260,6 +263,7 @@ class projektphase extends basis_db
$obj->insertvon = $row->insertvon;
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$obj->buchbar = $this->db_parse_bool($row->buchbar);
$this->result[] = $obj;
}
@@ -321,7 +325,7 @@ class projektphase extends basis_db
//Neuen Datensatz einfuegen
$qry='BEGIN; INSERT INTO fue.tbl_projektphase (projekt_kurzbz, projektphase_fk, bezeichnung, typ,
beschreibung, start, ende, budget, ressource_id, insertvon, insertamum, updatevon, updateamum, farbe, personentage) VALUES ('.
beschreibung, start, ende, budget, ressource_id, insertvon, insertamum, updatevon, updateamum, farbe, personentage, buchbar) VALUES ('.
$this->db_add_param($this->projekt_kurzbz).', '.
$this->db_add_param($this->projektphase_fk).', '.
$this->db_add_param($this->bezeichnung).', '.
@@ -334,7 +338,8 @@ class projektphase extends basis_db
$this->db_add_param($this->insertvon).', now(), '.
$this->db_add_param($this->updatevon).', now(), '.
$this->db_add_param($this->farbe).', '.
$this->db_add_param($this->personentage).' );';
$this->db_add_param($this->personentage).', '.
$this->db_add_param($this->buchbar,FHC_BOOLEAN).');';
}
else
{
@@ -354,6 +359,7 @@ class projektphase extends basis_db
'personentage='.$this->db_add_param($this->personentage).', '.
'updateamum= now(), '.
'updatevon='.$this->db_add_param($this->updatevon).' '.
'buchbar='.$this->db_add_param($this->buchbar,FHC_BOOLEAN).' '.
'WHERE projektphase_id='.$this->db_add_param($this->projektphase_id, FHC_INTEGER).';';
}
+1
View File
@@ -72,6 +72,7 @@ for ($i=0;$i<count($projekt_obj->result);$i++)
<PROJEKT:anzahl_ma>'.$projekt->anzahl_ma.'</PROJEKT:anzahl_ma>
<PROJEKT:aufwand_pt>'.$projekt->aufwand_pt.'</PROJEKT:aufwand_pt>
<PROJEKT:aufwandstyp_kurzbz>'.$projekt->aufwandstyp_kurzbz.'</PROJEKT:aufwandstyp_kurzbz>
<PROJEKT:buchbar>'.$projekt->buchbar.'</PROJEKT:buchbar>
</RDF:Description>'."\n";
$sequenz.='<RDF:li RDF:resource="'.$rdf_url.$projekt->projekt_kurzbz.'" />'."\n";
+12 -5
View File
@@ -61,9 +61,10 @@ if($projektphase_id != '')
$oRdf->obj[$i]->setAttribut('fortschritt',$ergebnis);
$oRdf->obj[$i]->setAttribut('personentage',$phase->personentage);
$oRdf->obj[$i]->setAttribut('farbe',$phase->farbe);
$oRdf->obj[$i]->setAttribut('typ',$phase->typ);
$oRdf->obj[$i]->setAttribut('typ',$phase->typ);
$oRdf->obj[$i]->setAttribut('ressource_id',$phase->ressource_id);
$oRdf->obj[$i]->setAttribut('buchbar',$phase->buchbar);
if($phase->projektphase_fk!='')
$oRdf->addSequence($phase->projektphase_id, $phase->projektphase_fk);
else
@@ -94,7 +95,8 @@ if($projektphase_id != '')
$oRdf->obj[$idx]->setAttribut('personentage', '');
$oRdf->obj[$idx]->setAttribut('farbe', '');
$oRdf->obj[$idx]->setAttribut('typ', '');
$oRdf->obj[$idx]->setAttribut('buchbar','');
$oRdf->addSequence('opt');
}
@@ -113,7 +115,8 @@ if($projektphase_id != '')
$oRdf->obj[$idx]->setAttribut('personentage', $phase->personentage);
$oRdf->obj[$idx]->setAttribut('farbe', $phase->farbe);
$oRdf->obj[$idx]->setAttribut('typ', $phase->typ);
$oRdf->obj[$idx]->setAttribut('buchbar',$phase->buchbar);
$oRdf->addSequence($phase->projektphase_id);
}
@@ -163,7 +166,8 @@ else
$oRdf->obj[$idx]->setAttribut('beginn','');
$oRdf->obj[$idx]->setAttribut('ende','');
$oRdf->obj[$idx]->setAttribut('typ','organisationseinheit');
$oRdf->obj[$idx]->setAttribut('buchbar','');
$oRdf->addSequence($projekt->oe_kurzbz);
$lastOE=$currentOE;
@@ -184,6 +188,8 @@ else
$oRdf->obj[$idx]->setAttribut('beginn',$datum_obj->formatDatum($projekt->beginn,'d.m.Y'));
$oRdf->obj[$idx]->setAttribut('ende',$datum_obj->formatDatum($projekt->ende,'d.m.Y'));
$oRdf->obj[$idx]->setAttribut('typ','projekt');
$oRdf->obj[$idx]->setAttribut('buchbar',$projekt->buchbar);
$oRdf->addSequence($projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz, $projekt->oe_kurzbz);
@@ -223,6 +229,7 @@ else
$oRdf->obj[$idx]->setAttribut('typ',strtolower($projektphase->typ));
$oRdf->obj[$idx]->setAttribut('ressource_bezeichnung',$projektphase->ressource_bezeichnung);
$oRdf->obj[$idx]->setAttribut('ressource_id',$projektphase->ressource_id);
$oRdf->obj[$idx]->setAttribut('buchbar',$projektphase->buchbar);
if (!is_null($projektphase->projektphase_fk))
$oRdf->addSequence($projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz.'/'.$projektphase->projektphase_id, $projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz.'/'.$projektphase->projektphase_fk);
else
+15 -2
View File
@@ -68,14 +68,27 @@ function saveProjekt($username, $passwort, $projekt)
$projektNew->budget = $projekt->budget;
$projektNew->farbe = $projekt->farbe;
$projektNew->oe_kurzbz = $projekt->oe_kurzbz;
$projektNew->aufwandstyp_kurzbz = $projekt->aufwandstyp_kurzbz;
$projektNew->aufwandstyp_kurzbz = $projekt->aufwandstyp_kurzbz;
$projektNew->anzahl_ma = $projekt->anzahl_ma;
$projektNew->aufwand_pt = $projekt->aufwand_pt;
$projektNew->aufwand_pt = $projekt->aufwand_pt;
if($projekt->buchbar=='true')
{
$projektNew->buchbar = true;
}
else
{
$projektNew->buchbar = false;
}
if($projekt->neu=='true')
{
$projektNew->new = true;
}
else
{
$projektNew->new = false;
}
if($projektNew->save())
return $projektNew->projekt_kurzbz;
+1
View File
@@ -30,6 +30,7 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:part name="farbe" type="xsd:string"></wsdl:part>
<wsdl:part name="oe_kurzbz" type="xsd:string"></wsdl:part>
<wsdl:part name="neu" type="xsd:string"></wsdl:part>
<wsdl:part name="buchbar" type="xsd:string"></wsdl:part>
<wsdl:part name="aufwandstyp_kurzbz" type="xsd:string"></wsdl:part>
</xsd:all>
</xsd:complexType>