Fixes for validation

This commit is contained in:
David Bomba
2026-01-02 08:34:20 +11:00
parent 2214acaedd
commit 30e14b82a6
2 changed files with 3 additions and 1 deletions

View File

@@ -271,7 +271,7 @@ class EntityLevel implements EntityLevelInterface
}
//test legal entity id present
if(isset($company->legal_entity_id) && intval($company->legal_entity_id) > 0){
if(intval($company->legal_entity_id) == 0){
$errors[] = ['field' => "You have not registered a legal entity id as yet."];
}

View File

@@ -84,6 +84,8 @@ class EInvoiceValidationTest extends TestCase
$el = new EntityLevel();
$validation = $el->checkCompany($company);
$this->assertTrue(isset($company->legal_entity_id));
$this->assertTrue(intval($company->legal_entity_id) > 0);
$this->assertTrue($validation['passes']);
}