parent
a5f41871ae
commit
4fc3e1fabb
|
@ -44,6 +44,7 @@ const filter = computed(() => {
|
||||||
return {
|
return {
|
||||||
supplierId: route.params.id,
|
supplierId: route.params.id,
|
||||||
companyId: companyId.value ?? companyUser.value,
|
companyId: companyId.value ?? companyUser.value,
|
||||||
|
isBooked: false,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -138,33 +139,10 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'isConciliate',
|
name: 'isBooked',
|
||||||
label: t('Conciliated'),
|
label: t('Conciliated'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
align: 'left',
|
|
||||||
name: 'tableActions',
|
|
||||||
actions: [
|
|
||||||
// {
|
|
||||||
// title: t('globals.downloadPdf'),
|
|
||||||
// icon: 'cloud_download',
|
|
||||||
// show: (row) => row.isInvoice,
|
|
||||||
// action: (row) => showBalancePdf(row),
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: t('Send compensation'),
|
|
||||||
// icon: 'outgoing_mail',
|
|
||||||
// show: (row) => !!row.isCompensation,
|
|
||||||
// action: ({ id }) =>
|
|
||||||
// openConfirmationModal(
|
|
||||||
// t('Send compensation'),
|
|
||||||
// t('Do you want to report compensation to the supplier by mail?'),
|
|
||||||
// () => sendEmail(`Receipts/${id}/balance-compensation-email`)
|
|
||||||
// ),
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
|
@ -223,7 +201,7 @@ function round(value) {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- <VnSubToolbar class="q-mb-md">
|
<VnSubToolbar class="q-mb-md">
|
||||||
<template #st-data>
|
<template #st-data>
|
||||||
<div class="column justify-center q-px-md q-py-sm">
|
<div class="column justify-center q-px-md q-py-sm">
|
||||||
<span class="text-bold">{{ t('Total by company') }}</span>
|
<span class="text-bold">{{ t('Total by company') }}</span>
|
||||||
|
@ -244,7 +222,7 @@ function round(value) {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</VnSubToolbar> -->
|
</VnSubToolbar>
|
||||||
<QDrawer side="right" :width="265" v-model="stateStore.rightDrawer">
|
<QDrawer side="right" :width="265" v-model="stateStore.rightDrawer">
|
||||||
<SupplierBalanceFilter data-key="SupplierBalance" />
|
<SupplierBalanceFilter data-key="SupplierBalance" />
|
||||||
</QDrawer>
|
</QDrawer>
|
||||||
|
@ -258,9 +236,58 @@ function round(value) {
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:is-editable="false"
|
:is-editable="false"
|
||||||
:column-search="false"
|
:column-search="false"
|
||||||
|
@on-fetch="onFetch"
|
||||||
:disable-option="{ card: true }"
|
:disable-option="{ card: true }"
|
||||||
|
:footer="true"
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
|
<template #column-balance="{ rowIndex }">
|
||||||
|
{{ toCurrency(balances[rowIndex]?.balance) }}
|
||||||
|
</template>
|
||||||
|
<template #column-description="{ row }">
|
||||||
|
<div class="link" v-if="row.isInvoice">
|
||||||
|
{{ t('bill', { ref: row.description }) }}
|
||||||
|
<InvoiceOutDescriptorProxy :id="row.description" />
|
||||||
|
</div>
|
||||||
|
<span v-else class="q-pa-xs dotted rounded-borders" :title="row.description">
|
||||||
|
{{ row.description }}
|
||||||
|
</span>
|
||||||
|
<QPopupEdit
|
||||||
|
v-model="row.description"
|
||||||
|
v-slot="scope"
|
||||||
|
@save="
|
||||||
|
(value) =>
|
||||||
|
value != row.description &&
|
||||||
|
axios.patch(`Receipts/${row.id}`, { description: value })
|
||||||
|
"
|
||||||
|
auto-save
|
||||||
|
>
|
||||||
|
<VnInput
|
||||||
|
v-model="scope.value"
|
||||||
|
:disable="
|
||||||
|
!hasAny([{ model: 'Receipt', props: '*', accessType: 'WRITE' }])
|
||||||
|
"
|
||||||
|
@keypress.enter="scope.set"
|
||||||
|
autofocus
|
||||||
|
/>
|
||||||
|
</QPopupEdit>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #column-footer-invoiceEuros>
|
||||||
|
<span>
|
||||||
|
{{ round(tableRef.footer.invoiceEuros) }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template #column-footer-paymentEuros>
|
||||||
|
<span>
|
||||||
|
{{ round(tableRef.footer.paymentEuros) }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template #column-footer-euroBalance>
|
||||||
|
<span>
|
||||||
|
{{ round(tableRef.footer.euroBalance) }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
<QPageSticky :offset="[18, 18]" style="z-index: 2">
|
<QPageSticky :offset="[18, 18]" style="z-index: 2">
|
||||||
<QBtn
|
<QBtn
|
||||||
|
|
Loading…
Reference in New Issue