-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from gam04/feature/retenciones20
Feature/retenciones20, closes #96
- Loading branch information
Showing
28 changed files
with
1,192 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\Retenciones20; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
use CfdiUtils\Nodes\NodeInterface; | ||
|
||
class Addenda extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'retenciones:Addenda'; | ||
} | ||
|
||
public function add(NodeInterface $child): self | ||
{ | ||
$this->children()->add($child); | ||
return $this; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/CfdiUtils/Elements/Retenciones20/CfdiRetenRelacionados.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\Retenciones20; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class CfdiRetenRelacionados extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'retenciones:CfdiRetenRelacionados'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\Retenciones20; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
use CfdiUtils\Nodes\NodeInterface; | ||
|
||
class Complemento extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'retenciones:Complemento'; | ||
} | ||
|
||
public function add(NodeInterface $child): self | ||
{ | ||
$this->children()->add($child); | ||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\Retenciones20; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class Emisor extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'retenciones:Emisor'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\Retenciones20; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class Extranjero extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'retenciones:Extranjero'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\Retenciones20; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class ImpRetenidos extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'retenciones:ImpRetenidos'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\Retenciones20; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class Nacional extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'retenciones:Nacional'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\Retenciones20; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class Periodo extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'retenciones:Periodo'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\Retenciones20; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class Receptor extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'retenciones:Receptor'; | ||
} | ||
|
||
public function getNacional(): Nacional | ||
{ | ||
$nacional = $this->helperGetOrAdd(new Nacional()); | ||
$this->children()->removeAll(); | ||
$this->addChild($nacional); | ||
$this['NacionalidadR'] = 'Nacional'; | ||
return $nacional; | ||
} | ||
|
||
public function addNacional(array $attributes = []): Nacional | ||
{ | ||
$nacional = $this->getNacional(); | ||
$nacional->addAttributes($attributes); | ||
return $nacional; | ||
} | ||
|
||
public function getExtranjero(): Extranjero | ||
{ | ||
$nacional = $this->helperGetOrAdd(new Extranjero()); | ||
$this->children()->removeAll(); | ||
$this->addChild($nacional); | ||
$this['NacionalidadR'] = 'Extranjero'; | ||
return $nacional; | ||
} | ||
|
||
public function addExtranjero(array $attributes = []): Extranjero | ||
{ | ||
$extranjero = $this->getExtranjero(); | ||
$extranjero->addAttributes($attributes); | ||
return $extranjero; | ||
} | ||
} |
Oops, something went wrong.