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
+8 -2
View File
@@ -1,4 +1,5 @@
<?php
namespace Tests\Feature;
use App\Models\User;
@@ -10,6 +11,7 @@ use Tests\TestCase;
final class IvaHealthGoodsDraftTest extends TestCase
{
use DatabaseTransactions;
public function test_health_goods_round_trip_preserves_other_opportunity(): void
{
$target = DB::selectOne('select current_database() as name,inet_server_port() as port');
@@ -25,7 +27,11 @@ final class IvaHealthGoodsDraftTest extends TestCase
$this->assertCount(5, $book['result']['rows']);
$this->assertSame('500.00', $book['result']['periods'][0]['fields']['07']);
$this->assertSame(json_decode($draft['modelo_a_snapshot'], true)['salesOperations']['opportunity:310'], json_decode($recovered['modelo_a_snapshot'], true)['salesOperations']['opportunity:310']);
foreach ($book['result']['rows'] as $row) $this->assertSame('0.00', $row['vat']);
if (getenv('IVA_G2A_RECOVERED')) file_put_contents(getenv('IVA_G2A_RECOVERED'), json_encode($recovered, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE));
foreach ($book['result']['rows'] as $row) {
$this->assertSame('0.00', $row['vat']);
}
if (getenv('IVA_G2A_RECOVERED')) {
file_put_contents(getenv('IVA_G2A_RECOVERED'), json_encode($recovered, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE));
}
}
}