fixed sommario and added queue mago

This commit is contained in:
2026-10-20 12:08:35 +02:00
parent b6145e0553
commit 89e5388b75
12 changed files with 2558 additions and 7 deletions
+1 -1
View File
@@ -290,7 +290,7 @@ class MagoSalesStats
$parts = [];
foreach ($words as $w) {
$like = "'%" . str_replace(["\\", "'", '%', '_'], ["\\\\", "''", '\\%', '\\_'], $w) . "%'";
foreach (['external_ord_no', 'our_reference', 'your_reference', 'notes'] as $col) {
foreach (['internal_ord_no', 'external_ord_no', 'our_reference', 'your_reference', 'notes'] as $col) {
$parts[] = "COALESCE($a.$col, '') LIKE $like"; // COALESCE: un campo NULL non deve escludere l'ordine
}
$parts[] = "EXISTS (SELECT 1 FROM mago_sale_ord_detail ex