This commit is contained in:
paoloar77
2024-06-13 13:37:52 +02:00
parent b51fa906ca
commit e6caa57281

View File

@@ -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 .= '<br>';
}
} 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 . '<a href="' . $article->permalink . '" target="_blank">' . $article->IdArticolo . '</a>' . $sep . $article->Titolo . $sep . ' Data Pubblicazione:' . date('d-m-Y', strtotime($article->DataPubblicazione)) . $sep . $article->DescrizioneStatoProdotto . ' (' . $article->DescrizioneFormato . ') [Quantita = ' . $article->QtaDisponibile . ']';
echo '[' . $ind . ']' . $sep .
'<a href="' . $article->permalink . '" target="_blank">' . $article->IdArticolo . '</a>' . $sep .
$article->Titolo . $sep .
' Data Pubblicazione:' . date('d-m-Y', strtotime($article->DataPubblicazione)) . $sep .
$article->DescrizioneStatoProdotto . ' (' . $article->DescrizioneFormato . ')' . $sep .
'[Quantita = <span style="color:'.$colore.'; font-weight: bold;">' . $article->QtaDisponibile . '</span>]';
$prodotto = Product::where('sku', $sku)->first();
if ($prodotto) {