From 2ab6380f97a19f6862b742e2469afbffc1149bf1 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 4 Dec 2024 13:46:42 +0100 Subject: [PATCH] feat: refs #7936 use default invoice data --- src/pages/InvoiceIn/InvoiceInList.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/InvoiceIn/InvoiceInList.vue b/src/pages/InvoiceIn/InvoiceInList.vue index 82e550aca..e9255398b 100644 --- a/src/pages/InvoiceIn/InvoiceInList.vue +++ b/src/pages/InvoiceIn/InvoiceInList.vue @@ -2,6 +2,7 @@ import { ref, computed, onMounted, onUnmounted } from 'vue'; import { useI18n } from 'vue-i18n'; import { useStateStore } from 'stores/useStateStore'; +import { useState } from 'src/composables/useState'; import { downloadFile } from 'src/composables/downloadFile'; import { toDate, toCurrency } from 'src/filters/index'; import InvoiceInFilter from './InvoiceInFilter.vue'; @@ -17,6 +18,7 @@ import VnInputDate from 'src/components/common/VnInputDate.vue'; import FetchData from 'src/components/FetchData.vue'; const stateStore = useStateStore(); +const user = useState().getUser(); const { viewSummary } = useSummaryDialog(); const { t } = useI18n(); @@ -132,7 +134,7 @@ const cols = computed(() => [ urlCreate: 'InvoiceIns', title: t('globals.createInvoiceIn'), onDataSaved: ({ id }) => tableRef.redirect(id), - formInitialData: {}, + formInitialData: { companyFk: user.companyFk, issued: Date.vnNew() }, }" redirect="invoice-in" :columns="cols"