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,12 +28,12 @@ final class IvaImportDevelopmentDraftTest extends TestCase
$store = json_decode($recovered['modelo_a_snapshot'], true, flags: JSON_THROW_ON_ERROR);
$book = $store['importExemptions']['opportunity:338'];
$this->assertCount(2, $book['rows']);
$this->assertSame(['un_development_exemption','un_development_reduction'], array_column($book['rows'], 'treatment'));
$this->assertSame(['0.00','400.00'], array_column($book['result']['rows'], 'importVat'));
$this->assertSame(['exempt','reduced'], array_column($book['result']['rows'], 'status'));
$this->assertSame(['un_development_exemption', 'un_development_reduction'], array_column($book['rows'], 'treatment'));
$this->assertSame(['0.00', '400.00'], array_column($book['result']['rows'], 'importVat'));
$this->assertSame(['exempt', 'reduced'], array_column($book['result']['rows'], 'status'));
$this->assertSame('2026-12', $book['rows'][0]['period']);
$this->assertSame('5000', $book['rows'][0]['declaredValue']);
foreach (['developmentProject','developmentAgency','developmentDecisionRef','developmentListRef','developmentPlanRef','developmentScope','developmentRightsRef'] as $field) {
foreach (['developmentProject', 'developmentAgency', 'developmentDecisionRef', 'developmentListRef', 'developmentPlanRef', 'developmentScope', 'developmentRightsRef'] as $field) {
$this->assertStringContainsString('SYNTHETIC QA', $book['rows'][0][$field]);
}
$this->assertSame('50', $book['rows'][1]['developmentReductionPercent']);