#6942 improve invoiceIn #220

Merged
jorgep merged 63 commits from 6942-improveInvoceIn into dev 2024-05-29 07:03:46 +00:00
3 changed files with 24 additions and 11 deletions
Showing only changes of commit cda9e71197 - Show all commits

View File

@ -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

Warning

Warning
import { useRoute, onBeforeRouteUpdate } from 'vue-router';
import { useArrayData } from 'src/composables/useArrayData';
import { useStateStore } from 'stores/useStateStore';

View File

@ -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

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 />

View File

@ -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>