Skip to content

Releases: eclipxe13/CfdiUtils

Version 2.7.2

06 Dec 01:01
Compare
Choose a tag to compare
  • Add method CfdiUtils\Certificado\Certificado::getCertificateName(): string to obtain the certificate name as returned by openssl_x509_parse.

Version 2.7.1

04 Dec 17:17
Compare
Choose a tag to compare
  • Fix wrong use of escapeshellcmd replacing with escapeshellarg
  • Add argument -c|--clean to script tests/validate.php to perform clean before validate
  • Fix CfdiCreator33::newUsingNode since not all attributes where correctly imported (xsi:schemaLocation)
  • Fix calling CfdiCreator33::putCertificado on imported cfdi (Emisor child is a NodeInterface but not Emisor)
  • Refactor CfdiUtils\ConsultaCfdiSat\WebService to be able to use a local copy of WSDL file since SAT does not allow to download it anymore.
    • Add ConsultaCFDIServiceSAT.svc.xml to namespace folder
    • Add Config::wsdlLocation static method to get ConsultaCFDIServiceSAT.svc.xml file path
    • Deprecate Config::getWsdlUrl in favor of Config::getServiceUrl
    • Add Config::getServiceUrl
    • Add Config::wsdlLocation property
  • Add --local-wsdl parameter to tests/estadosat.php script
  • Add a new step on CfdiUtils\Cleaner\Cleaner that removes from xsi:schemaLocations the namespaces that are not followed by a string that ends on .xsd

Version 2.7.0

19 Oct 16:53
Compare
Choose a tag to compare
  • Reintroduce MontoGreaterOrEqualThanSumOfDocuments as PAGO30.
  • Change CfdiUtils\Validate\Cfdi33\RecepcionPagos\Pagos\ValidatePagoException to use status property.
  • Change CfdiUtils\Validate\Cfdi33\RecepcionPagos\Pagos\ValidateDoctoException to extends ValidatePagoException.
  • Honor status from ValidatePagoException or ValidateDoctoException
  • Tests use XmlResolver from CfdiUtilsTests\TestCase instead of creating a new one
  • Fix docblock CfdiUtils\Nodes\Nodes::searchNodes
  • Improve docblocks on CfdiUtils\Certificado\Certificado
  • Documentation:
    • Create docs/problemas/contradicciones-pagos.md
    • Create docs/problemas/descarga-certificados.md to document error TFDSELLO01
    • Create examples on docs/componentes/certificado.md on object creation
  • Change tests to not ssl verify peer due SAT web server configuration errors (expired certificate)
    • Add CfdiUtilsTests\TestCase::newInsecurePhpDownloader(): DownloaderInterface
    • Use insecure downlader in CfdiUtilsTests\CfdiValidator33Test
    • Use insecure downlader in CfdiUtilsTests\Validate\Cfdi33\Standard\TimbreFiscalDigitalSelloTest
    • Use insecure downlader in CfdiUtilsTests\Certificado\CerRetrieverTest
    • Also add note to docs/TODO.md to remove this insecure downloader when SAT server is fine
  • Change composer scripts and prefix dev:, commands are now:
    • dev:build: run dev:fix-style dev:tests and dev:docs, run before pull request
    • dev:check-style: search for code style errors using php-cs-fixer and phpcs
    • dev:fix-style: fix code style errors using php-cs-fixer and phpcbf
    • dev:docs: search for code style errors unsing markdownlint and build docs using mkdocs
    • dev:test: run phplint, phpunit and phpstan
    • dev:coverage: run phpunit with xdebug and store coverage in build/coverage/html

Version 2.6.6

05 Oct 02:54
Compare
Choose a tag to compare
  • After previous update on validation PAGO09 and more testing found that it requires to round lower and upper limits.
  • Create more 1 case with specific data and 1 test with 20 cases with random data.

Version 2.6.5

05 Oct 02:10
Compare
Choose a tag to compare
  • Fix validation PAGO09:
    • Before 2018-09-01 pagos10:Pago@Monto must be less or equal than sum of pago10:DoctoRelacionado@ImpPagado in the same currency as pagos10:Pago.
    • Since 2018-09-01 according to Guía de llenado del comprobante al que se le incorpore el complemento para recepción de pagos, page 22 it is required that pagos10:Pago@Monto must be in an interval.
    • Fix samples from tests/assets/pagos/ since new validation make it fail.
    • Rename validation class MontoGreaterOrEqualThanSumOfDocuments to MontoBetweenIntervalSumOfDocuments
  • Refactor CfdiUtils\Certificado\Certificado extracting obtain public key routine to an internal method.
  • Create tests for trait CalculateDocumentAmountTrait.

Version 2.6.4

04 Sep 22:12
Compare
Choose a tag to compare
  • Fix validation TIPOCAMBIO02:
    • Previous validation only allows value "1" if currency MXN.
      Now it allows any value equals to 1 considering 6 decimal numbers, so the following values
      are valid: "1", "1.00", "1.000000"
    • Change description from ... debe ser "1"... to ... debe tener el valor "1"...
  • Fix scrutinizer issue in Validate/Cfdi33/Standard/ComprobanteImpuestos.php:
    Using logical operators such as and instead of && is generally not recommended
  • CfdiUtils\ConsultaCfdiSat\WebService is using SAT Web Service but since 2018-08 it is ramdomly failing.
    The test that are consuming https://consultaqr.facturaelectronica.sat.gob.mx/ConsultaCFDIService.svc?singleWsdl moved to a different test case class WebServiceConsumingTest and are marked as skipped when \SoapFault thrown instead of fail
  • Fix xmlns:xsi definition case to XMLSchema
  • Allow install phpunit 7 if php >= 7.1
  • Fix phpunit.xml.dist configuration file removing redundant options and setting missing options
  • Solve phpstan 0.10.x issues, not yet upgraded since it contains several bugfixes

Version 2.6.3

22 Aug 03:37
Compare
Choose a tag to compare
  • Fix validations COMPIMPUESTOSC02 and COMPIMPUESTOSC03
    Previously both or any should exists (xnor): nodes Traslado|Retencion and attributes TotalImpuestosTrasladados|TotalImpuestosRetenidos
    Now it allows to have Impuestos totals even when related nodes does not exists
    This is because is not mandatory by Anexo 20
    What is mandatory is that if nodes exists then totals must exists
  • Add helper method to create a RequestParameters from a Cfdi
  • Fix: add missing dependence ext-iconv into composer.json
  • Testing: add helper development script tests/estadosat.php
  • Testing: Change CfdiUtils\Validate\Cfdi33\Standard\SelloDigitalCertificado methods visibility compareNames & castNombre for testing

Version 2.6.2

18 Jul 04:17
Compare
Choose a tag to compare
  • Dependence on https://github.com/eclipxe13/XmlSchemaValidator has been set to ^2.0.1
    to fix validation using XSD local repository on MS Windows.
  • Improve docblocks in property traits
  • Restore previous error handler on ComprobanteGetCfdiRelacionadosTest
  • Make sure that input file on PemPrivateKey is not a directory and is readable
  • On MS Windows send to NUL instead of /dev/null
  • Convert from UTF-8 to ASCII//TRANSLIT can add single quotes, remove it.
  • Add AppVeyor continious integration
  • Add documentation about developing this library on windows
  • Allow to set saxonb path using environment variable saxonb-path

Version 2.6.1

17 Jul 03:42
Compare
Choose a tag to compare
  • Fix order of Impuestos children (thanks @aldolinares):
    • When is inside Comprobante the order is Retenciones then Traslados
    • When is inside Concepto the order is Traslados then Retenciones
  • Add testMultiRelacionado in ComprobanteTest
  • Fix markdown syntax errors in a lot of documents
  • Use self instead of static in docblocks, static is not standard
  • Add badges to docs/index.md

Version 2.6.0

07 Jul 02:18
Compare
Choose a tag to compare

bugfixes, quickreader & welcome readthedocs/mkdocs

  • Create QuickReader, utility for easy navigate and extract information from a CFDI
  • Fix Rfc to don't throw an exception if checksum fails, SAT is not following its own standard
  • Add Rfc::checkSum() and Rfc::checkSumMatch() to know if the Rfc is following the checksum
  • Fix tests that expect Rfc checksum failure
  • Fix tests comments on testDescuentoNotSetIfAllConceptosDoesNotHaveDescuento
  • Fix CfdiUtils\Elements\Cfdi33\Comprobante::getCfdiRelacionados to don't receive a parameter.
    • For backwards compatibility when it receive a parameter do the same thing but trigger a E_USER_NOTICE
    • Create an special test case ComprobanteGetCfdiRelacionadosTest that catched the E_USER_NOTICE error
  • Add CfdiUtils\Elements\Cfdi33\Comprobante::addCfdiRelacionados(array $attributes)
  • Add CfdiUtils\Elements\Cfdi33\Comprobante::multiCfdiRelacionado(array $attributes)
  • Add tests to assert that Comprobante/Impuestos/(Traslados/Traslado|Retenciones/Retencion)@Impuesto is rounded
  • Minor fix at docblocks for packed arguments
  • Change all documentation to move from GitHub Wiki to ReadTheDocs https://cfdiutils.readthedocs.io/
    • More documentation pages & a lot of fixes
    • Add .markdownlint.json to run with markdownlint-cli (node), add to travis build process
    • Add mkdocs.yml to run with mkdocs (python), add to travis build process
    • Fix markdown files according to markdownlint
    • Add composer docs and append to general composer build