Skip to content

Commit a58f785

Browse files
authored
observaciones en varias lineas
1 parent 49631c7 commit a58f785

3 files changed

Lines changed: 13 additions & 8 deletions

File tree

packages/core/src/Core/Model/Sale/Invoice.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ class Invoice extends BaseSale
106106
private $subTotal;
107107

108108
/**
109-
* @var string
109+
* @var string[]
110110
*/
111-
private $observacion;
111+
private array $observacion = [];
112112

113113
/**
114114
* @var Address
@@ -438,17 +438,17 @@ public function setSubTotal(?float $subTotal): Invoice
438438
/**
439439
* @return string
440440
*/
441-
public function getObservacion(): ?string
441+
public function getObservacion(): ?array
442442
{
443443
return $this->observacion;
444444
}
445445

446446
/**
447-
* @param string $observacion
447+
* @param array $observacion
448448
*
449449
* @return Invoice
450450
*/
451-
public function setObservacion(?string $observacion): Invoice
451+
public function setObservacion(array $observacion): Invoice
452452
{
453453
$this->observacion = $observacion;
454454

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,11 @@
213213
<td class="total">{{ moneda }}{{ det.mtoValorVenta }}</td>
214214
</tr>
215215
{% endfor %}
216+
<tr>
217+
{% for obs in doc.observacion %}
218+
<span>{{ obs }}</span><br>
219+
{% endfor %}
220+
</tr>
216221
</tbody>
217222
<tfoot>
218223
<tr>

packages/xml/src/Xml/Templates/invoice2.1.xml.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
{% for leg in doc.legends %}
2020
<cbc:Note languageLocaleID="{{ leg.code }}"><![CDATA[{{ leg.value }}]]></cbc:Note>
2121
{% endfor %}
22-
{% if doc.observacion %}
23-
<cbc:Note><![CDATA[{{ doc.observacion }}]]></cbc:Note>
24-
{% endif %}
22+
{% for obs in doc.observacion %}
23+
<cbc:Note><![CDATA[{{ obs }}]]></cbc:Note>
24+
{% endfor %}
2525
<cbc:DocumentCurrencyCode>{{ doc.tipoMoneda }}</cbc:DocumentCurrencyCode>
2626
{% if doc.compra %}
2727
<cac:OrderReference>

0 commit comments

Comments
 (0)