diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 74c4a9bc0..33c831e3f 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -1,7 +1,7 @@ - + {{ text }} diff --git a/src/css/app.scss b/src/css/app.scss index e607431f7..401fa8a72 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -153,6 +153,12 @@ select:-webkit-autofill { background-color: var(--vn-section-color); } +.q-table td[shrink] { + text-overflow: ellipsis; + overflow: hidden; + max-width: 80px; +} + .tr-header { color: var(--vn-label-color); } diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 6943252c9..e4e06ffac 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -254,6 +254,9 @@ globals: comment: Comment observations: Observations goToModuleIndex: Go to module index + unsavedPopup: + title: Unsaved changes will be lost + subtitle: Are you sure exit without saving? errors: statusUnauthorized: Access denied statusInternalServerError: An internal server error has ocurred @@ -386,8 +389,8 @@ customer: extendedList: tableVisibleColumns: id: Identifier - name: Comercial name - socialName: Business name + name: Name + socialName: Social name fi: Tax number salesPersonFk: Salesperson credit: Credit @@ -997,18 +1000,6 @@ route: shipped: Preparation date viewCmr: View CMR downloadCmrs: Download CMRs - columnLabels: - Id: Id - vehicle: Vehicle - description: Description - isServed: Served - worker: Worker - date: Date - started: Started - actions: Actions - agency: Agency - volume: Volume - finished: Finished supplier: list: payMethod: Pay method diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index f32562313..4cdc13f92 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -256,6 +256,9 @@ globals: comment: Comentario observations: Observaciones goToModuleIndex: Ir al índice del módulo + unsavedPopup: + title: Los cambios que no haya guardado se perderán + subtitle: ¿Seguro que quiere salir sin guardar? errors: statusUnauthorized: Acceso denegado statusInternalServerError: Ha ocurrido un error interno del servidor @@ -385,7 +388,7 @@ customer: extendedList: tableVisibleColumns: id: Identificador - name: Nombre Comercial + name: Nombre socialName: Razón social fi: NIF / CIF salesPersonFk: Comercial @@ -978,18 +981,6 @@ route: shipped: Fecha preparación viewCmr: Ver CMR downloadCmrs: Descargar CMRs - columnLabels: - Id: Id - vehicle: Vehículo - description: Descripción - isServed: Servida - worker: Trabajador - date: Fecha - started: Iniciada - actions: Acciones - agency: Agencia - volume: Volumen - finished: Finalizada supplier: list: payMethod: Método de pago diff --git a/src/pages/InvoiceIn/Card/InvoiceInCard.vue b/src/pages/InvoiceIn/Card/InvoiceInCard.vue index 912713f23..a95f289b0 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInCard.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInCard.vue @@ -2,6 +2,7 @@ import VnCard from 'components/common/VnCard.vue'; import InvoiceInDescriptor from './InvoiceInDescriptor.vue'; import InvoiceInFilter from '../InvoiceInFilter.vue'; +import InvoiceInSearchbar from '../InvoiceInSearchbar.vue'; const filter = { include: [ @@ -28,8 +29,9 @@ const filter = { :descriptor="InvoiceInDescriptor" :filter-panel="InvoiceInFilter" search-data-key="InvoiceInList" - search-url="InvoiceIns/filter" - searchbar-label="Search invoice" - searchbar-info="You can search by invoice reference" - /> + > + + + + diff --git a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue index 0d279de06..da24e50fa 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue @@ -1,6 +1,6 @@ ref="invoiceInFormRef" data-key="InvoiceInIntrastats" url="InvoiceInIntrastats" - :auto-load="!currency" + auto-load :data-required="{ invoiceInFk: invoiceInId }" :filter="filter" v-model:selected="rowsSelected" @@ -124,6 +130,9 @@ const getTotal = (data, key) => option-value="id" option-label="description" :filter-options="['id', 'description']" + :hide-selected="false" + :fill-input="false" + :display-value="formatOpt(row, col, 'description')" > @@ -247,7 +256,11 @@ const getTotal = (data, key) => } } - + en: amount: Amount diff --git a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue index cdf012b2a..5973913b2 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue @@ -66,7 +66,7 @@ const vatColumns = ref([ field: (row) => taxRate(row.taxableBase, row.taxTypeSage?.rate), format: (value) => toCurrency(value, currency.value), sortable: true, - align: 'center', + align: 'left', }, { name: 'currency', @@ -339,6 +339,16 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`; + + + {{ vatCell }} + + + + + {{ transactionCell }} + + @@ -347,7 +357,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`; }} - {{ + {{ toCurrency(getTotalTax(entity.invoiceInTax, currency)) }} @@ -423,6 +433,10 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`; .bg { background-color: var(--vn-accent-color); } +.q-chip { + color: var(--vn-text-color); +} + @media (min-width: $breakpoint-md) { .summaryBody { .vat { diff --git a/src/pages/InvoiceIn/Card/InvoiceInVat.vue b/src/pages/InvoiceIn/Card/InvoiceInVat.vue index 58f6e0d01..63a84b855 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInVat.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInVat.vue @@ -162,8 +162,14 @@ async function addExpense() { } } const getTotalTaxableBase = (rows) => - rows.reduce((acc, { taxableBase }) => acc + +taxableBase, 0); + rows.reduce((acc, { taxableBase }) => acc + +(taxableBase || 0), 0); const getTotalRate = (rows) => rows.reduce((acc, cur) => acc + +taxRate(cur), 0); + +const formatOpt = (row, { model, options }, prop) => { + const obj = row[model]; + const option = options.find(({ id }) => id == obj); + return option ? `${obj}:${option[prop]}` : ''; +}; rows.reduce((acc, cur) => acc + +taxRate(cur), 0) :option-value="col.optionValue" :option-label="col.optionLabel" :filter-options="['id', 'vat']" - :autofocus="col.tabIndex == 1" - input-debounce="0" + :hide-selected="false" + :fill-input="false" + :display-value="formatOpt(row, col, 'vat')" > @@ -280,6 +287,9 @@ const getTotalRate = (rows) => rows.reduce((acc, cur) => acc + +taxRate(cur), 0) :filter-options="['id', 'transaction']" :autofocus="col.tabIndex == 1" input-debounce="0" + :hide-selected="false" + :fill-input="false" + :display-value="formatOpt(row, col, 'transaction')" > @@ -474,11 +484,16 @@ const getTotalRate = (rows) => rows.reduce((acc, cur) => acc + +taxRate(cur), 0) /> +