Skip to content

Commit 9c79c0a

Browse files
authored
obs en multiples lineas en despatch
1 parent 995491e commit 9c79c0a

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

packages/core/src/Core/Model/Despatch/Despatch.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ class Despatch implements DocumentInterface
4141
*/
4242
private $correlativo;
4343
/**
44-
* @var string
44+
* @var array
4545
*/
46-
private $observacion;
46+
private $observacion = [];
4747
/**
4848
* @var DateTimeInterface
4949
*/
@@ -168,19 +168,19 @@ public function setCorrelativo(?string $correlativo): Despatch
168168
}
169169

170170
/**
171-
* @return string
171+
* @return array
172172
*/
173-
public function getObservacion(): ?string
173+
public function getObservacion(): ?array
174174
{
175175
return $this->observacion;
176176
}
177177

178178
/**
179-
* @param string $observacion
179+
* @param array $observacion
180180
*
181181
* @return Despatch
182182
*/
183-
public function setObservacion(?string $observacion): Despatch
183+
public function setObservacion(array $observacion): Despatch
184184
{
185185
$this->observacion = $observacion;
186186

packages/report/src/Report/Templates/despatch.html.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@
178178
<br><br>
179179
<span style="font-family:Tahoma, Geneva, sans-serif; font-size:12px" text-align="center"><strong>Observaciones</strong></span>
180180
<br>
181-
<p>{{ doc.observacion }}</p>
181+
{% for obs in doc.observacion %}
182+
<p>{{ obs }}</p>
183+
{% endfor %}
182184
{% endif %}
183185
</td>
184186
</tr>

packages/xml/src/Xml/Templates/despatch2022.xml.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
<cbc:IssueTime>{{ doc.fechaEmision|date('H:i:s') }}</cbc:IssueTime>
1414
<cbc:DespatchAdviceTypeCode listAgencyName="PE:SUNAT" listName="Tipo de Documento" listURI="urn:pe:gob:sunat:cpe:see:gem:catalogos:catalogo01">{{ doc.tipoDoc }}</cbc:DespatchAdviceTypeCode>
1515
{% if doc.observacion %}
16-
<cbc:Note><![CDATA[{{ doc.observacion|raw }}]]></cbc:Note>
16+
{% for obs in doc.observacion %}
17+
<cbc:Note><![CDATA[{{ obs|raw }}]]></cbc:Note>
18+
{% endfor %}
1719
{% endif %}
1820
{% for rel in doc.addDocs %}
1921
<cac:AdditionalDocumentReference>

0 commit comments

Comments
 (0)