getLotti($codice_lotto)[0] ?? NULL; if (!empty($lotto["codice"])) { $simogMethod = "cancellaLotto"; if ($operation == "get") { $return = []; $return["method"] = $simogMethod; $return["data"] = []; $return["data"]["cig"] = $lotto["cig"]; $dati = json_decode($lotto["dati"],true); $return["data"]["id_motivazione"] = $dati["id_motivazione"]; $return["data"]["note_canc"] = ""; } else if ($operation == "put" && !empty($response)) { if (!empty($response->return->success)) { $this->updateSimogLog($simogMethod,1,"",$lotto["codice"]); if (!empty($response->return->success)) { $update = []; $update["codice"] = $lotto["codice"]; $update["eliminato"] = "S"; $salva = new salva(); $salva->debug = false; $salva->nome_tabella = "b_simog_lotti"; $salva->operazione = "UPDATE"; $salva->oggetto = $update; $salva->save(); } alertManager::printSuccessBox(__("Operazione effettuata con successo")); ?> return->error)) { $errors = $response->return->error; } else { $errors = __("Errore nella risposta"); } } else { $errors = __("Operazione sconosciuta"); } } else { $errors = __("Impossibile trovare lotto"); } if (!empty($errors)) { $this->updateSimogLog($simogMethod,2,$errors,$lotto["codice"]); alertManager::printAlertBox($errors); } } ?>