diff --git a/app/CustomFuncPao.php b/app/CustomFuncPao.php
index 2e984961..95df3b93 100644
--- a/app/CustomFuncPao.php
+++ b/app/CustomFuncPao.php
@@ -254,10 +254,10 @@ function showOrdini()
// Show the fields of the orders
foreach ($orders as $order) {
// $product = Product::where('sku', $order->CodArticoloGM)->first();
-
+
$str .= getvalstr("", $order->Codice) . " ";
$str .= getvalstr("", $order->DataOra);
- $str .= getvalstr("IdInternet", $order->IdInternet, true). " ";
+ $str .= getvalstr("IdInternet", $order->IdInternet, true) . " ";
$str .= getvalstr("", $order->CodArticoloGM, true);
$str .= getvalstr("Qta", $order->Qta);
$str .= getvalstr("Prezzo", $order->PrezzoLordo);
@@ -269,7 +269,6 @@ function showOrdini()
//$str .= $product;
// $str .= $product;
$str .= '
';
-
}
} catch (\Exception $e) {
return "Errore: " . $e->getMessage();
@@ -337,8 +336,21 @@ function libriInPrevendita()
$sku = $article->IdArticolo;
+ if ($article->QtaDisponibile <= 0) {
+ $colore = 'red';
+ }else {
+ $colore = 'green';
+ }
+
+
// echo '[' . $ind . ']' . $sep . $mydatestr . $sep . $article->IdArticolo . $sep . $article->Titolo . $sep . $article->DescrizioneStatoProdotto . $sep . $article->DescrizioneFormato . ' [Quantita = ' . $article->QtaDisponibile . ']';
- echo '[' . $ind . ']' . $sep . '' . $article->IdArticolo . '' . $sep . $article->Titolo . $sep . ' Data Pubblicazione:' . date('d-m-Y', strtotime($article->DataPubblicazione)) . $sep . $article->DescrizioneStatoProdotto . ' (' . $article->DescrizioneFormato . ') [Quantita = ' . $article->QtaDisponibile . ']';
+ echo '[' . $ind . ']' . $sep .
+ '' . $article->IdArticolo . '' . $sep .
+ $article->Titolo . $sep .
+ ' Data Pubblicazione:' . date('d-m-Y', strtotime($article->DataPubblicazione)) . $sep .
+ $article->DescrizioneStatoProdotto . ' (' . $article->DescrizioneFormato . ')' . $sep .
+ '[Quantita = ' . $article->QtaDisponibile . ']';
+
$prodotto = Product::where('sku', $sku)->first();
if ($prodotto) {