#6942 improve invoiceIn #220
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { onBeforeMount, computed, watchEffect, watch } from 'vue';
|
||||
import { onBeforeMount, computed, watchEffect } from 'vue';
|
||||
jorgep marked this conversation as resolved
Outdated
|
||||
import { useRoute, onBeforeRouteUpdate } from 'vue-router';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
|
|
|
@ -74,7 +74,7 @@ async function insert() {
|
|||
await axios.post('/InvoiceInDueDays/new', { id: +invoiceId });
|
||||
await invoiceInFormRef.value.reload();
|
||||
}
|
||||
const getTotalAmount = (rows) => rows.reduce((acc, cur) => acc + cur.amount, 0);
|
||||
const getTotalAmount = (rows) => rows.reduce((acc, { amount }) => acc + +amount, 0);
|
||||
jorgep marked this conversation as resolved
Outdated
jsegarra
commented
Esta es mi propuesta para el error const getTotalAmount = (rows) => rows.reduce((acc, { amount }) => acc + +amount, 0); Esta es mi propuesta para el error
const getTotalAmount = (rows) => rows.reduce((acc, { amount }) => acc + +amount, 0);
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
|
@ -192,6 +192,7 @@ const getTotalAmount = (rows) => rows.reduce((acc, cur) => acc + cur.amount, 0);
|
|||
<QTd />
|
||||
<QTd />
|
||||
<QTd>
|
||||
{{ getTotalAmount(rows) }} ||
|
||||
{{ toCurrency(getTotalAmount(rows)) }}
|
||||
</QTd>
|
||||
<QTd />
|
||||
|
|
|
@ -335,9 +335,13 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
flat
|
||||
hide-pagination
|
||||
>
|
||||
<template #header="props">
|
||||
<QTr :props="props" class="bg">
|
||||
<QTh v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<template #header="vatProps">
|
||||
<QTr :props="vatProps" class="bg">
|
||||
<QTh
|
||||
v-for="col in vatProps.cols"
|
||||
:key="col.name"
|
||||
:props="vatProps"
|
||||
>
|
||||
{{ t(col.label) }}
|
||||
</QTh>
|
||||
</QTr>
|
||||
|
@ -363,9 +367,13 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
:rows="entity.invoiceInDueDay"
|
||||
flat
|
||||
>
|
||||
<template #header="props">
|
||||
<QTr :props="props" class="bg">
|
||||
<QTh v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<template #header="dueDayProps">
|
||||
<QTr :props="dueDayProps" class="bg">
|
||||
<QTh
|
||||
v-for="col in dueDayProps.cols"
|
||||
:key="col.name"
|
||||
:props="dueDayProps"
|
||||
>
|
||||
{{ t(col.label) }}
|
||||
</QTh>
|
||||
</QTr>
|
||||
|
@ -391,9 +399,13 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
:rows="entity.invoiceInIntrastat"
|
||||
flat
|
||||
>
|
||||
<template #header="props">
|
||||
<QTr :props="props" class="bg">
|
||||
<QTh v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<template #header="intrastatProps">
|
||||
<QTr :props="intrastatProps" class="bg">
|
||||
<QTh
|
||||
v-for="col in intrastatProps.cols"
|
||||
:key="col.name"
|
||||
:props="intrastatProps"
|
||||
>
|
||||
{{ t(col.label) }}
|
||||
</QTh>
|
||||
</QTr>
|
||||
|
|
Loading…
Reference in New Issue
Warning