diff --git a/packages/core/src/Core/Model/Despatch/Despatch.php b/packages/core/src/Core/Model/Despatch/Despatch.php index f56dbae1..cf96e54e 100644 --- a/packages/core/src/Core/Model/Despatch/Despatch.php +++ b/packages/core/src/Core/Model/Despatch/Despatch.php @@ -406,4 +406,29 @@ public function getName(): string return join('-', $parts); } -} + + //Extra para guia transportista + /** + * @var Client + */ + private $remitente; + /** + * @return Client + */ + public function getRemitente(): ?Client + { + return $this->remitente; + } + + /** + * @param Client $remitente + * + * @return Despatch + */ + public function setRemitente(?Client $remitente): Despatch + { + $this->remitente = $remitente; + + return $this; + } +} \ No newline at end of file diff --git a/packages/core/src/Core/Model/Despatch/Shipment.php b/packages/core/src/Core/Model/Despatch/Shipment.php index 9e39cbf1..6db49601 100644 --- a/packages/core/src/Core/Model/Despatch/Shipment.php +++ b/packages/core/src/Core/Model/Despatch/Shipment.php @@ -545,4 +545,29 @@ public function setPartida(?Direction $partida): Shipment return $this; } -} + + //Extra para guia transportista + /** + * @var Transportist + */ + private $subContratado; + /** + * @return Transportist + */ + public function getSubContratado(): ?Transportist + { + return $this->subContratado; + } + + /** + * @param Transportist $subContratado + * + * @return Despatch + */ + public function setSubContratado(?Transportist $subContratado): Shipment + { + $this->subContratado = $subContratado; + + return $this; + } +} \ No newline at end of file diff --git a/packages/xml/src/Xml/Templates/despatch2022.xml.twig b/packages/xml/src/Xml/Templates/despatch2022.xml.twig index bc81f3be..8932ddef 100644 --- a/packages/xml/src/Xml/Templates/despatch2022.xml.twig +++ b/packages/xml/src/Xml/Templates/despatch2022.xml.twig @@ -110,6 +110,21 @@ {% for indicador in envio.indicadores %} {{ indicador }} {% endfor %} + {% if envio.subContratado %} + + + SUNAT_Envio + + + + {{ envio.subContratado.numDoc }} + + + + + + + {% endif %} {{ envio.modTraslado }} {% if envio.fecTraslado %} @@ -160,6 +175,17 @@ {{ envio.partida.direccion }} + {% if doc.remitente %} + + + {{ doc.remitente.numDoc|raw }} + + + + + + {% endif %} {% for precinto in envio.contenedores %} @@ -246,4 +272,4 @@ {% endfor %} -{% endapply %} + {% endapply %} \ No newline at end of file