Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
83 righe
3.3 KiB
83 righe
3.3 KiB
<? |
|
if (isset($this) && is_a($this,"anac")) { |
|
$lotto = $this->getLotti()[0]; |
|
if (!empty($lotto)) { |
|
$simogMethod = "comunicaSingola"; |
|
if ($operation == "get") { |
|
$codice_lotto = $lotto["codice"]; |
|
$return = []; |
|
$return["method"] = $simogMethod; |
|
$return["data"] = []; |
|
$array = []; |
|
$dati = $this->getDati(); |
|
$array["cig"] = $lotto["cig"]; |
|
$array["codiceFattispecieContrattuale"] = $dati["codiceFattispecieContrattuale"]; |
|
$array["importo"] = $lotto["importo"]; |
|
$array["oggetto"] = $lotto["oggetto"]; |
|
$array["codiceProceduraSceltaContraente"] = $dati["codiceProceduraSceltaContraente"]; |
|
$array["codiceClassificazioneGara"] = $dati["codiceClassificazioneGara"]; |
|
$array["cigAccordoQuadro"] = $dati["cigAccordoQuadro"]; |
|
$array["cup"] = $lotto["cup"]; |
|
$array["motivo_rich_cig_catmerc"] = $dati["motivo_rich_cig_catmerc"]; |
|
$array["motivo_rich_cig_comuni"] = ""; |
|
$array["categorie_merc"] = ["categoria"=>$dati["categorie_merc"]]; |
|
$return["data"]["comunicazione"] = $array; |
|
} else if ($operation == "put" && !empty($response)) { |
|
if (!empty($response->cig)) { |
|
$this->updateSimogLog($simogMethod,1,""); |
|
$this->updateStato("10"); |
|
$gara = []; |
|
$gara["codice"] = $this->info["codice"]; |
|
$gara["cf_utente_simog"] = $_SESSION["simog"]["username"]; |
|
$gara["data_invio_simog"] = date("d-m-Y H:i:s"); |
|
$gara["id_stazione_appaltante"] = $_SESSION["simog"]["collaborazione"]["ufficio_id"]; |
|
$salva = new salva(); |
|
$salva->debug = false; |
|
|
|
$salva->nome_tabella = "b_simog"; |
|
$salva->operazione = "UPDATE"; |
|
$salva->oggetto = $gara; |
|
$salva->save(); |
|
|
|
$lotto["cig"] = $response->cig; |
|
$lotto["data_invio_simog"] = date("d-m-Y H:i:s"); |
|
$lotto["richiesto_simog"] = "S"; |
|
$salva = new salva(); |
|
$salva->debug = false; |
|
|
|
$salva->nome_tabella = "b_simog_lotti"; |
|
$salva->operazione = "UPDATE"; |
|
$salva->oggetto = $lotto; |
|
$salva->save(); |
|
|
|
?> |
|
<div class="alert alert-success p-5 text-center"> |
|
<span class="fa fa-check fa-3x"></span><br> |
|
<?= __("Operazione effettuata con successo") ?><br> |
|
<span class="h3"><?= $lotto["cig"] ?></span> |
|
</div> |
|
<button type="button" class="btn btn-info btn-block mt-3" onClick="showModalWithURL('/backend/anac/lotti/ricevuta-cig.php?codice_simog=<?= $this->info["codice"] ?>&codice_lotto=<?= $lotto["codice"] ?>')"> |
|
<span class="fa fa-file"></span> <?= __("Ricevuta CIG") ?> |
|
</button> |
|
<? |
|
|
|
$return = true; |
|
} else if (!empty($response->errore->errore)) { |
|
$errors = $response->errore->errore; |
|
} else if (!empty($response->codiceRisultato->descrizione)) { |
|
$errors = $response->codiceRisultato->descrizione; |
|
} else { |
|
$errors = __("Errore nella risposta"); |
|
} |
|
} else { |
|
$errors = __("Operazione sconosciuta"); |
|
} |
|
} else { |
|
$errors = __("Impossibile trovare il lotto"); |
|
} |
|
if (!empty($errors)) { |
|
$this->updateSimogLog($simogMethod,2,$errors); |
|
alertManager::printAlertBox($errors); |
|
} |
|
} |
|
?>
|