Atualizando arquivos

This commit is contained in:
Kenio 2025-08-03 07:19:01 -03:00
parent baaa0fec25
commit 592b5dfc7c
2 changed files with 20 additions and 3 deletions

View file

@ -1352,6 +1352,21 @@ class Main
}
public function identificarSistemaOuServico($texto) {
// Verifica se o padrão "O. O" está presente
if (preg_match('/O\. O/', $texto)) {
return 'Serv. Opcionais';
}
// Verifica se há "O, O" ou "S, S"
if (preg_match('/\b(O, O|S, S)\b/', $texto)) {
return 'Sistema Cartorário';
}
// Se nenhum padrão for encontrado
return 'Padrão não identificado';
}
function __destruct(){ }

View file

@ -43,7 +43,7 @@ try{
<tr>
<th class="text-center"></th>
<th class="text-center">Produto</th>
<th class="text-center">Referência</th>
<th class="text-center">Referências</th>
<th class="text-center">Descrição</th>
<th class="text-center">Reajuste</th>
<th class="text-center">Vencimento</th>
@ -67,8 +67,10 @@ try{
<tr onclick="prepareBudget('#id-<?php echo $i;?>', 'products', '<?php echo $Result->product_ids;?>', 0)" id="id-<?php echo $i;?>">
<td class="text-center"><input type="checkbox" id="group" name="group" value="S" checked=true></td>
<td><?php echo $Result->products;?></td>
<td class="text-center" width="65"><?php echo $Result->reference;?></td>
<td><?php echo $Result->description;?></td>
<td class="text-center" width="165"><?php echo $Result->references;?></td>
<td>
<?php echo $Main->identificarSistemaOuServico($Result->description);?>
</td>
<td class="text-center" width="90"><?php echo $Result->readjustment;?></td>
<td class="text-center" width="90"><?php echo $Main->setzeros($Result->maturity, 2);?></td>
<td class="text-right" width="120"><?php echo number_format($Result->total_product_value, 2, ',', '.');?></td>