#7936 improve InvoiceIn #1004
|
@ -1,10 +1,10 @@
|
|||
import { toCurrency } from 'src/filters';
|
||||
|
||||
export function getTotal(rows, key, opts = {}) {
|
||||
const { currency, cb } = opts;
|
||||
const { currency, cb, decimalPlaces } = opts;
|
||||
jorgep marked this conversation as resolved
Outdated
|
||||
const total = rows.reduce((acc, row) => acc + +(cb ? cb(row) : row[key] || 0), 0);
|
||||
|
||||
return currency
|
||||
? toCurrency(total, currency == 'default' ? undefined : currency)
|
||||
: total;
|
||||
: parseFloat(total).toFixed(decimalPlaces ?? 2);
|
||||
}
|
||||
|
|
|
@ -261,7 +261,7 @@ const formatOpt = (row, { model, options }, prop) => {
|
|||
country: Country
|
||||
es:
|
||||
Code: Código
|
||||
amount: Cantidad
|
||||
amount: Valor mercancía
|
||||
net: Neto
|
||||
stems: Tallos
|
||||
country: País
|
||||
|
|
|
@ -188,11 +188,6 @@ const formatOpt = (row, { model, options }, prop) => {
|
|||
<template #body-cell-taxablebase="{ row }">
|
||||
<QTd>
|
||||
<VnInputNumber
|
||||
:class="{
|
||||
'no-pointer-events': isNotEuro(currency),
|
||||
}"
|
||||
:disable="isNotEuro(currency)"
|
||||
label=""
|
||||
clear-icon="close"
|
||||
v-model="row.taxableBase"
|
||||
clearable
|
||||
|
|
Loading…
Reference in New Issue
int?