Commaaab
This commit is contained in:
@@ -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
2043
app/CustomFuncPao.php.save
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,4 @@
|
|||||||
{
|
"name": "laravel/laravel",
|
||||||
"name": "laravel/laravel",
|
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"description": "The Laravel Framework.",
|
"description": "The Laravel Framework.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
25
resources/views/ordini.blade.php
Normal file
25
resources/views/ordini.blade.php
Normal 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
|
||||||
@@ -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')
|
||||||
|
|||||||
@@ -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
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -182,8 +185,8 @@ class Container implements ArrayAccess, ContainerContract
|
|||||||
public function bound($abstract)
|
public function bound($abstract)
|
||||||
{
|
{
|
||||||
return isset($this->bindings[$abstract]) ||
|
return isset($this->bindings[$abstract]) ||
|
||||||
isset($this->instances[$abstract]) ||
|
isset($this->instances[$abstract]) ||
|
||||||
$this->isAlias($abstract);
|
$this->isAlias($abstract);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -209,7 +212,7 @@ class Container implements ArrayAccess, ContainerContract
|
|||||||
}
|
}
|
||||||
|
|
||||||
return isset($this->resolved[$abstract]) ||
|
return isset($this->resolved[$abstract]) ||
|
||||||
isset($this->instances[$abstract]);
|
isset($this->instances[$abstract]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -221,8 +224,8 @@ class Container implements ArrayAccess, ContainerContract
|
|||||||
public function isShared($abstract)
|
public function isShared($abstract)
|
||||||
{
|
{
|
||||||
return isset($this->instances[$abstract]) ||
|
return isset($this->instances[$abstract]) ||
|
||||||
(isset($this->bindings[$abstract]['shared']) &&
|
(isset($this->bindings[$abstract]['shared']) &&
|
||||||
$this->bindings[$abstract]['shared'] === true);
|
$this->bindings[$abstract]['shared'] === true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -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
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -330,7 +335,7 @@ class Container implements ArrayAccess, ContainerContract
|
|||||||
protected function parseBindMethod($method)
|
protected function parseBindMethod($method)
|
||||||
{
|
{
|
||||||
if (is_array($method)) {
|
if (is_array($method)) {
|
||||||
return $method[0].'@'.$method[1];
|
return $method[0] . '@' . $method[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $method;
|
return $method;
|
||||||
@@ -943,8 +948,8 @@ class Container implements ArrayAccess, ContainerContract
|
|||||||
// primitive type which we can not resolve since it is not a class and
|
// primitive type which we can not resolve since it is not a class and
|
||||||
// we will just bomb out with an error since we have no-where to go.
|
// we will just bomb out with an error since we have no-where to go.
|
||||||
$result = is_null(Util::getParameterClassName($dependency))
|
$result = is_null(Util::getParameterClassName($dependency))
|
||||||
? $this->resolvePrimitive($dependency)
|
? $this->resolvePrimitive($dependency)
|
||||||
: $this->resolveClass($dependency);
|
: $this->resolveClass($dependency);
|
||||||
|
|
||||||
if ($dependency->isVariadic()) {
|
if ($dependency->isVariadic()) {
|
||||||
$results = array_merge($results, $result);
|
$results = array_merge($results, $result);
|
||||||
@@ -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()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1000,7 +1006,7 @@ class Container implements ArrayAccess, ContainerContract
|
|||||||
*/
|
*/
|
||||||
protected function resolvePrimitive(ReflectionParameter $parameter)
|
protected function resolvePrimitive(ReflectionParameter $parameter)
|
||||||
{
|
{
|
||||||
if (! is_null($concrete = $this->getContextualConcrete('$'.$parameter->getName()))) {
|
if (! is_null($concrete = $this->getContextualConcrete('$' . $parameter->getName()))) {
|
||||||
return $concrete instanceof Closure ? $concrete($this) : $concrete;
|
return $concrete instanceof Closure ? $concrete($this) : $concrete;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1023,8 +1029,8 @@ class Container implements ArrayAccess, ContainerContract
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return $parameter->isVariadic()
|
return $parameter->isVariadic()
|
||||||
? $this->resolveVariadicClass($parameter)
|
? $this->resolveVariadicClass($parameter)
|
||||||
: $this->make(Util::getParameterClassName($parameter));
|
: $this->make(Util::getParameterClassName($parameter));
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we can not resolve the class instance, we will check to see if the value
|
// If we can not resolve the class instance, we will check to see if the value
|
||||||
@@ -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)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1414,7 +1422,7 @@ class Container implements ArrayAccess, ContainerContract
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
#[\ReturnTypeWillChange]
|
#[\ReturnTypeWillChange]
|
||||||
public function offsetGet($key)
|
public function offsetGet($key)
|
||||||
{
|
{
|
||||||
return $this->make($key);
|
return $this->make($key);
|
||||||
}
|
}
|
||||||
@@ -1427,7 +1435,7 @@ class Container implements ArrayAccess, ContainerContract
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
#[\ReturnTypeWillChange]
|
#[\ReturnTypeWillChange]
|
||||||
public function offsetSet($key, $value)
|
public function offsetSet($key, $value)
|
||||||
{
|
{
|
||||||
$this->bind($key, $value instanceof Closure ? $value : function () use ($value) {
|
$this->bind($key, $value instanceof Closure ? $value : function () use ($value) {
|
||||||
return $value;
|
return $value;
|
||||||
|
|||||||
Reference in New Issue
Block a user