Example #1
0
 echo "<th>Preis/VE</th>\n";
 echo "<th>USt <a href = 'mwst.html' onclick='FensterOeffnen(this.href); return false' title='Hilfe zur USt'> <img src='../skin/images/question.png'> </a></th>\n";
 echo "<th>Brutto</th>\n";
 echo "<th nowrap>Tags <a id='tags_link' onClick='hideTags();'><img src='../skin/images/plus.png' title='Detailtags anzeigen' class ='cursor'> </a></th>";
 echo "</tr>\n";
 echo "<tbody id='detailTable'>";
 $i = 1;
 foreach ($detail->result as $det) {
     $brutto = $det->menge * ($det->preisprove + $det->preisprove * ($det->mwst / 100));
     $brutto = floor($brutto * 1000) / 1000;
     getDetailRow($i, $det->bestelldetail_id, $det->sort, $det->menge, $det->verpackungseinheit, $det->beschreibung, $det->artikelnummer, $det->preisprove, $det->mwst, sprintf("%01.2f", $brutto), $bestellung->bestellung_id, $det->position);
     $summe += $brutto;
     $i++;
 }
 if (!$bestellung->freigegeben) {
     getDetailRow($i, null, $i, null, null, null, null, null, null, null, $bestellung->bestellung_id, $i);
 }
 $test = $i;
 echo "</tbody>";
 echo "<tfoot>";
 echo "<tr>";
 echo "<td></td>";
 echo "<td></td>";
 echo "<td></td>";
 echo "<td colspan='3'>";
 // neue Zeile hinzufügen nur mit Berechtigung
 if ($rechte->isberechtigt('wawi/bestellung_advanced', null, 'suid', $bestellung->kostenstelle_id)) {
     echo "<input type='button' value='neue Zeile' onclick='newRow();' class='cursor'>";
 }
 echo "</td>";
 echo "<td></td>";
 /**
  * Recupere l'enregistrement a partir de son id
  * @param $db database
  * @param $detiddet identifiant de l'enregistrement a recuperer
  */
 static function getDetail($db, $detiddet)
 {
     $row = getDetailRow($db, $detiddet);
     return Detail_model::Detail_modelFromRow($row);
 }