gestione gare pubbliche
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.
 
 
 
 
 

41 righe
1.5 KiB

<?
if (isset($gara)) {
$statuses = [];
$__badgeBusteAccesso = 0;
foreach($lotti AS $lotto) {
$gara->setLotto($lotto["codice"]);
$hrefComandoStatus = $hrefComando . "&codice_lotto={$lotto["codice"]}";
if ($gara->pubblicaAtti($lotto["codice"])) {
$statuses[] = "status-border-success";
} else if ($lotto["stato"] >= 50) {
$statuses[] = "status-border-danger";
$alertManager->addDangerAlert(__("Lotto") . " " . $lotto["numero"] . " - " . __("Accesso agli atti non avviato"),$hrefComandoStatus);
}
$buste = $gara->getBusteSoggetteAccesso();
$__badgeLotto = 0;
if (!empty($buste)) {
foreach($buste AS $partecipante => $documenti) {
$stato = array_column($documenti,"pubblica");
$stato = array_replace($stato,array_fill_keys(array_keys($stato, null),'W'));
$stati = array_count_values($stato);
if (!empty($stati["W"])) {
$statuses[] = "status-border-danger";
$__badgeLotto += $stati["W"];
$__badgeBusteAccesso += $__badgeLotto;
}
}
}
if (!empty($__badgeLotto)) {
$alertManager->addDangerAlert(__("Lotto") . " " . $lotto["numero"] . " - " . __("Documenti in attesa di pubblicazione") . ": " . $__badgeLotto,$hrefComandoStatus);
}
}
$statuses = array_unique($statuses);
if (count($statuses) === 1) {
$status = $statuses[0];
} else {
$status = "status-border-warning";
}
$gara->lotto = null;
}
?>