Skip to content
Closed
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/Sale/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ class Invoice extends BaseSale
private $subTotal;

/**
* @var string
* @var string[]
*/
private $observacion;
private array $observacion = [];

/**
* @var Address
Expand Down Expand Up @@ -436,19 +436,19 @@ public function setSubTotal(?float $subTotal): Invoice
}

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

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

Expand Down
5 changes: 5 additions & 0 deletions packages/report/src/Report/Templates/invoice2.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@
<td class="total">{{ moneda }}{{ det.mtoValorVenta }}</td>
</tr>
{% endfor %}
<tr>
{% for obs in doc.observacion %}
<span>{{ obs }}</span><br>
{% endfor %}
</tr>
</tbody>
<tfoot>
<tr>
Expand Down
6 changes: 3 additions & 3 deletions packages/xml/src/Xml/Templates/invoice2.1.xml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
{% for leg in doc.legends %}
<cbc:Note languageLocaleID="{{ leg.code }}"><![CDATA[{{ leg.value }}]]></cbc:Note>
{% endfor %}
{% if doc.observacion %}
<cbc:Note><![CDATA[{{ doc.observacion }}]]></cbc:Note>
{% endif %}
{% for obs in doc.observacion %}
<cbc:Note><![CDATA[{{ obs }}]]></cbc:Note>
{% endfor %}
<cbc:DocumentCurrencyCode>{{ doc.tipoMoneda }}</cbc:DocumentCurrencyCode>
{% if doc.compra %}
<cac:OrderReference>
Expand Down
Loading