Skip to content

guia remision transportista #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion packages/core/src/Core/Model/Despatch/Despatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
27 changes: 26 additions & 1 deletion packages/core/src/Core/Model/Despatch/Shipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -545,4 +545,29 @@

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

Check failure on line 567 in packages/core/src/Core/Model/Despatch/Shipment.php

View workflow job for this annotation

GitHub Actions / build (8.2, false)

PHPDoc tag @return with type Greenter\Model\Despatch\Despatch is incompatible with native type Greenter\Model\Despatch\Shipment.
{
$this->subContratado = $subContratado;

return $this;
}
}
28 changes: 27 additions & 1 deletion packages/xml/src/Xml/Templates/despatch2022.xml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,21 @@
{% for indicador in envio.indicadores %}
<cbc:SpecialInstructions>{{ indicador }}</cbc:SpecialInstructions>
{% endfor %}
{% if envio.subContratado %}
<cac:Consignment>
<!-- ID OBLIGATORIO POR UBL -->
<cbc:ID>SUNAT_Envio</cbc:ID>
<!-- DATOS DEL SUBCONTRATADOR -->
<cac:LogisticsOperatorParty>
<cac:PartyIdentification>
<cbc:ID schemeID="{{ envio.subContratado.tipoDoc }}" schemeName="Documento de Identidad" schemeAgencyName="PE:SUNAT" schemeURI="urn:pe:gob:sunat:cpe:see:gem:catalogos:catalogo06">{{ envio.subContratado.numDoc }}</cbc:ID>
</cac:PartyIdentification>
<cac:PartyLegalEntity>
<cbc:RegistrationName><![CDATA[{{ envio.subContratado.rznSocial|raw }}]]></cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:LogisticsOperatorParty>
</cac:Consignment>
{% endif %}
<cac:ShipmentStage>
<cbc:TransportModeCode listName="Modalidad de traslado" listAgencyName="PE:SUNAT" listURI="urn:pe:gob:sunat:cpe:see:gem:catalogos:catalogo18">{{ envio.modTraslado }}</cbc:TransportModeCode>
{% if envio.fecTraslado %}
Expand Down Expand Up @@ -160,6 +175,17 @@
<cbc:Line>{{ envio.partida.direccion }}</cbc:Line>
</cac:AddressLine>
</cac:DespatchAddress>
{% if doc.remitente %}
<cac:DespatchParty>
<cac:PartyIdentification>
<cbc:ID schemeID="6" schemeName="Documento de Identidad" schemeAgencyName="PE:SUNAT"
schemeURI="urn:pe:gob:sunat:cpe:see:gem:catalogos:catalogo06">{{ doc.remitente.numDoc|raw }}</cbc:ID>
</cac:PartyIdentification>
<cac:PartyLegalEntity>
<cbc:RegistrationName><![CDATA[{{ doc.remitente.rznSocial }}]]></cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:DespatchParty>
{% endif %}
</cac:Despatch>
</cac:Delivery>
{% for precinto in envio.contenedores %}
Expand Down Expand Up @@ -246,4 +272,4 @@
</cac:DespatchLine>
{% endfor %}
</DespatchAdvice>
{% endapply %}
{% endapply %}
Loading