Make "IdSistemaInformatico" configurable to support multiple test instances #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



Summary
IdSistemaInformaticoconfigurable viaVERIFACTU_SYSTEM_IDenvironment variableProblem
While testing I would clear the database multiple times and reseed it back tih this command:
php artisan migrate:fresh -- seed.AEAT pre-production environment is so strict that it will reject the same invoice twice, or even create a new invoicing serie and tried again while testing, AEAT would reject invoices with the error that the same invoice with the same NIF cannot be
declared as the first invoice when using the same NIF and
IdSistemaInformatico. This prevented testing.Solution
system_idconfiguration inconfig/verifactu.phpwith default value '01'AeatClient.phpto read from config instead of hardcoded valueBenefits
Changes
config/verifactu.php: Addedsystem_idconfig keysrc/Services/AeatClient.php:261: Changed hardcoded '01' toconfig('verifactu.system_id', '01')Test plan
VERIFACTU_SYSTEM_IDvalues in different environments