7525-devToTest #419

Merged
alexm merged 177 commits from 7525-devToTest into test 2024-06-04 08:06:27 +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> <script setup>
import { onBeforeMount, computed, watchEffect, watch } from 'vue'; import { onBeforeMount, computed, watchEffect } from 'vue';
import { useRoute, onBeforeRouteUpdate } from 'vue-router'; import { useRoute, onBeforeRouteUpdate } from 'vue-router';
import { useArrayData } from 'src/composables/useArrayData'; import { useArrayData } from 'src/composables/useArrayData';
import { useStateStore } from 'stores/useStateStore'; import { useStateStore } from 'stores/useStateStore';

View File

@ -74,7 +74,7 @@ async function insert() {
await axios.post('/InvoiceInDueDays/new', { id: +invoiceId }); await axios.post('/InvoiceInDueDays/new', { id: +invoiceId });
await invoiceInFormRef.value.reload(); 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);
</script> </script>
<template> <template>
<FetchData <FetchData
@ -192,6 +192,7 @@ const getTotalAmount = (rows) => rows.reduce((acc, cur) => acc + cur.amount, 0);
<QTd /> <QTd />
<QTd /> <QTd />
<QTd> <QTd>
{{ getTotalAmount(rows) }} ||
{{ toCurrency(getTotalAmount(rows)) }} {{ toCurrency(getTotalAmount(rows)) }}
</QTd> </QTd>
<QTd /> <QTd />

View File

@ -335,9 +335,13 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
flat flat
hide-pagination hide-pagination
> >
<template #header="props"> <template #header="vatProps">
<QTr :props="props" class="bg"> <QTr :props="vatProps" class="bg">
<QTh v-for="col in props.cols" :key="col.name" :props="props"> <QTh
v-for="col in vatProps.cols"
:key="col.name"
:props="vatProps"
>
{{ t(col.label) }} {{ t(col.label) }}
</QTh> </QTh>
</QTr> </QTr>
@ -363,9 +367,13 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
:rows="entity.invoiceInDueDay" :rows="entity.invoiceInDueDay"
flat flat
> >
<template #header="props"> <template #header="dueDayProps">
<QTr :props="props" class="bg"> <QTr :props="dueDayProps" class="bg">
<QTh v-for="col in props.cols" :key="col.name" :props="props"> <QTh
v-for="col in dueDayProps.cols"
:key="col.name"
:props="dueDayProps"
>
{{ t(col.label) }} {{ t(col.label) }}
</QTh> </QTh>
</QTr> </QTr>
@ -391,9 +399,13 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
:rows="entity.invoiceInIntrastat" :rows="entity.invoiceInIntrastat"
flat flat
> >
<template #header="props"> <template #header="intrastatProps">
<QTr :props="props" class="bg"> <QTr :props="intrastatProps" class="bg">
<QTh v-for="col in props.cols" :key="col.name" :props="props"> <QTh
v-for="col in intrastatProps.cols"
:key="col.name"
:props="intrastatProps"
>
{{ t(col.label) }} {{ t(col.label) }}
</QTh> </QTh>
</QTr> </QTr>