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
+6 -6
View File
@@ -1,4 +1,5 @@
<?php
namespace Tests\Feature;
use App\Models\User;
@@ -27,11 +28,11 @@ final class IvaNoncashBaseDraftTest extends TestCase
$store = json_decode($recovered['modelo_a_snapshot'], true, flags: JSON_THROW_ON_ERROR);
$book = $store['noncashBases']['opportunity:343'];
$this->assertCount(2, $book['rows']);
$this->assertSame(['noncash_only','cash_and_noncash'], array_column($book['rows'], 'treatment'));
$this->assertSame(['2200.50','2700.75'], array_column($book['result']['rows'], 'baseAmount'));
$this->assertSame(['determined','determined'], array_column($book['result']['rows'], 'status'));
$this->assertSame([null,null], array_column($book['result']['rows'], 'vat'));
$this->assertSame([null,null], array_column($book['result']['rows'], 'rate'));
$this->assertSame(['noncash_only', 'cash_and_noncash'], array_column($book['rows'], 'treatment'));
$this->assertSame(['2200.50', '2700.75'], array_column($book['result']['rows'], 'baseAmount'));
$this->assertSame(['determined', 'determined'], array_column($book['result']['rows'], 'status'));
$this->assertSame([null, null], array_column($book['result']['rows'], 'vat'));
$this->assertSame([null, null], array_column($book['result']['rows'], 'rate'));
$this->assertSame('500.25', $book['rows'][0]['cashAmount']);
$this->assertSame('2200.50', $book['rows'][0]['normalValue']);
$this->assertStringContainsString('parte monetária', $book['rows'][0]['cashRef']);
@@ -53,4 +54,3 @@ final class IvaNoncashBaseDraftTest extends TestCase
file_put_contents(base_path('outputs/iva-l1-g7e-noncash-base-20261024/recovered.json'), json_encode($recovered, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE));
}
}