Skip to content
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
12 changes: 6 additions & 6 deletions packages/core/src/Core/Model/Despatch/Despatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class Despatch implements DocumentInterface
*/
private $correlativo;
/**
* @var string
* @var array
*/
private $observacion;
private $observacion = [];
/**
* @var DateTimeInterface
*/
Expand Down Expand Up @@ -168,19 +168,19 @@ public function setCorrelativo(?string $correlativo): Despatch
}

/**
* @return string
* @return array
*/
public function getObservacion(): ?string
public function getObservacion(): ?array
{
return $this->observacion;
}

/**
* @param string $observacion
* @param array $observacion
*
* @return Despatch
*/
public function setObservacion(?string $observacion): Despatch
public function setObservacion(array $observacion): Despatch
{
$this->observacion = $observacion;

Expand Down
4 changes: 3 additions & 1 deletion packages/report/src/Report/Templates/despatch.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@
<br><br>
<span style="font-family:Tahoma, Geneva, sans-serif; font-size:12px" text-align="center"><strong>Observaciones</strong></span>
<br>
<p>{{ doc.observacion }}</p>
{% for obs in doc.observacion %}
<p>{{ obs }}</p>
{% endfor %}
{% endif %}
</td>
</tr>
Expand Down
4 changes: 3 additions & 1 deletion packages/xml/src/Xml/Templates/despatch2022.xml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
<cbc:IssueTime>{{ doc.fechaEmision|date('H:i:s') }}</cbc:IssueTime>
<cbc:DespatchAdviceTypeCode listAgencyName="PE:SUNAT" listName="Tipo de Documento" listURI="urn:pe:gob:sunat:cpe:see:gem:catalogos:catalogo01">{{ doc.tipoDoc }}</cbc:DespatchAdviceTypeCode>
{% if doc.observacion %}
<cbc:Note><![CDATA[{{ doc.observacion|raw }}]]></cbc:Note>
{% for obs in doc.observacion %}
<cbc:Note><![CDATA[{{ obs|raw }}]]></cbc:Note>
{% endfor %}
{% endif %}
{% for rel in doc.addDocs %}
<cac:AdditionalDocumentReference>
Expand Down
Loading