se già esiste l'ordine, non crearne uno nuovo

This commit is contained in:
paoloar77
2024-08-12 10:44:54 +02:00
parent 91e3cb9867
commit 2c38001843
3 changed files with 22 additions and 6 deletions

View File

@@ -2183,7 +2183,6 @@ Route::get('/testcli', function () {
} catch (\Throwable $th) {
dd($th);
}
});
Route::post('/updatecreate', function (Request $request) {
@@ -2208,6 +2207,13 @@ Route::post('/updatecreate', function (Request $request) {
$myidInternet = (int) $request->id;
$CodClienteInternet = (int) $request->customer_id;
$myexistorder = getOrderByIdInternet($myidInternet);
if ($myexistorder) {
// Se questo ordine è stato già creato, allora ESCO.
$productLogger->addLog('', 'ORDINE GIA ESISTENTE ! ' . $myidInternet);
return true;
}
$clienteinGM = null;
$codClienteGM = '';