@@ -395,12 +395,13 @@ function highlightDifferences($current, $expected)
395395 // Conta gli avvisi per tipo
396396 $ view_warning_count = 0 ;
397397 $ view_info_count = 0 ;
398+ $ view_premium_count = 0 ;
398399
399400 if ($ has_view_data_issues ) {
400401 foreach ($ custom_views_not_standard as $ view ) {
401402 // Verifica se la reason inizia con "Vista modulo"
402403 if (str_starts_with ($ view ['reason ' ], 'Vista modulo ' )) {
403- $ view_info_count ++;
404+ $ view_premium_count ++;
404405 } else {
405406 match ($ view ['reason ' ]) {
406407 'Vista aggiuntiva ' => $ view_info_count ++,
@@ -428,6 +429,7 @@ function highlightDifferences($current, $expected)
428429 ' .tr ('Viste personalizzate ' ).'
429430 ' .($ view_warning_count > 0 ? '<span class="badge badge-warning ml-2"> ' .$ view_warning_count .'</span> ' : '' ).'
430431 ' .($ view_info_count > 0 ? '<span class="badge badge-info ml-2"> ' .$ view_info_count .'</span> ' : '' ).'
432+ ' .($ view_premium_count > 0 ? '<span class="badge badge-primary ml-2"> ' .$ view_premium_count .'</span> ' : '' ).'
431433 </h3>
432434 <div class="card-tools pull-right">
433435 <button type="button" class="btn btn-tool" data-card-widget="collapse">
@@ -537,12 +539,13 @@ function highlightDifferences($current, $expected)
537539 // Conta gli avvisi per tipo
538540 $ module_warning_count = 0 ;
539541 $ module_info_count = 0 ;
542+ $ module_premium_count = 0 ;
540543
541544 if ($ has_module_data_issues ) {
542545 foreach ($ custom_modules_not_standard as $ modulo ) {
543546 // Verifica se la reason è "Modulo Premium"
544547 if ($ modulo ['reason ' ] === 'Modulo Premium ' ) {
545- $ module_info_count ++;
548+ $ module_premium_count ++;
546549 } else {
547550 match ($ modulo ['reason ' ]) {
548551 'Options modificato ' => $ module_warning_count ++,
@@ -569,6 +572,7 @@ function highlightDifferences($current, $expected)
569572 ' .tr ('Moduli personalizzati ' ).'
570573 ' .($ module_warning_count > 0 ? '<span class="badge badge-warning ml-2"> ' .$ module_warning_count .'</span> ' : '' ).'
571574 ' .($ module_info_count > 0 ? '<span class="badge badge-info ml-2"> ' .$ module_info_count .'</span> ' : '' ).'
575+ ' .($ module_premium_count > 0 ? '<span class="badge badge-primary ml-2"> ' .$ module_premium_count .'</span> ' : '' ).'
572576 </h3>
573577 <div class="card-tools pull-right">
574578 <button type="button" class="btn btn-tool" data-card-widget="collapse">
@@ -835,8 +839,17 @@ function getModuleNameFromReference($reference_file, $folder_name, $modules_json
835839 $ foreign_keys = $ errors ['foreign_keys ' ] ?: [];
836840 unset($ errors ['foreign_keys ' ]);
837841
842+ // Filtra i campi premium prima del conteggio
843+ $ filtered_errors = [];
844+ foreach ($ errors as $ name => $ diff ) {
845+ // Verifica se il campo proviene da un modulo premium
846+ if (!isset ($ premium_fields [$ table ][$ name ])) {
847+ $ filtered_errors [$ name ] = $ diff ;
848+ }
849+ }
850+
838851 // Usa la funzione di utilità per contare gli errori
839- $ error_counts = Utils::countErrorsByType ($ errors , $ foreign_keys );
852+ $ error_counts = Utils::countErrorsByType ($ filtered_errors , $ foreign_keys );
840853 $ database_danger_count += $ error_counts ['danger ' ];
841854 $ database_warning_count += $ error_counts ['warning ' ];
842855 $ database_info_count += $ error_counts ['info ' ];
0 commit comments