diff --git a/api/orders.php b/api/orders.php index f4269b4..b95535c 100644 --- a/api/orders.php +++ b/api/orders.php @@ -75,8 +75,8 @@ if ($id > 0) { } // ---- Auftragsliste ---- -$sql = "SELECT c.rowid, c.ref, c.ref_client, c.date_commande, c.fk_statut,"; -$sql .= " s.rowid as socid, s.nom as socname, s.zip, s.town,"; +$sql = "SELECT c.rowid, c.ref, c.ref_client, c.date_commande, c.fk_statut, c.note_public,"; +$sql .= " s.rowid as socid, s.nom as socname, s.address, s.zip, s.town,"; $sql .= " (SELECT COUNT(*) FROM ".$prefix."netdiag_protocol p WHERE p.fk_commande = c.rowid) as protocolcount"; $sql .= " FROM ".$prefix."commande as c"; $sql .= " LEFT JOIN ".$prefix."societe as s ON s.rowid = c.fk_soc"; @@ -104,12 +104,14 @@ while ($obj = $db->fetch_object($resql)) { 'date' => $db->jdate($obj->date_commande), 'status' => (int) $obj->fk_statut, 'open' => ((int) $obj->fk_statut >= 0 && (int) $obj->fk_statut < 3), + 'note' => $obj->note_public, 'protocolCount' => (int) $obj->protocolcount, 'customer' => array( - 'id' => $obj->socid ? (int) $obj->socid : null, - 'name' => $obj->socname, - 'zip' => $obj->zip, - 'town' => $obj->town, + 'id' => $obj->socid ? (int) $obj->socid : null, + 'name' => $obj->socname, + 'address' => $obj->address, + 'zip' => $obj->zip, + 'town' => $obj->town, ), ); }