aa
This commit is contained in:
@@ -2170,6 +2170,15 @@ Route::post('/updatecreate', function (Request $request) {
|
|||||||
|
|
||||||
$myidInternet = (int) $request->id;
|
$myidInternet = (int) $request->id;
|
||||||
|
|
||||||
|
if ($myidInternet > 0) {
|
||||||
|
$clienteinGM = Clientegm::where('IdInternet', $myidInternet)->first();
|
||||||
|
if ($clienteinGM) {
|
||||||
|
$productLogger->addLog('', 'clienteinGM: ' . json_encode($clienteinGM));
|
||||||
|
$cliente = $clienteinGM;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$productLogger->addLog('', json_encode($request->all()));
|
$productLogger->addLog('', json_encode($request->all()));
|
||||||
$productLogger->addLog('', 'myidInternet=' . $myidInternet);
|
$productLogger->addLog('', 'myidInternet=' . $myidInternet);
|
||||||
@@ -2253,17 +2262,10 @@ Route::post('/updatecreate', function (Request $request) {
|
|||||||
$productLogger->addLog('', 'crea Cliente: ' . $customer['last_name'] . " " . $customer['first_name']);
|
$productLogger->addLog('', 'crea Cliente: ' . $customer['last_name'] . " " . $customer['first_name']);
|
||||||
|
|
||||||
$cliente = null;
|
$cliente = null;
|
||||||
|
|
||||||
if ($myidInternet > 0) {
|
|
||||||
$productLogger->addLog('', 'cerco Cliente su GM:' . $myidInternet);
|
|
||||||
$clienteinGM = Clientegm::where('IdInternet', $myidInternet)->first();
|
|
||||||
// write in the console the array "$clients"
|
|
||||||
|
|
||||||
if ($clienteinGM) {
|
if ($clienteinGM) {
|
||||||
$productLogger->addLog('', 'Cliente su GM! ' . json_encode($clienteinGM) . 'con IdInternet=' . $myidInternet);
|
$productLogger->addLog('', 'Cliente su GM! ' . json_encode($clienteinGM) . 'con IdInternet=' . $myidInternet);
|
||||||
$cliente = $clienteinGM;
|
$cliente = $clienteinGM;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($cliente == null) {
|
if ($cliente == null) {
|
||||||
$cliente = new Clientegm();
|
$cliente = new Clientegm();
|
||||||
@@ -5883,6 +5885,7 @@ Route::get('/test30/{id}', function ($id) {
|
|||||||
*/
|
*/
|
||||||
dd($clienti);
|
dd($clienti);
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/testclientegm/{id}', function ($id) {
|
Route::get('/testclientegm/{id}', function ($id) {
|
||||||
$myidInternet = (int) $id;
|
$myidInternet = (int) $id;
|
||||||
$cliente = null;
|
$cliente = null;
|
||||||
@@ -5893,13 +5896,12 @@ Route::get('/testclientegm/{id}', function ($id) {
|
|||||||
// write in the console the array "$clients"
|
// write in the console the array "$clients"
|
||||||
|
|
||||||
if ($clienteinGM) {
|
if ($clienteinGM) {
|
||||||
echo 'Cliente su GM! ' . json_encode($clienteinGM) . 'con IdInternet=' . $myidInternet;
|
echo '<br>Cliente su GM! ' . json_encode($clienteinGM) . '<br>con IdInternet=' . $myidInternet;
|
||||||
$cliente = $clienteinGM;
|
$cliente = $clienteinGM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Cliente:";
|
echo "<br>Cliente:" . json_encode($cliente);
|
||||||
json_encode($cliente);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/test31', function () {
|
Route::get('/test31', function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user