fatturati
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\ArticoliFatturati;
|
||||
use Carbon\Carbon;
|
||||
use Codexshaper\WooCommerce\Facades\Product;
|
||||
use Illuminate\Console\Command;
|
||||
@@ -36,12 +37,14 @@ setlocale(LC_TIME, 'it_IT.UTF-8');
|
||||
function showarray($array)
|
||||
{
|
||||
echo '<pre>' . json_encode($array, JSON_PRETTY_PRINT) . '</pre>';
|
||||
};
|
||||
}
|
||||
;
|
||||
|
||||
function getarraystr($array)
|
||||
{
|
||||
return '<pre>' . json_encode($array, JSON_PRETTY_PRINT) . '</pre>';
|
||||
};
|
||||
}
|
||||
;
|
||||
|
||||
function isKeyPresent($array, $key)
|
||||
{
|
||||
@@ -690,6 +693,9 @@ function showArticoliFatturatiWeb()
|
||||
|
||||
// Show the fields of the orders
|
||||
foreach ($orders as $order) {
|
||||
$usaprod = true;
|
||||
|
||||
if ($usaprod) {
|
||||
$product = Product::where('sku', $order->CodArticolo)->first();
|
||||
|
||||
if (isset($product['permalink'])) {
|
||||
@@ -704,6 +710,9 @@ function showArticoliFatturatiWeb()
|
||||
$titolo = $mylink . "<span style='font-weigth: bold;'>" . $product['name'] . "</span>" . $finelink;
|
||||
else
|
||||
$titolo = "";
|
||||
} else {
|
||||
$titolo = "";
|
||||
}
|
||||
|
||||
$str .= getvalstr("", $order->Codice) . " ";
|
||||
$str .= getvalstr("", $order->AnnoDoc) . " ";
|
||||
@@ -714,7 +723,7 @@ function showArticoliFatturatiWeb()
|
||||
$str .= getvalstr("", $order->DataOra);
|
||||
$str .= getvalstr("", $order->Stato);
|
||||
$str .= getvalstr("", $order->Note);
|
||||
$str .= getvalstr("", $titolo);
|
||||
//$str .= getvalstr("", $titolo);
|
||||
$str .= getvalstr("Ordine", $order->IdInternet, true) . " ";
|
||||
if ($order->PercSconto)
|
||||
$str .= getvalstr("Sconto", $order->PercSconto);
|
||||
|
||||
Reference in New Issue
Block a user