mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2026-03-03 03:07:01 +00:00
Fixes for validation
This commit is contained in:
@@ -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."];
|
||||
}
|
||||
|
||||
|
||||
@@ -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']);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user