<script setup>
import VnCard from 'components/common/VnCard.vue';
import InvoiceInDescriptor from './InvoiceInDescriptor.vue';

const filter = {
    include: [
        {
            relation: 'supplier',
            scope: {
                include: {
                    relation: 'contacts',
                    scope: { where: { email: { neq: null } } },
                },
            },
        },
        { relation: 'invoiceInDueDay' },
        { relation: 'company' },
        { relation: 'currency' },
    ],
};
</script>
<template>
    <VnCard
        data-key="InvoiceIn"
        base-url="InvoiceIns"
        :filter="filter"
        :descriptor="InvoiceInDescriptor"
        searchbar-data-key="InvoiceInList"
        searchbar-url="InvoiceIns/filter"
        searchbar-label="Search invoice"
        searchbar-info="You can search by invoice reference"
    />
</template>
