Auftragsliste: Adresse und öffentliche Notiz mitliefern [deploy]
All checks were successful
Deploy netdiag / deploy (push) Successful in 14s

Die App zeigt Aufträge jetzt nach Kunde + Ort statt nach Nummer —
dafür liefert orders.php in der Liste zusätzlich s.address und
c.note_public.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Eduard Wisch 2026-05-19 12:57:06 +02:00
parent 2989ec10ed
commit baa7df88e4

View file

@ -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,
),
);
}