Skip to content

Commit

Permalink
Merge pull request #116 from eclipxe13/version-2.26.0
Browse files Browse the repository at this point in the history
Add CCE 2.0 & add move SAT definitions to Retenciones (version 2.26.0)
eclipxe13 authored Jan 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 3545050 + c0f2583 commit 9a2dbd6
Showing 20 changed files with 460 additions and 13 deletions.
34 changes: 34 additions & 0 deletions development/ElementsMaker/specifications/ComercioExterior20.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"php-namespace": "CfdiUtils\\Elements\\Cce20",
"prefix": "cce20",
"xml-namespace": "http://www.sat.gob.mx/ComercioExterior20",
"xml-schemalocation": "http://www.sat.gob.mx/sitio_internet/cfd/ComercioExterior20/ComercioExterior20.xsd",
"version-attribute": "Version",
"version-value": "2.0",
"root-element": "ComercioExterior",
"structure": {
"Emisor": {
"Domicilio": {}
},
"Propietario": {
"multiple": true
},
"Receptor": {
"Domicilio": {}
},
"Destinatario": {
"multiple": true,
"Domicilio": {
"multiple": true
}
},
"Mercancias": {
"Mercancia": {
"multiple": true,
"DescripcionesEspecificas": {
"multiple": true
}
}
}
}
}
12 changes: 12 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -32,6 +32,18 @@
- Merge methods from `\CfdiUtils\Nodes\NodeHasValueInterface` into `\CfdiUtils\Nodes\NodeInterface`.
- Remove deprecated constant `CfdiUtils\Retenciones\Retenciones::RET_NAMESPACE`.

## Version 2.26.0 2024-01-10

Add `CfdiUtils\Elements\Cce30` *Elements* to work with "Complemento de Comercio Exterior 3.0".

Extract logic to move SAT definitions to root element to a helper in order to use it on other creators:

- Add `SatNsDefinitionsMover` helper.
- Change `CfdiCreatorTrait::moveSatDefinitionsToComprobante` to use helper.
- Add `RetencionesCreatorTrait::moveSatDefinitionsToRetenciones`.
- Document samples using `$creator->moveSatDefinitionsToRetenciones()`.
- Fix tests sample files with sat definitions on root element.

## Unreleased 2024-01-08

- Fix continuous integration code style.
6 changes: 6 additions & 0 deletions docs/crear/cfdi-de-retenciones-e-informacion-de-pagos.md
Original file line number Diff line number Diff line change
@@ -66,6 +66,9 @@ $retenciones->addComplemento($dividendos);
$creator->putCertificado(new \CfdiUtils\Certificado\Certificado('archivo.cer'));
$creator->addSello('file://archivo.key.pem', 'la contraseña');

// método de ayuda para mover las declaraciones de espacios de nombre al nodo raíz
$creator->moveSatDefinitionsToRetenciones();

// Asserts contendrá el resultado de la validación
$asserts = $creator->validate();

@@ -132,6 +135,9 @@ $retenciones->addComplemento($dividendos);
$creator->putCertificado(new \CfdiUtils\Certificado\Certificado('archivo.cer'));
$creator->addSello('file://archivo.key.pem', 'la contraseña');

// método de ayuda para mover las declaraciones de espacios de nombre al nodo raíz
$creator->moveSatDefinitionsToRetenciones();

// Asserts contendrá el resultado de la validación
$asserts = $creator->validate();

13 changes: 4 additions & 9 deletions src/CfdiUtils/CfdiCreatorTrait.php
Original file line number Diff line number Diff line change
@@ -8,11 +8,11 @@
use CfdiUtils\Certificado\Certificado;
use CfdiUtils\Certificado\CertificadoPropertyTrait;
use CfdiUtils\Nodes\NodeInterface;
use CfdiUtils\Nodes\NodeNsDefinitionsMover;
use CfdiUtils\Nodes\XmlNodeUtils;
use CfdiUtils\PemPrivateKey\PemPrivateKey;
use CfdiUtils\SumasConceptos\SumasConceptos;
use CfdiUtils\SumasConceptos\SumasConceptosWriter;
use CfdiUtils\Utils\SatNsDefinitionsMover;
use CfdiUtils\Validate\Asserts;
use CfdiUtils\Validate\Hydrater;
use CfdiUtils\Validate\MultiValidator;
@@ -75,15 +75,10 @@ public function asXml(): string
return XmlNodeUtils::nodeToXmlString($this->comprobante, true);
}

public function moveSatDefinitionsToComprobante()
public function moveSatDefinitionsToComprobante(): void
{
$nodeNsDefinitionsMover = new NodeNsDefinitionsMover();
$nodeNsDefinitionsMover->setNamespaceFilter(
function (string $namespaceUri): bool {
return ('http://www.sat.gob.mx/' === (substr($namespaceUri, 0, 22) ?: ''));
}
);
$nodeNsDefinitionsMover->process($this->comprobante);
$mover = new SatNsDefinitionsMover();
$mover->move($this->comprobante);
}

public function saveXml(string $filename): bool
100 changes: 100 additions & 0 deletions src/CfdiUtils/Elements/Cce20/ComercioExterior.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?php

namespace CfdiUtils\Elements\Cce20;

use CfdiUtils\Elements\Common\AbstractElement;

class ComercioExterior extends AbstractElement
{
public function getElementName(): string
{
return 'cce20:ComercioExterior';
}

public function getChildrenOrder(): array
{
return [
'cce20:Emisor',
'cce20:Propietario',
'cce20:Receptor',
'cce20:Destinatario',
'cce20:Mercancias',
];
}

public function getFixedAttributes(): array
{
return [
'xmlns:cce20' => 'http://www.sat.gob.mx/ComercioExterior20',
'xsi:schemaLocation' => 'http://www.sat.gob.mx/ComercioExterior20'
. ' http://www.sat.gob.mx/sitio_internet/cfd/ComercioExterior20/ComercioExterior20.xsd',
'Version' => '2.0',
];
}

public function getEmisor(): Emisor
{
return $this->helperGetOrAdd(new Emisor());
}

public function addEmisor(array $attributes = []): Emisor
{
$subject = $this->getEmisor();
$subject->addAttributes($attributes);
return $subject;
}

public function addPropietario(array $attributes = []): Propietario
{
$subject = new Propietario($attributes);
$this->addChild($subject);
return $subject;
}

public function multiPropietario(array ...$elementAttributes): self
{
foreach ($elementAttributes as $attributes) {
$this->addPropietario($attributes);
}
return $this;
}

public function getReceptor(): Receptor
{
return $this->helperGetOrAdd(new Receptor());
}

public function addReceptor(array $attributes = []): Receptor
{
$subject = $this->getReceptor();
$subject->addAttributes($attributes);
return $subject;
}

public function addDestinatario(array $attributes = []): Destinatario
{
$subject = new Destinatario($attributes);
$this->addChild($subject);
return $subject;
}

public function multiDestinatario(array ...$elementAttributes): self
{
foreach ($elementAttributes as $attributes) {
$this->addDestinatario($attributes);
}
return $this;
}

public function getMercancias(): Mercancias
{
return $this->helperGetOrAdd(new Mercancias());
}

public function addMercancias(array $attributes = []): Mercancias
{
$subject = $this->getMercancias();
$subject->addAttributes($attributes);
return $subject;
}
}
13 changes: 13 additions & 0 deletions src/CfdiUtils/Elements/Cce20/DescripcionesEspecificas.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace CfdiUtils\Elements\Cce20;

use CfdiUtils\Elements\Common\AbstractElement;

class DescripcionesEspecificas extends AbstractElement
{
public function getElementName(): string
{
return 'cce20:DescripcionesEspecificas';
}
}
28 changes: 28 additions & 0 deletions src/CfdiUtils/Elements/Cce20/Destinatario.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace CfdiUtils\Elements\Cce20;

use CfdiUtils\Elements\Common\AbstractElement;

class Destinatario extends AbstractElement
{
public function getElementName(): string
{
return 'cce20:Destinatario';
}

public function addDomicilio(array $attributes = []): Domicilio
{
$subject = new Domicilio($attributes);
$this->addChild($subject);
return $subject;
}

public function multiDomicilio(array ...$elementAttributes): self
{
foreach ($elementAttributes as $attributes) {
$this->addDomicilio($attributes);
}
return $this;
}
}
13 changes: 13 additions & 0 deletions src/CfdiUtils/Elements/Cce20/Domicilio.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace CfdiUtils\Elements\Cce20;

use CfdiUtils\Elements\Common\AbstractElement;

class Domicilio extends AbstractElement
{
public function getElementName(): string
{
return 'cce20:Domicilio';
}
}
25 changes: 25 additions & 0 deletions src/CfdiUtils/Elements/Cce20/Emisor.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace CfdiUtils\Elements\Cce20;

use CfdiUtils\Elements\Common\AbstractElement;

class Emisor extends AbstractElement
{
public function getElementName(): string
{
return 'cce20:Emisor';
}

public function getDomicilio(): Domicilio
{
return $this->helperGetOrAdd(new Domicilio());
}

public function addDomicilio(array $attributes = []): Domicilio
{
$subject = $this->getDomicilio();
$subject->addAttributes($attributes);
return $subject;
}
}
28 changes: 28 additions & 0 deletions src/CfdiUtils/Elements/Cce20/Mercancia.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace CfdiUtils\Elements\Cce20;

use CfdiUtils\Elements\Common\AbstractElement;

class Mercancia extends AbstractElement
{
public function getElementName(): string
{
return 'cce20:Mercancia';
}

public function addDescripcionesEspecificas(array $attributes = []): DescripcionesEspecificas
{
$subject = new DescripcionesEspecificas($attributes);
$this->addChild($subject);
return $subject;
}

public function multiDescripcionesEspecificas(array ...$elementAttributes): self
{
foreach ($elementAttributes as $attributes) {
$this->addDescripcionesEspecificas($attributes);
}
return $this;
}
}
28 changes: 28 additions & 0 deletions src/CfdiUtils/Elements/Cce20/Mercancias.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace CfdiUtils\Elements\Cce20;

use CfdiUtils\Elements\Common\AbstractElement;

class Mercancias extends AbstractElement
{
public function getElementName(): string
{
return 'cce20:Mercancias';
}

public function addMercancia(array $attributes = []): Mercancia
{
$subject = new Mercancia($attributes);
$this->addChild($subject);
return $subject;
}

public function multiMercancia(array ...$elementAttributes): self
{
foreach ($elementAttributes as $attributes) {
$this->addMercancia($attributes);
}
return $this;
}
}
13 changes: 13 additions & 0 deletions src/CfdiUtils/Elements/Cce20/Propietario.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace CfdiUtils\Elements\Cce20;

use CfdiUtils\Elements\Common\AbstractElement;

class Propietario extends AbstractElement
{
public function getElementName(): string
{
return 'cce20:Propietario';
}
}
25 changes: 25 additions & 0 deletions src/CfdiUtils/Elements/Cce20/Receptor.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace CfdiUtils\Elements\Cce20;

use CfdiUtils\Elements\Common\AbstractElement;

class Receptor extends AbstractElement
{
public function getElementName(): string
{
return 'cce20:Receptor';
}

public function getDomicilio(): Domicilio
{
return $this->helperGetOrAdd(new Domicilio());
}

public function addDomicilio(array $attributes = []): Domicilio
{
$subject = $this->getDomicilio();
$subject->addAttributes($attributes);
return $subject;
}
}
7 changes: 7 additions & 0 deletions src/CfdiUtils/Retenciones/RetencionesCreatorTrait.php
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
use CfdiUtils\Elements\Common\AbstractElement;
use CfdiUtils\Nodes\XmlNodeUtils;
use CfdiUtils\PemPrivateKey\PemPrivateKey;
use CfdiUtils\Utils\SatNsDefinitionsMover;
use CfdiUtils\Validate\Asserts;
use CfdiUtils\Validate\Xml\XmlFollowSchema;
use CfdiUtils\XmlResolver\XmlResolver;
@@ -74,4 +75,10 @@ public function asXml(): string
{
return XmlNodeUtils::nodeToXmlString($this->retenciones, true);
}

public function moveSatDefinitionsToRetenciones(): void
{
$mover = new SatNsDefinitionsMover();
$mover->move($this->retenciones);
}
}
20 changes: 20 additions & 0 deletions src/CfdiUtils/Utils/SatNsDefinitionsMover.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace CfdiUtils\Utils;

use CfdiUtils\Nodes\NodeInterface;
use CfdiUtils\Nodes\NodeNsDefinitionsMover;

final class SatNsDefinitionsMover
{
public function move(NodeInterface $root): void
{
$nodeNsDefinitionsMover = new NodeNsDefinitionsMover();
$nodeNsDefinitionsMover->setNamespaceFilter(
function (string $namespaceUri): bool {
return ('http://www.sat.gob.mx/' === (substr($namespaceUri, 0, 22) ?: ''));
}
);
$nodeNsDefinitionsMover->process($root);
}
}
94 changes: 94 additions & 0 deletions tests/CfdiUtilsTests/Elements/Cce20/ComercioExteriorTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?php

namespace CfdiUtilsTests\Elements\Cce20;

use CfdiUtils\Elements\Cce20\ComercioExterior;
use CfdiUtils\Elements\Cce20\DescripcionesEspecificas;
use CfdiUtils\Elements\Cce20\Destinatario;
use CfdiUtils\Elements\Cce20\Domicilio;
use CfdiUtils\Elements\Cce20\Emisor;
use CfdiUtils\Elements\Cce20\Mercancia;
use CfdiUtils\Elements\Cce20\Mercancias;
use CfdiUtils\Elements\Cce20\Propietario;
use CfdiUtils\Elements\Cce20\Receptor;
use CfdiUtilsTests\Elements\ElementTestCase;

final class ComercioExteriorTest extends ElementTestCase
{
public function testComercioExterior(): void
{
$element = new ComercioExterior();
$this->assertElementHasName($element, 'cce20:ComercioExterior');
$this->assertElementHasOrder($element, [
'cce20:Emisor',
'cce20:Propietario',
'cce20:Receptor',
'cce20:Destinatario',
'cce20:Mercancias',
]);
$this->assertElementHasFixedAttributes($element, [
'xmlns:cce20' => 'http://www.sat.gob.mx/ComercioExterior20',
'xsi:schemaLocation' => 'http://www.sat.gob.mx/ComercioExterior20'
. ' http://www.sat.gob.mx/sitio_internet/cfd/ComercioExterior20/ComercioExterior20.xsd',
'Version' => '2.0',
]);
$this->assertElementHasChildSingle($element, Emisor::class);
$this->assertElementHasChildMultiple($element, Propietario::class);
$this->assertElementHasChildSingle($element, Receptor::class);
$this->assertElementHasChildMultiple($element, Destinatario::class);
$this->assertElementHasChildSingle($element, Mercancias::class);
}

public function testEmisor(): void
{
$element = new Emisor();
$this->assertElementHasName($element, 'cce20:Emisor');
$this->assertElementHasChildSingle($element, Domicilio::class);
}

public function testDomicilio(): void
{
$element = new Domicilio();
$this->assertElementHasName($element, 'cce20:Domicilio');
}

public function testPropietario(): void
{
$element = new Propietario();
$this->assertElementHasName($element, 'cce20:Propietario');
}

public function testReceptor(): void
{
$element = new Receptor();
$this->assertElementHasName($element, 'cce20:Receptor');
$this->assertElementHasChildSingle($element, Domicilio::class);
}

public function testDestinatario(): void
{
$element = new Destinatario();
$this->assertElementHasName($element, 'cce20:Destinatario');
$this->assertElementHasChildMultiple($element, Domicilio::class);
}

public function testMercancias(): void
{
$element = new Mercancias();
$this->assertElementHasName($element, 'cce20:Mercancias');
$this->assertElementHasChildMultiple($element, Mercancia::class);
}

public function testMercancia(): void
{
$element = new Mercancia();
$this->assertElementHasName($element, 'cce20:Mercancia');
$this->assertElementHasChildMultiple($element, DescripcionesEspecificas::class);
}

public function testDescripcionesEspecificas(): void
{
$element = new DescripcionesEspecificas();
$this->assertElementHasName($element, 'cce20:DescripcionesEspecificas');
}
}
3 changes: 3 additions & 0 deletions tests/CfdiUtilsTests/Retenciones/RetencionesCreator10Test.php
Original file line number Diff line number Diff line change
@@ -72,6 +72,9 @@ public function testCreatePreCfdiWithAllCorrectValues()
$creator->putCertificado($certificado);
$creator->addSello('file://' . $pemFile, $passPhrase);

// move sat definitions
$creator->moveSatDefinitionsToRetenciones();

// validate
$asserts = $creator->validate();
$this->assertGreaterThanOrEqual(1, $asserts->count());
3 changes: 3 additions & 0 deletions tests/CfdiUtilsTests/Retenciones/RetencionesCreator20Test.php
Original file line number Diff line number Diff line change
@@ -82,6 +82,9 @@ public function testCreatePreCfdiWithAllCorrectValues()
$creator->putCertificado($certificado);
$creator->addSello('file://' . $pemFile, $passPhrase);

// move sat definitions
$creator->moveSatDefinitionsToRetenciones();

// validate
$asserts = $creator->validate();
$this->assertGreaterThanOrEqual(1, $asserts->count());
4 changes: 2 additions & 2 deletions tests/assets/retenciones/retenciones10.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<retenciones:Retenciones xmlns:retenciones="http://www.sat.gob.mx/esquemas/retencionpago/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sat.gob.mx/esquemas/retencionpago/1 http://www.sat.gob.mx/esquemas/retencionpago/1/retencionpagov1.xsd" Version="1.0" FechaExp="2021-01-13T14:15:16-06:00" CveRetenc="14" NumCert="30001000000500003416" Cert="MIIFsDCCA5igAwIBAgIUMzAwMDEwMDAwMDA1MDAwMDM0MTYwDQYJKoZIhvcNAQELBQAwggErMQ8wDQYDVQQDDAZBQyBVQVQxLjAsBgNVBAoMJVNFUlZJQ0lPIERFIEFETUlOSVNUUkFDSU9OIFRSSUJVVEFSSUExGjAYBgNVBAsMEVNBVC1JRVMgQXV0aG9yaXR5MSgwJgYJKoZIhvcNAQkBFhlvc2Nhci5tYXJ0aW5lekBzYXQuZ29iLm14MR0wGwYDVQQ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nBOr7qF2mItmBnjgEwk+DTv8Zr7w5qp7vleC6dIsZFNJoa6ZndrE/f7KO1CYruLXr5gwEkIyGfJ9NwyIagvHHMszzyHiSZIA850fWtbqtythpAliJ2jF35M5pNS+YTkRB+T6L/c6m00ymN3q9lT1rB03YywxrLreRSFZOSrbwWfg34EJbHfbFXpCSVYdJRfiVdvHnewN0r5fUlPtR9stQHyuqewzdkyb5jTTw02D2cUfL57vlPStBj7SEi3uOWvLrsiDnnCIxRMYJ2UA2ktDKHk+zWnsDmaeleSzonv2CHW42yXYPCvWi88oE1DJNYLNkIjua7MxAnkNZbScNw01A6zbLsZ3y8G6eEYnxSTRfwjd8EP4kdiHNJftm7Z4iRU7HOVh79/lRWB+gd171s3d/mI9kte3MRy6V8MMEMCAnMboGpaooYwgAmwclI2XZCczNWXfhaWe0ZS5PmytD/GDpXzkX0oEgY9K/uYo5V77NdZbGAjmyi8cE2B2ogvyaN2XfIInrZPgEffJ4AB7kFA2mwesdLOCh0BLD9itmCve3A1FGR4+stO2ANUoiI3w3Tv2yQSg4bjeDlJ08lXaaFCLW2peEXMXjQUk7fmpb5MNuOUTW6BE=" Sello="sdue8XSWuWCBfQuWDXwVAEm3CX0AFbnxI9H8hj/3+n/TzyUcwFdfBUJ2jTKHOsMWT1ldJNtL1XL+n0xZX2MO8rh8zdiVG3sQ3KK2XTxSESEztS8RoNppo5jBJPDxiLwYHp3VT1vlqbRRCZEUbhfzxUhTlX/V7rcF6nzw3n9cAk5BhwgxbZxjhV3Dhq0ElbFqfloC/22SiNhdWf9JwAwTGmDKrJW/Ir2/D3nlCE8Q71KdIw1qrDYCRYzxWFiiuz59sDo4tTUnxuHhmSrHv5HR6YwxYPBPt/t64SmrIZXii5bIfGrZ5kecAnw4va98mgh0pnGrn98d71TzFC/i8yjhAQ==">
<retenciones:Retenciones xmlns:retenciones="http://www.sat.gob.mx/esquemas/retencionpago/1" xmlns:dividendos="http://www.sat.gob.mx/esquemas/retencionpago/1/dividendos" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sat.gob.mx/esquemas/retencionpago/1 http://www.sat.gob.mx/esquemas/retencionpago/1/retencionpagov1.xsd http://www.sat.gob.mx/esquemas/retencionpago/1/dividendos http://www.sat.gob.mx/esquemas/retencionpago/1/dividendos/dividendos.xsd" Version="1.0" FechaExp="2021-01-13T14:15:16-06:00" CveRetenc="14" NumCert="30001000000500003416" Cert="MIIFsDCCA5igAwIBAgIUMzAwMDEwMDAwMDA1MDAwMDM0MTYwDQYJKoZIhvcNAQELBQAwggErMQ8wDQYDVQQDDAZBQyBVQVQxLjAsBgNVBAoMJVNFUlZJQ0lPIERFIEFETUlOSVNUUkFDSU9OIFRSSUJVVEFSSUExGjAYBgNVBAsMEVNBVC1JRVMgQXV0aG9yaXR5MSgwJgYJKoZIhvcNAQkBFhlvc2Nhci5tYXJ0aW5lekBzYXQuZ29iLm14MR0wGwYDVQQJDBQzcmEgY2VycmFkYSBkZSBjYWxpejEOMAwGA1UEEQwFMDYzNzAxCzAJBgNVBAYTAk1YMRkwFwYDVQQIDBBDSVVEQUQgREUgTUVYSUNPMREwDwYDVQQHDAhDT1lPQUNBTjERMA8GA1UELRMIMi41LjQuNDUxJTAjBgkqhkiG9w0BCQITFnJlc3BvbnNhYmxlOiBBQ0RNQS1TQVQwHhcNMjMwNTE4MTE0MzUxWhcNMjcwNTE4MTE0MzUxWjCB1zEnMCUGA1UEAxMeRVNDVUVMQSBLRU1QRVIgVVJHQVRFIFNBIERFIENWMScwJQYDVQQpEx5FU0NVRUxBIEtFTVBFUiBVUkdBVEUgU0EgREUgQ1YxJzAlBgNVBAoTHkVTQ1VFTEEgS0VNUEVSIFVSR0FURSBTQSBERSBDVjElMCMGA1UELRMcRUtVOTAwMzE3M0M5IC8gVkFEQTgwMDkyN0RKMzEeMBwGA1UEBRMVIC8gVkFEQTgwMDkyN0hTUlNSTDA1MRMwEQYDVQQLEwpTdWN1cnNhbCAxMIIBIjANBgkqhkiG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4bjeDlJ08lXaaFCLW2peEXMXjQUk7fmpb5MNuOUTW6BE=" Sello="sdue8XSWuWCBfQuWDXwVAEm3CX0AFbnxI9H8hj/3+n/TzyUcwFdfBUJ2jTKHOsMWT1ldJNtL1XL+n0xZX2MO8rh8zdiVG3sQ3KK2XTxSESEztS8RoNppo5jBJPDxiLwYHp3VT1vlqbRRCZEUbhfzxUhTlX/V7rcF6nzw3n9cAk5BhwgxbZxjhV3Dhq0ElbFqfloC/22SiNhdWf9JwAwTGmDKrJW/Ir2/D3nlCE8Q71KdIw1qrDYCRYzxWFiiuz59sDo4tTUnxuHhmSrHv5HR6YwxYPBPt/t64SmrIZXii5bIfGrZ5kecAnw4va98mgh0pnGrn98d71TzFC/i8yjhAQ==">
<retenciones:Emisor RFCEmisor="EKU9003173C9" NomDenRazSocE="ESCUELA KEMPER URGATE SA DE CV"/>
<retenciones:Receptor Nacionalidad="Extranjero">
<retenciones:Extranjero NumRegIdTrib="998877665544332211" NomDenRazSocR="WORLD WIDE COMPANY INC"/>
@@ -9,7 +9,7 @@
<retenciones:ImpRetenidos BaseRet="0" Impuesto="01" montoRet="0" TipoPagoRet="Pago provisional"/>
</retenciones:Totales>
<retenciones:Complemento>
<dividendos:Dividendos xmlns:dividendos="http://www.sat.gob.mx/esquemas/retencionpago/1/dividendos" xsi:schemaLocation="http://www.sat.gob.mx/esquemas/retencionpago/1/dividendos http://www.sat.gob.mx/esquemas/retencionpago/1/dividendos/dividendos.xsd" Version="1.0">
<dividendos:Dividendos Version="1.0">
<dividendos:DividOUtil CveTipDivOUtil="06" MontISRAcredRetMexico="0" MontISRAcredRetExtranjero="0" MontRetExtDivExt="0" TipoSocDistrDiv="Sociedad Nacional" MontISRAcredNal="0" MontDivAcumNal="0" MontDivAcumExt="0"/>
</dividendos:Dividendos>
</retenciones:Complemento>
4 changes: 2 additions & 2 deletions tests/assets/retenciones/retenciones20.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<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ZkKChbNe9aeFirU/JbyN7Egia9oKH9KZUsodiM/pWAH00PCtoKJ9OBcSHMq8Rqa3KKoBcfkg1ZrgueffwRLws9yOcRWLb02sDOPzGIm/jEFicVYt2Hw1qdRE5xmTZ7AGG0UHs+unkGjpCVeJ+BEBn0JPLWVvDKHZAQMj6s5Bku35+d/MyATkpOPsGT/VTnsouxekDfikJD1f7A1ZpJbqDpkJnss3vQIDAQABox0wGzAMBgNVHRMBAf8EAjAAMAsGA1UdDwQEAwIGwDANBgkqhkiG9w0BAQsFAAOCAgEAFaUgj5PqgvJigNMgtrdXZnbPfVBbukAbW4OGnUhNrA7SRAAfv2BSGk16PI0nBOr7qF2mItmBnjgEwk+DTv8Zr7w5qp7vleC6dIsZFNJoa6ZndrE/f7KO1CYruLXr5gwEkIyGfJ9NwyIagvHHMszzyHiSZIA850fWtbqtythpAliJ2jF35M5pNS+YTkRB+T6L/c6m00ymN3q9lT1rB03YywxrLreRSFZOSrbwWfg34EJbHfbFXpCSVYdJRfiVdvHnewN0r5fUlPtR9stQHyuqewzdkyb5jTTw02D2cUfL57vlPStBj7SEi3uOWvLrsiDnnCIxRMYJ2UA2ktDKHk+zWnsDmaeleSzonv2CHW42yXYPCvWi88oE1DJNYLNkIjua7MxAnkNZbScNw01A6zbLsZ3y8G6eEYnxSTRfwjd8EP4kdiHNJftm7Z4iRU7HOVh79/lRWB+gd171s3d/mI9kte3MRy6V8MMEMCAnMboGpaooYwgAmwclI2XZCczNWXfhaWe0ZS5PmytD/GDpXzkX0oEgY9K/uYo5V77NdZbGAjmyi8cE2B2ogvyaN2XfIInrZPgEffJ4AB7kFA2mwesdLOCh0BLD9itmCve3A1FGR4+stO2ANUoiI3w3Tv2yQSg4bjeDlJ08lXaaFCLW2peEXMXjQUk7fmpb5MNuOUTW6BE=" CveRetenc="14" FechaExp="2022-01-13T14:15:16" LugarExpRetenc="91778" NoCertificado="30001000000500003416" Sello="NNbDQ42OJGN/hFOYc109cQHw5jDVO7jtxDWqFI7jwyjXiAekGAW83xKPJ7H4h3+8bA1ydHkUMoLeB4BrcbT7NAmTtBUJJafOC9+NdAhsmJ8HKfY3+vinzza2UVJyKWRzCYnO1ny+9loF8I6qk6aNCxDLxDem6S4pmPZMz1TT45e7XJ+AqtGFxtDUKwYtsU/J6EWGDxbWxrGEaGHxnqon1Zg3Fv1KoR9lyF2PrWYNI/Elf3nOueVRa6TNdil0ySY95CAUNSp85JkvNEjVHLqVqZArHEo3bA7VhAaixWF6ENU3G8IkR04LXjWYK8s1xbofFs40akjq2fsxrhj33LWO8A==" Version="2.0" xsi:schemaLocation="http://www.sat.gob.mx/esquemas/retencionpago/2 http://www.sat.gob.mx/esquemas/retencionpago/2/retencionpagov2.xsd">
<retenciones:Retenciones xmlns:retenciones="http://www.sat.gob.mx/esquemas/retencionpago/2" xmlns:dividendos="http://www.sat.gob.mx/esquemas/retencionpago/1/dividendos" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Certificado="MIIFsDCCA5igAwIBAgIUMzAwMDEwMDAwMDA1MDAwMDM0MTYwDQYJKoZIhvcNAQELBQAwggErMQ8wDQYDVQQDDAZBQyBVQVQxLjAsBgNVBAoMJVNFUlZJQ0lPIERFIEFETUlOSVNUUkFDSU9OIFRSSUJVVEFSSUExGjAYBgNVBAsMEVNBVC1JRVMgQXV0aG9yaXR5MSgwJgYJKoZIhvcNAQkBFhlvc2Nhci5tYXJ0aW5lekBzYXQuZ29iLm14MR0wGwYDVQQJDBQzcmEgY2VycmFkYSBkZSBjYWxpejEOMAwGA1UEEQwFMDYzNzAxCzAJBgNVBAYTAk1YMRkwFwYDVQQIDBBDSVVEQUQgREUgTUVYSUNPMREwDwYDVQQHDAhDT1lPQUNBTjERMA8GA1UELRMIMi41LjQuNDUxJTAjBgkqhkiG9w0BCQITFnJlc3BvbnNhYmxlOiBBQ0RNQS1TQVQwHhcNMjMwNTE4MTE0MzUxWhcNMjcwNTE4MTE0MzUxWjCB1zEnMCUGA1UEAxMeRVNDVUVM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leSzonv2CHW42yXYPCvWi88oE1DJNYLNkIjua7MxAnkNZbScNw01A6zbLsZ3y8G6eEYnxSTRfwjd8EP4kdiHNJftm7Z4iRU7HOVh79/lRWB+gd171s3d/mI9kte3MRy6V8MMEMCAnMboGpaooYwgAmwclI2XZCczNWXfhaWe0ZS5PmytD/GDpXzkX0oEgY9K/uYo5V77NdZbGAjmyi8cE2B2ogvyaN2XfIInrZPgEffJ4AB7kFA2mwesdLOCh0BLD9itmCve3A1FGR4+stO2ANUoiI3w3Tv2yQSg4bjeDlJ08lXaaFCLW2peEXMXjQUk7fmpb5MNuOUTW6BE=" CveRetenc="14" FechaExp="2022-01-13T14:15:16" LugarExpRetenc="91778" NoCertificado="30001000000500003416" Sello="NNbDQ42OJGN/hFOYc109cQHw5jDVO7jtxDWqFI7jwyjXiAekGAW83xKPJ7H4h3+8bA1ydHkUMoLeB4BrcbT7NAmTtBUJJafOC9+NdAhsmJ8HKfY3+vinzza2UVJyKWRzCYnO1ny+9loF8I6qk6aNCxDLxDem6S4pmPZMz1TT45e7XJ+AqtGFxtDUKwYtsU/J6EWGDxbWxrGEaGHxnqon1Zg3Fv1KoR9lyF2PrWYNI/Elf3nOueVRa6TNdil0ySY95CAUNSp85JkvNEjVHLqVqZArHEo3bA7VhAaixWF6ENU3G8IkR04LXjWYK8s1xbofFs40akjq2fsxrhj33LWO8A==" Version="2.0" xsi:schemaLocation="http://www.sat.gob.mx/esquemas/retencionpago/2 http://www.sat.gob.mx/esquemas/retencionpago/2/retencionpagov2.xsd http://www.sat.gob.mx/esquemas/retencionpago/1/dividendos http://www.sat.gob.mx/esquemas/retencionpago/1/dividendos/dividendos.xsd">
<retenciones:CfdiRetenRelacionados TipoRelacion="01" UUID="1474b7d3-61fc-41c4-a8b8-3f22e1161bb4"/>
<retenciones:Emisor NomDenRazSocE="ESCUELA KEMPER URGATE" RegimenFiscalE="601" RfcE="EKU9003173C9"/>
<retenciones:Receptor NacionalidadR="Extranjero">
@@ -10,7 +10,7 @@
<retenciones:ImpRetenidos BaseRet="0" ImpuestoRet="001" MontoRet="200.00" TipoPagoRet="01"/>
</retenciones:Totales>
<retenciones:Complemento>
<dividendos:Dividendos xmlns:dividendos="http://www.sat.gob.mx/esquemas/retencionpago/1/dividendos" Version="1.0" xsi:schemaLocation="http://www.sat.gob.mx/esquemas/retencionpago/1/dividendos http://www.sat.gob.mx/esquemas/retencionpago/1/dividendos/dividendos.xsd">
<dividendos:Dividendos Version="1.0">
<dividendos:DividOUtil CveTipDivOUtil="06" MontDivAcumExt="0" MontDivAcumNal="0" MontISRAcredNal="0" MontISRAcredRetExtranjero="0" MontISRAcredRetMexico="0" MontRetExtDivExt="0" TipoSocDistrDiv="Sociedad Nacional"/>
</dividendos:Dividendos>
</retenciones:Complemento>

0 comments on commit 9a2dbd6

Please sign in to comment.