This commit is contained in:
paoloar77
2024-07-16 10:26:39 +02:00
parent 0575425266
commit f718b842cd
2 changed files with 7 additions and 7 deletions

View File

@@ -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 {