0
0
Fork 0

fix: refs #7553 refs #7356 fix generatePdf function

This commit is contained in:
Jon Elias 2024-08-21 13:18:43 +02:00
parent 6b2df03b06
commit ffa6ef57fe
1 changed files with 4 additions and 4 deletions

View File

@ -13,6 +13,7 @@ import FormPopup from 'components/FormPopup.vue';
import VnSelect from 'components/common/VnSelect.vue';
import FetchData from 'components/FetchData.vue';
import VnInputTime from 'src/components/common/VnInputTime.vue';
import { useAcl } from 'src/composables/useAcl';
const props = defineProps({
ticket: {
@ -34,7 +35,7 @@ const showTurnDialog = ref(false);
const showChangeTimeDialog = ref(false);
const dialogRef = ref();
const isEditable = ref();
const hasInvoicing = ref();
const hasInvoicing = useAcl('invoicing');
const hasPdf = ref();
const actions = {
clone: async () => {
@ -529,18 +530,17 @@ async function handleInvoiceOutData() {
</QItemSection>
<QItemSection>{{ t('Make invoice') }}</QItemSection>
</QItem>
<!--TODO: acabar esta parte, falta el campo hasInvoicing-->
<QItem
@click="generatePdfDialog()"
v-ripple
clickable
v-if="ticket.refFk !== null && (ticket.hasInvoicing || hasPdf)"
v-if="ticket.refFk !== null && (hasInvoicing || hasPdf)"
>
<QItemSection avatar>
<QIcon name="picture_as_pdf" />
</QItemSection>
<QItemSection>{{
hasPdf.value ? t('Regenerate PDF invoice') : t('Generate PDF invoice')
hasPdf ? t('Regenerate PDF invoice') : t('Generate PDF invoice')
}}</QItemSection>
</QItem>
<QItem @click="openConfirmDialog('clone')" v-ripple clickable>