aggio
This commit is contained in:
14
launch.json
Normal file
14
launch.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "LARAVEL Listen for Xdebug (PROD)",
|
||||
"type": "php",
|
||||
"request": "launch",
|
||||
"port": 9003,
|
||||
"pathMappings": {
|
||||
"/var/www/html": "${workspaceFolder}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2142,6 +2142,11 @@ Route::get('/test9/{name}', function ($name) {
|
||||
dd($products);
|
||||
});
|
||||
|
||||
Route::post('/pao1', function (Request $request) {
|
||||
echo 'PROVA';
|
||||
|
||||
dd($request->all());
|
||||
});
|
||||
|
||||
Route::post('/updatecreate', function (Request $request) {
|
||||
|
||||
@@ -2232,19 +2237,20 @@ Route::post('/updatecreate', function (Request $request) {
|
||||
$customer['last_name'] = $request->billing['last_name'];
|
||||
$customer['first_name'] = $request->billing['first_name'];
|
||||
$customer['billing'] = $request->billing;
|
||||
$customer['meta_data'] = $request->meta_data;
|
||||
}
|
||||
$productLogger->addLog('', 'crea Cliente: ' . $customer['last_name'] . " " . $customer['first_name']);
|
||||
|
||||
|
||||
$cliente = new Clientegm();
|
||||
|
||||
|
||||
if ($CodClienteInternet > 0) {
|
||||
$clients = Clientegm::where('CodClienteInternet', $CodClienteInternet)->get();
|
||||
// se l'array non è vuoto
|
||||
if (!$clients->isEmpty()) {
|
||||
$cliente = $clients->first();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$cliente->CodClienteInternet = isset($customer['id']) ? $customer['id'] : '';
|
||||
$cliente->Nominativo = isset($customer['last_name']) ? $customer['last_name'] . " " . $customer['first_name'] : '';
|
||||
$cliente->Indirizzo = isset($customer['billing']->address_1) ? $customer['billing']->address_1 . " " . $customer['billing']->address_2 : '';
|
||||
@@ -2256,13 +2262,17 @@ Route::post('/updatecreate', function (Request $request) {
|
||||
$cliente->IdNazione = 227;
|
||||
|
||||
$metas = $customer['meta_data'];
|
||||
foreach ($metas as $meta) {
|
||||
try {
|
||||
foreach ($metas as $meta) {
|
||||
|
||||
if ($meta->key == 'cod_fiscale') {
|
||||
$cliente->CodiceFiscale = $meta->value;
|
||||
} elseif ($meta->key == 'vat') {
|
||||
$cliente->PIVA = $meta->value;
|
||||
if ($meta->key == 'cod_fiscale') {
|
||||
$cliente->CodiceFiscale = $meta->value;
|
||||
} elseif ($meta->key == 'vat') {
|
||||
$cliente->PIVA = $meta->value;
|
||||
}
|
||||
}
|
||||
} catch (\Throwable $th) {
|
||||
$productLogger->addLog('', 'Errore: ' . $th->getMessage());
|
||||
}
|
||||
$cliente->IdInternet = $request->id;
|
||||
|
||||
@@ -2308,7 +2318,6 @@ Route::post('/updatecreate', function (Request $request) {
|
||||
}
|
||||
|
||||
$productLogger->setLogandSendEmail('Check Ordine... ');*/
|
||||
|
||||
} //end if status
|
||||
} catch (Exception $e) {
|
||||
Log::error($e->getMessage());
|
||||
|
||||
Reference in New Issue
Block a user