Closed thierryler closed 1 year ago
Did you released a new version ?
@thierryler just released v1.0.4
Hello. The bug is solves but there is an other problem.
Using the same code with version 1.0.4.
Even when checkXsd is false, it still checks the xml.
Here is my XML:
<?xml version='1.0' encoding='UTF-8' ?>
<todo>
</todo>
As you can figure out, it is obviously wrong. But as checkXsd is false, it should not check. But it does and I get this error:
Un erreur s'est produite ! 500 Internal Server Error - Error details: [0] This XML is not a Factur-X XML because it misses the XML tag ExchangedDocumentContext/GuidelineSpecifiedDocumentContextParameter/ram:ID. in /.../www/vendor/atgp/factur-x/src/Facturx.php on line 287. Backtrace: #0 /.../www/vendor/atgp/factur-x/src/Facturx.php(221): Atgp\FacturX\Facturx->getFacturxProfil() #1 /.../www/src/Services/InvoiceService.php(176): Atgp\FacturX\Facturx->generateFacturxFromFiles() #2 /.../www/src/Actions/Invoice/UserInvoiceController.php(121): App\Services\InvoiceService->generateInvoicePdf() #3
When I do not check the xsd, there is a small bug.
Doing that
I get this error:
Actually, it is because $this->profil is null here:
It is null because checkXsd is false, and profil is set in checkFacturxXsd().
Th.