diff --git a/src/components/CreateManualInvoiceForm.vue b/src/components/CreateManualInvoiceForm.vue new file mode 100644 index 000000000..de5decaad --- /dev/null +++ b/src/components/CreateManualInvoiceForm.vue @@ -0,0 +1,155 @@ + + + + (invoiceOutSerialsOptions = data)" + auto-load + /> + (taxAreasOptions = data)" + auto-load + /> + (ticketsOptions = data)" + auto-load + /> + (clientsOptions = data)" + auto-load + /> + + + + + + + + + #{{ scope.opt?.id }} + {{ + scope.opt?.nickname + }} + + + + + + {{ + t('Or') + }} + + + + + + + + + + + + + + + + + + + + + + + +es: + Create manual invoice: Crear factura manual + Ticket: Ticket + Client: Cliente + Max date: Fecha límite + Serial: Serie + Area: Area + Reference: Referencia + Or: O + diff --git a/src/components/FormModelPopup.vue b/src/components/FormModelPopup.vue index 04322a3c8..cc22c77db 100644 --- a/src/components/FormModelPopup.vue +++ b/src/components/FormModelPopup.vue @@ -42,8 +42,8 @@ const { t } = useI18n(); const closeButton = ref(null); const isLoading = ref(false); -const onDataSaved = (dataSaved) => { - emit('onDataSaved', dataSaved); +const onDataSaved = (formData, requestResponse) => { + emit('onDataSaved', formData, requestResponse); closeForm(); }; @@ -59,7 +59,7 @@ const closeForm = () => { :default-actions="false" :url-create="urlCreate" :model="model" - @on-data-saved="onDataSaved($event)" + @on-data-saved="onDataSaved" > diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index ca68f0770..17b37b962 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -10,6 +10,7 @@ import VnLv from 'src/components/ui/VnLv.vue'; import CardList from 'src/components/ui/CardList.vue'; import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue'; +import CreateManualInvoiceForm from 'src/components/CreateManualInvoiceForm.vue'; import InvoiceOutFilter from './InvoiceOutFilter.vue'; import { toDate, toCurrency } from 'src/filters/index'; @@ -18,13 +19,15 @@ import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { useSession } from 'src/composables/useSession'; const { t } = useI18n(); -const selectedCards = ref(new Map()); const router = useRouter(); const stateStore = useStateStore(); const session = useSession(); const token = session.getToken(); const { viewSummary } = useSummaryDialog(); +const manualInvoiceDialogRef = ref(null); +const selectedCards = ref(new Map()); + onMounted(() => (stateStore.rightDrawer = true)); onUnmounted(() => (stateStore.rightDrawer = false)); @@ -83,6 +86,10 @@ const openPdf = () => { console.error('Error opening PDF'); } }; + +const openCreateInvoiceModal = () => { + manualInvoiceDialogRef.value.show(); +}; @@ -204,6 +211,20 @@ const openPdf = () => { + + + + {{ t('createInvoice') }} + + + + + + @@ -214,10 +235,13 @@ en: fileAllowed: Successful download of CSV file youCanSearchByInvoiceReference: You can search by invoice reference downloadPdf: Download PDF + createInvoice: Make invoice es: searchInvoice: Buscar factura emitida fileDenied: El navegador denegó la descarga de archivos... fileAllowed: Descarga exitosa de archivo CSV youCanSearchByInvoiceReference: Puedes buscar por referencia de la factura downloadPdf: Download PDF + createInvoice: Crear factura +