From a0019b51a5593d6d5e18d61bcbb89d241b67b43a Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Mon, 24 Nov 2025 19:02:29 -0300 Subject: [PATCH] Skip date if none provided --- app/resources/views/ventas/precios/modal/import.blade.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/resources/views/ventas/precios/modal/import.blade.php b/app/resources/views/ventas/precios/modal/import.blade.php index b9196d6..8a5f8a9 100644 --- a/app/resources/views/ventas/precios/modal/import.blade.php +++ b/app/resources/views/ventas/precios/modal/import.blade.php @@ -115,7 +115,7 @@ this.data.filename = 'Plantilla de Precios' this.data.format = 'xlsx' this.data.columns = { - Fecha: '', + 'Fecha*': 'Fecha es opcional. Se toma la fecha seleccionada', 'Proyecto*': 'Proyecto es opcional. Se toma el proyecto seleccionado', 'Tipo*': 'Tipo es optional. Se toma departamento.', Unidad: '', @@ -181,7 +181,9 @@ const body = new FormData() body.set('project_id', this.components.project.value) const date = this.components.$calendar.calendar('get date') - body.set('date', [date.getFullYear(), date.getMonth() + 1, date.getDate()].join('-')) + if (date) { + body.set('date', [date.getFullYear(), date.getMonth() + 1, date.getDate()].join('-')) + } body.set('file', this.components.file.files[0]) APIClient.fetch(url, {method, body}).then(response => response.json()).then(json => { if (json.status === true) {