public function MakeObject() { $object = new Bestelling(); $object->setid($this->data->id); $object->setKlantid($this->data->klantid); $object->setOrderNr($this->data->ordernr); $object->setTotaalaankoop($this->data->totaalaankoop); $object->setBetaald($this->data->betaald); $object->setGeleverd($this->data->geleverd); $object->setAssignedbooks($this->data->assigned_books); return $object; }
<thead> <tr> <th>Artikelnummer</th> <th>Artikelnaam</th> <th>Kleur</th> <th>Maat</th> <th>Afbeelding</th> <th>Verkoopprijs</th> <th>Aantal</th> <th>Subtotaal</th> </tr> </thead> <tbody> <?php $gebruiker = Gebruiker::get(Bestelling::get($_GET['id'])->getProperty("GebruikerID")); $BetaalMethode = $gebruiker->getProperty("BetaalMethode"); $Koers = $gebruiker->getProperty("PuntenKoers"); $startBedrag = $gebruiker->getProperty("Budget"); global $db; $sth = $db->prepare("SELECT product.* FROM bestelling_product JOIN product ON (bestelling_product.ProductID=product.ProductID) WHERE bestelling_product.BestellingID = :bestellingid"); $sth->bindParam(":bestellingid", $_GET['id']); $sth->execute(); $result = $sth->fetchAll(PDO::FETCH_ASSOC); $Totaal = 0; if (!empty($result)) { foreach ($result as $key => $value) { $sth = $db->prepare("SELECT Aantal, Totaalprijs FROM bestelling_product WHERE BestellingID = :bestellingid AND ProductID = :productid"); $sth->bindParam(":bestellingid", $_GET['id']); $sth->bindParam(":productid", $value["ProductID"]); $sth->execute();