fix: complete InvesteMoz validation and error corrections

This commit is contained in:
2026-10-29 21:47:33 +02:00
parent 63147312e2
commit daf8623441
718 changed files with 127308 additions and 20959 deletions
@@ -1,4 +1,5 @@
<?php
namespace Tests\Feature;
use App\Models\User;
@@ -27,10 +28,12 @@ final class IvaServiceLocationDraftTest extends TestCase
$store = json_decode($recovered['modelo_a_snapshot'], true, flags: JSON_THROW_ON_ERROR);
$book = $store['serviceLocations']['opportunity:349'];
$this->assertCount(10, $book['rows']);
$this->assertSame(['general_service','general_service','immovable_service','immovable_service','movable_work','movable_work','activity_service','activity_service','transport_service','transport_service'],array_column($book['rows'],'treatment'));
$this->assertSame(['national','outside','national','outside','national','outside','national','outside','national','outside'],array_column($book['result']['rows'],'territory'));
$this->assertSame(['general_service', 'general_service', 'immovable_service', 'immovable_service', 'movable_work', 'movable_work', 'activity_service', 'activity_service', 'transport_service', 'transport_service'], array_column($book['rows'], 'treatment'));
$this->assertSame(['national', 'outside', 'national', 'outside', 'national', 'outside', 'national', 'outside', 'national', 'outside'], array_column($book['result']['rows'], 'territory'));
foreach ($book['result']['rows'] as $row) {
$this->assertNull($row['baseAmount']);$this->assertNull($row['vat']);$this->assertNull($row['rate']);
$this->assertNull($row['baseAmount']);
$this->assertNull($row['vat']);
$this->assertNull($row['rate']);
}
$this->assertSame($book['rows'], $book['result']['inputs']);
$this->assertCount(1, $book['history']);
@@ -45,4 +48,3 @@ final class IvaServiceLocationDraftTest extends TestCase
file_put_contents(base_path('outputs/iva-l1-g8-services-20261024/recovered.json'), json_encode($recovered, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE));
}
}