This commit is contained in:
paoloar77
2024-06-13 08:57:58 +02:00
parent 72bdca9cf2
commit ce8a68a727

View File

@@ -230,7 +230,6 @@ function loadArticleByIdArticle($id, $checkprevendita = false)
$ris .= getarraystr($product); $ris .= getarraystr($product);
return $ris; return $ris;
} catch (\Exception $e) { } catch (\Exception $e) {
return "Errore: " . $e->getMessage(); return "Errore: " . $e->getMessage();
@@ -239,10 +238,15 @@ function loadArticleByIdArticle($id, $checkprevendita = false)
function showOrdini() function showOrdini()
{ {
$orders = Order::orderBy('DataOra', 'desc')->take(20)->get(); $str .= "Ordine: aaa";
return $str;
$orders = Order::orderBy('DataOra', 'desc')->take(5)->get();
$str = ""; $str = "";
try {
// Show the fields of the orders // Show the fields of the orders
foreach ($orders as $order) { foreach ($orders as $order) {
$str .= "Ordine: "; $str .= "Ordine: ";
@@ -250,9 +254,11 @@ function showOrdini()
$str .= getvalstr("DataOra", $order->DataOra); $str .= getvalstr("DataOra", $order->DataOra);
$str .= getvalstr("Totale", $order->Totale); $str .= getvalstr("Totale", $order->Totale);
} }
} catch (\Exception $e) {
return "Errore: " . $e->getMessage();
}
return $str; return $str;
} }
function libriInPrevendita() function libriInPrevendita()