This commit is contained in:
Paolo A
2024-08-13 13:50:19 +00:00
6 changed files with 2116 additions and 40 deletions

View File

@@ -497,6 +497,7 @@ function showOrdini()
foreach ($orders as $order) { foreach ($orders as $order) {
$product = Product::where('sku', $order->CodArticoloGM)->first(); $product = Product::where('sku', $order->CodArticoloGM)->first();
dd($product);
// $product = null; // $product = null;
if ($product) if ($product)
@@ -2020,3 +2021,23 @@ function getClienti()
return null; return null;
} }
} }
function getvalstr($mystr, $value, $separato = false)
{
$my = '';
if ($mystr) {
$my = " " . $mystr . ": " . $value;
} else {
$my = $value;
if (!$separato) {
$my = " " . $value;
}
}
if ($separato) {
$my = '[' . $my . '] ';
}
return $my;
}

2043
app/CustomFuncPao.php.save Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,3 @@
{
"name": "laravel/laravel", "name": "laravel/laravel",
"type": "project", "type": "project",
"description": "The Laravel Framework.", "description": "The Laravel Framework.",

View File

@@ -0,0 +1,25 @@
@foreach($orders as $order)
@php
$product = $order->product;
$titolo = $product && isset($product->permalink)
? "<a href='{$product->permalink}' target='_blank'><span style='font-weight: bold;'>{$product->name}</span></a>"
: "";
@endphp
{{ getvalstr("", $order->Codice) }}
{{ getvalstr("", $order->DataOra) }}
{{ getvalstr("", $titolo) }}
{{ getvalstr("Ordine", $order->IdInternet, true) }}
{{ getvalstr("Articolo", $order->CodArticoloGM, true) }}
{{ getvalstr("Prezzo", $order->PrezzoLordo) }}
{{ getvalstr("Quantità", $order->Qta) }}
@if($order->PercSconto)
{{ getvalstr("Sconto", $order->PercSconto) }}
@endif
@if($order->Descrizione)
{{ getvalstr("Descr", $order->Descrizione) }}
@endif
<a href="{{ $baseUrl }}apimacro/public/setordine/{{ $order->IdInternet }}/del/" target="_blank">ELIMINA!</a>
<br>
@endforeach

View File

@@ -1679,26 +1679,6 @@ Route::get('/autori_test', function () {
} }
}); });
function getvalstr($mystr, $value, $separato = false)
{
$my = '';
if ($mystr) {
$my = " " . $mystr . ": " . $value;
} else {
$my = $value;
if (!$separato) {
$my = " " . $value;
}
}
if ($separato) {
$my = '[' . $my . '] ';
}
return $my;
}
Route::get('/test7/{name}', function ($name) { Route::get('/test7/{name}', function ($name) {
$articles = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli WHERE Titolo LIKE \'%' . $name . '%\' GROUP BY IdArticolo) b'), function ($join) { $articles = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli WHERE Titolo LIKE \'%' . $name . '%\' GROUP BY IdArticolo) b'), function ($join) {
$join->on('T_WEB_Articoli.IdArticolo', '=', 'b.IdArticolo') $join->on('T_WEB_Articoli.IdArticolo', '=', 'b.IdArticolo')

View File

@@ -14,6 +14,9 @@ use ReflectionException;
use ReflectionParameter; use ReflectionParameter;
use TypeError; use TypeError;
use ReturnTypeWillChange; // Aggiungi questa riga in cima al file se non è già presente
class Container implements ArrayAccess, ContainerContract class Container implements ArrayAccess, ContainerContract
{ {
/** /**
@@ -262,7 +265,7 @@ class Container implements ArrayAccess, ContainerContract
// up inside its own Closure to give us more convenience when extending. // up inside its own Closure to give us more convenience when extending.
if (! $concrete instanceof Closure) { if (! $concrete instanceof Closure) {
if (! is_string($concrete)) { if (! is_string($concrete)) {
throw new TypeError(self::class.'::bind(): Argument #2 ($concrete) must be of type Closure|string|null'); throw new \TypeError(self::class . '::bind(): Argument #2 ($concrete) must be of type Closure|string|null');
} }
$concrete = $this->getClosure($abstract, $concrete); $concrete = $this->getClosure($abstract, $concrete);
@@ -293,7 +296,9 @@ class Container implements ArrayAccess, ContainerContract
} }
return $container->resolve( return $container->resolve(
$concrete, $parameters, $raiseEvents = false $concrete,
$parameters,
$raiseEvents = false
); );
}; };
} }
@@ -965,7 +970,8 @@ class Container implements ArrayAccess, ContainerContract
protected function hasParameterOverride($dependency) protected function hasParameterOverride($dependency)
{ {
return array_key_exists( return array_key_exists(
$dependency->name, $this->getLastParameterOverride() $dependency->name,
$this->getLastParameterOverride()
); );
} }
@@ -1209,7 +1215,8 @@ class Container implements ArrayAccess, ContainerContract
$this->fireCallbackArray($object, $this->globalResolvingCallbacks); $this->fireCallbackArray($object, $this->globalResolvingCallbacks);
$this->fireCallbackArray( $this->fireCallbackArray(
$object, $this->getCallbacksForType($abstract, $object, $this->resolvingCallbacks) $object,
$this->getCallbacksForType($abstract, $object, $this->resolvingCallbacks)
); );
$this->fireAfterResolvingCallbacks($abstract, $object); $this->fireAfterResolvingCallbacks($abstract, $object);
@@ -1227,7 +1234,8 @@ class Container implements ArrayAccess, ContainerContract
$this->fireCallbackArray($object, $this->globalAfterResolvingCallbacks); $this->fireCallbackArray($object, $this->globalAfterResolvingCallbacks);
$this->fireCallbackArray( $this->fireCallbackArray(
$object, $this->getCallbacksForType($abstract, $object, $this->afterResolvingCallbacks) $object,
$this->getCallbacksForType($abstract, $object, $this->afterResolvingCallbacks)
); );
} }