diff --git a/app/CustomFuncPao.php b/app/CustomFuncPao.php
index 132564ed..39d70d2b 100644
--- a/app/CustomFuncPao.php
+++ b/app/CustomFuncPao.php
@@ -478,12 +478,12 @@ function showOrdini()
// $str = Schema::getColumnListing('Orderdetails');
$orders = Orderdetail::orderBy('DataOra', 'desc')
- ->take(20)
+ ->take(100)
->get();
// Show the fields of the orders
foreach ($orders as $order) {
- // $product = Product::where('sku', $order->CodArticoloGM)->first();
+ $product = Product::where('sku', $order->CodArticoloGM)->first();
$str .= getvalstr("", $order->Codice) . " ";
$str .= getvalstr("", $order->DataOra);
@@ -496,7 +496,7 @@ function showOrdini()
if ($order->Descrizione)
$str .= getvalstr("Descr", $order->Descrizione);
- //$str .= $product;
+ $str .= getarraystr($product) . "
";
// $str .= $product;
$str .= '
';
}
diff --git a/routes/web.php b/routes/web.php
index 2ea850c7..d11bf5ae 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -2176,11 +2176,13 @@ Route::post('/updatecreate', function (Request $request) {
$clienteinGM = null;
+ $codClienteGM = '';
+
if ($CodClienteInternet > 0) {
$clienteinGM = getClienteByIdCodClienteInternet($CodClienteInternet);
if ($clienteinGM) {
+ // $codClienteGM = $clienteinGM
$productLogger->addLog('', 'clienteinGM: ' . json_encode($clienteinGM));
- $cliente = $clienteinGM;
}
}
@@ -2253,8 +2255,6 @@ Route::post('/updatecreate', function (Request $request) {
$productLogger->addLog('', 'Cerco il customer_id: ' . $CodClienteInternet);
- $creatoNuovoCliente = false;
-
// if ($CodClienteInternet > 0) {
// $customer = Customer::find($CodClienteInternet);
// } else {
@@ -2283,7 +2283,6 @@ Route::post('/updatecreate', function (Request $request) {
if ($cliente === null) {
$cliente = new Clientegm();
- $creatoNuovoCliente = true;
}
$cliente->CodClienteInternet = $CodClienteInternet;
@@ -2294,6 +2293,7 @@ Route::post('/updatecreate', function (Request $request) {
$cliente->Provincia = $provincia;
$cliente->Telefono = $telefono;
$cliente->Email = $email;
+ $cliente->CodClienteGM = $codClienteGM;
if ($nazione == 'IT') {
$cliente->IdNazione = 227; // ITALIA
} else {