Fix controllo numerazione attività

This commit is contained in:
Pek5892 2024-04-30 18:03:45 +02:00
parent b14fced154
commit 4fdb6a6c94
3 changed files with 5 additions and 2 deletions

View File

@ -26,6 +26,7 @@ include_once __DIR__.'/../../core.php';
$block_edit = $record['flag_completato'];
$id_modulo_anagrafiche = (new Module())->getByField('title', 'Anagrafiche', Models\Locale::getPredefined()->id);
$id_segment = $record['id_segment'];
// Verifica aggiuntive sulla sequenzialità dei numeri
$numero_previsto = verifica_numero_intervento($intervento, $id_segment);

View File

@ -25,7 +25,8 @@ use Modules\Interventi\Intervento;
if (!empty($id_record)) {
$intervento = Intervento::find($id_record);
$record = $dbo->fetchOne('SELECT *,
$record = $dbo->fetchOne('SELECT
`in_interventi`.*,
`in_interventi`.`descrizione` AS descrizione,
`in_interventi`.`codice` AS codice,
`an_anagrafiche`.`tipo` AS tipo_anagrafica,
@ -37,7 +38,7 @@ if (!empty($id_record)) {
`in_interventi`.`id_contratto` as idcontratto,
`in_interventi`.`id_ordine` as idordine
FROM
in_interventi
`in_interventi`
INNER JOIN `an_anagrafiche` ON `in_interventi`.`idanagrafica` = `an_anagrafiche`.`idanagrafica`
LEFT JOIN `an_sedi` ON `in_interventi`.`idsede_destinazione` = `an_sedi`.`id`
INNER JOIN `in_statiintervento` ON `in_interventi`.`idstatointervento` = `in_statiintervento`.`id`

View File

@ -24,6 +24,7 @@ use PHPSQLParser\PHPSQLParser;
if (!empty($id_record)) {
$record = $dbo->fetchOne('SELECT
`zz_segments`.*,
`zz_segments_lang`.`title`,
`zz_modules`.`options`,
`zz_modules_lang`.`title` AS modulo,
(SELECT COUNT(`t`.`id`) FROM `zz_segments` t WHERE `t`.`id_module` = `zz_segments`.`id_module`) AS n_sezionali