Hello everyone,
I have encountered an issue with the formatCurrency
expression in my app, and I’m seeking assistance to resolve it. I suspect that the problem arose after I performed a plugin upgrade yesterday.
The error message I am receiving in Chrome’s console is as follows:
Formatter formatCurrency in expression [importe.formatCurrency('$', ',', '.', 2)] doesn't exist for type string
What’s perplexing to me is that “importe” is not a string; it is, in fact, a numeric value. Moreover, the formatter appears to be functioning correctly in the sum row, as indicated by the green highlight. However, the rows marked in red are the ones where the issue is occurring.
Below is the code for my table:
<table class="table table-sm table-hover border-secondary">
<thead>
<tr>
<th>Fecha</th>
<th>Proveedor</th>
<th>Tipo</th>
<th>PV - Comprobante</th>
<th>Rubro</th>
<th>Descripcion</th>
<th>Importe</th>
<th>Saldo</th>
</tr>
</thead>
<tbody is="dmx-repeat" dmx-generator="bs5table" dmx-bind:repeat="queryComprobantes.data.querySIAC.data" id="tableRepeatSIAC">
<tr dmx-on:click="modalAgregarGasto.show();modalAgregarGasto.detailGastoApagar.select(comprobante)">
<td dmx-text="fecha.formatDate('dd/MM/yyyy')"></td>
<td dmx-text="proveedor"></td>
<td dmx-text="tipo"></td>
<td dmx-text="pv+' - '+numero"></td>
<td dmx-bs-tooltip="rubro" class="text-center"><i class="fas fa-info-circle"></i></td>
<td dmx-bs-tooltip="descripcion" class="text-center"><i class="fas fa-info-circle"></i></td>
<td dmx-text="importe.formatCurrency('$', ',', '.', 2)"></td>
<td dmx-text="saldo.formatCurrency('$', ',', '.', 2)"></td>
</tr>
</tbody>
<tbody class="table-secondary">
<tr>
<th scope="row" colspan="6" class="text-end">Totales</th>
<td dmx-text="queryComprobantes.data.querySIAC.data.sum(`importe`).formatCurrency('$', ',', '.', 2)"></td>
<td dmx-text="queryComprobantes.data.querySIAC.data.sum(`saldo`).formatCurrency('$', ',', '.', 2)"></td>
</tr>
</tbody>
</table>