refactor: refs #8316 used VnSection and VnCardBeta #1146

Open
jtubau wants to merge 6 commits from 8316-invoiceOutCardWithVnCardBeta into dev
10 changed files with 491 additions and 445 deletions

View File

@ -1,9 +1,9 @@
globals: globals:
lang: lang:
es: Spanish es: Spanish
en: English en: English
quantity: Quantity
language: Language language: Language
quantity: Quantity
entity: Entity entity: Entity
user: User user: User
details: Details details: Details
@ -35,7 +35,6 @@ globals:
confirm: Confirm confirm: Confirm
assign: Assign assign: Assign
back: Back back: Back
downloadPdf: Download PDF
yes: 'Yes' yes: 'Yes'
no: 'No' no: 'No'
noChanges: No changes to save noChanges: No changes to save
@ -59,6 +58,7 @@ globals:
downloadCSVSuccess: CSV downloaded successfully downloadCSVSuccess: CSV downloaded successfully
reference: Reference reference: Reference
agency: Agency agency: Agency
entry: Entry
warehouseOut: Warehouse Out warehouseOut: Warehouse Out
warehouseIn: Warehouse In warehouseIn: Warehouse In
landed: Landed landed: Landed
@ -67,11 +67,11 @@ globals:
amount: Amount amount: Amount
packages: Packages packages: Packages
download: Download download: Download
downloadPdf: Download PDF
selectRows: 'Select all { numberRows } row(s)' selectRows: 'Select all { numberRows } row(s)'
allRows: 'All { numberRows } row(s)' allRows: 'All { numberRows } row(s)'
markAll: Mark all markAll: Mark all
requiredField: Required field requiredField: Required field
valueCantBeEmpty: Value cannot be empty
class: clase class: clase
type: Type type: Type
reason: reason reason: reason
@ -81,6 +81,9 @@ globals:
warehouse: Warehouse warehouse: Warehouse
company: Company company: Company
fieldRequired: Field required fieldRequired: Field required
valueCantBeEmpty: Value cannot be empty
Value can't be blank: Value cannot be blank
Value can't be null: Value cannot be null
allowedFilesText: 'Allowed file types: { allowedContentTypes }' allowedFilesText: 'Allowed file types: { allowedContentTypes }'
smsSent: SMS sent smsSent: SMS sent
confirmDeletion: Confirm deletion confirmDeletion: Confirm deletion
@ -130,6 +133,26 @@ globals:
medium: Medium medium: Medium
big: Big big: Big
email: Email email: Email
supplier: Supplier
ticketList: Ticket List
created: Created
worker: Worker
now: Now
name: Name
new: New
comment: Comment
observations: Observations
goToModuleIndex: Go to module index
createInvoiceIn: Create invoice in
myAccount: My account
noOne: No one
maxTemperature: Max
minTemperature: Min
changePass: Change password
deleteConfirmTitle: Delete selected elements
changeState: Change state
raid: 'Raid {daysInForward} days'
isVies: Vies
pageTitles: pageTitles:
logIn: Login logIn: Login
addressEdit: Update address addressEdit: Update address
@ -151,13 +174,14 @@ globals:
subRoles: Subroles subRoles: Subroles
inheritedRoles: Inherited Roles inheritedRoles: Inherited Roles
customers: Customers customers: Customers
customerCreate: New customer
createCustomer: Create customer
createOrder: New order
list: List list: List
webPayments: Web Payments webPayments: Web Payments
extendedList: Extended list extendedList: Extended list
notifications: Notifications notifications: Notifications
defaulter: Defaulter defaulter: Defaulter
customerCreate: New customer
createOrder: New order
fiscalData: Fiscal data fiscalData: Fiscal data
billingData: Billing data billingData: Billing data
consignees: Consignees consignees: Consignees
@ -193,27 +217,28 @@ globals:
claims: Claims claims: Claims
claimCreate: New claim claimCreate: New claim
lines: Lines lines: Lines
photos: Photos
development: Development development: Development
photos: Photos
action: Action action: Action
invoiceOuts: Invoice out invoiceOuts: Invoice out
negativeBases: Negative Bases negativeBases: Negative Bases
globalInvoicing: Global invoicing globalInvoicing: Global invoicing
invoiceOutCreate: Create invoice out invoiceOutCreate: Create invoice out
order: Orders
orderList: List
orderCreate: New order
catalog: Catalog
volume: Volume
shelving: Shelving shelving: Shelving
shelvingList: Shelving List shelvingList: Shelving List
shelvingCreate: New shelving shelvingCreate: New shelving
invoiceIns: Invoices In invoiceIns: Invoices In
invoiceInCreate: Create invoice in invoiceInCreate: Create invoice in
vat: VAT vat: VAT
labeler: Labeler
dueDay: Due day dueDay: Due day
intrastat: Intrastat intrastat: Intrastat
corrective: Corrective corrective: Corrective
order: Orders
orderList: List
orderCreate: New order
catalog: Catalog
volume: Volume
workers: Workers workers: Workers
workerCreate: New worker workerCreate: New worker
department: Department department: Department
@ -226,10 +251,10 @@ globals:
wagonsList: Wagons List wagonsList: Wagons List
wagonCreate: Create wagon wagonCreate: Create wagon
wagonEdit: Edit wagon wagonEdit: Edit wagon
wagonCounter: Trolley counter
typesList: Types List typesList: Types List
typeCreate: Create type typeCreate: Create type
typeEdit: Edit type typeEdit: Edit type
wagonCounter: Trolley counter
roadmap: Roadmap roadmap: Roadmap
stops: Stops stops: Stops
routes: Routes routes: Routes
@ -238,21 +263,16 @@ globals:
routeCreate: New route routeCreate: New route
RouteRoadmap: Roadmaps RouteRoadmap: Roadmaps
RouteRoadmapCreate: Create roadmap RouteRoadmapCreate: Create roadmap
RouteExtendedList: Router
autonomous: Autonomous autonomous: Autonomous
suppliers: Suppliers suppliers: Suppliers
supplier: Supplier supplier: Supplier
expedition: Expedition
services: Service
components: Components
pictures: Pictures
packages: Packages
tracking: Tracking
labeler: Labeler
supplierCreate: New supplier supplierCreate: New supplier
accounts: Accounts accounts: Accounts
addresses: Addresses addresses: Addresses
agencyTerm: Agency agreement agencyTerm: Agency agreement
travel: Travels travel: Travels
create: Create
extraCommunity: Extra community extraCommunity: Extra community
travelCreate: New travel travelCreate: New travel
history: Log history: Log
@ -260,14 +280,13 @@ globals:
items: Items items: Items
diary: Diary diary: Diary
tags: Tags tags: Tags
create: Create
buyRequest: Buy requests
fixedPrice: Fixed prices fixedPrice: Fixed prices
buyRequest: Buy requests
wasteBreakdown: Waste breakdown wasteBreakdown: Waste breakdown
itemCreate: New item itemCreate: New item
barcode: Barcodes
tax: Tax tax: Tax
botanical: Botanical botanical: Botanical
barcode: Barcodes
itemTypeCreate: New item type itemTypeCreate: New item type
family: Item Type family: Item Type
lastEntries: Last entries lastEntries: Last entries
@ -283,13 +302,20 @@ globals:
formation: Formation formation: Formation
locations: Locations locations: Locations
warehouses: Warehouses warehouses: Warehouses
saleTracking: Sale tracking
roles: Roles roles: Roles
connections: Connections connections: Connections
acls: ACLs acls: ACLs
mailForwarding: Mail forwarding mailForwarding: Mail forwarding
mailAlias: Mail alias mailAlias: Mail alias
privileges: Privileges privileges: Privileges
observation: Notes
expedition: Expedition
saleTracking: Sale tracking
services: Service
tracking: Tracking
components: Components
pictures: Pictures
packages: Packages
ldap: LDAP ldap: LDAP
samba: Samba samba: Samba
twoFactor: Two factor twoFactor: Two factor
@ -300,27 +326,12 @@ globals:
serial: Serial serial: Serial
medical: Mutual medical: Mutual
pit: IRPF pit: IRPF
RouteExtendedList: Router
wasteRecalc: Waste recaclulate wasteRecalc: Waste recaclulate
operator: Operator operator: Operator
parking: Parking parking: Parking
supplier: Supplier
created: Created
worker: Worker
now: Now
name: Name
new: New
comment: Comment
observations: Observations
goToModuleIndex: Go to module index
unsavedPopup: unsavedPopup:
title: Unsaved changes will be lost title: Unsaved changes will be lost
subtitle: Are you sure exit without saving? subtitle: Are you sure exit without saving?
createInvoiceIn: Create invoice in
myAccount: My account
noOne: No one
maxTemperature: Max
minTemperature: Min
params: params:
clientFk: Client id clientFk: Client id
salesPersonFk: Sales person salesPersonFk: Sales person
@ -338,19 +349,13 @@ globals:
supplierFk: Supplier supplierFk: Supplier
supplierRef: Supplier ref supplierRef: Supplier ref
serial: Serial serial: Serial
amount: Importe amount: Amount
awbCode: AWB awbCode: AWB
correctedFk: Rectified correctedFk: Rectified
correctingFk: Rectificative correctingFk: Rectificative
daysOnward: Days onward daysOnward: Days onward
countryFk: Country countryFk: Country
companyFk: Company companyFk: Company
changePass: Change password
setPass: Set password
deleteConfirmTitle: Delete selected elements
changeState: Change state
raid: 'Raid {daysInForward} days'
isVies: Vies
errors: errors:
statusUnauthorized: Access denied statusUnauthorized: Access denied
statusInternalServerError: An internal server error has ocurred statusInternalServerError: An internal server error has ocurred

View File

@ -53,11 +53,12 @@ globals:
today: Hoy today: Hoy
yesterday: Ayer yesterday: Ayer
dateFormat: es-ES dateFormat: es-ES
noSelectedRows: No tienes ninguna línea seleccionada
microsip: Abrir en MicroSIP microsip: Abrir en MicroSIP
noSelectedRows: No tienes ninguna línea seleccionada
downloadCSVSuccess: Descarga de CSV exitosa downloadCSVSuccess: Descarga de CSV exitosa
reference: Referencia reference: Referencia
agency: Agencia agency: Agencia
entry: Entrada
warehouseOut: Alm. salida warehouseOut: Alm. salida
warehouseIn: Alm. entrada warehouseIn: Alm. entrada
landed: F. entrega landed: F. entrega
@ -132,6 +133,26 @@ globals:
medium: Mediano/a medium: Mediano/a
big: Grande big: Grande
email: Correo email: Correo
supplier: Proveedor
ticketList: Listado de tickets
created: Fecha creación
worker: Trabajador
now: Ahora
name: Nombre
new: Nuevo
comment: Comentario
observations: Observaciones
goToModuleIndex: Ir al índice del módulo
createInvoiceIn: Crear factura recibida
myAccount: Mi cuenta
noOne: Nadie
maxTemperature: Máx
minTemperature: Mín
changePass: Cambiar contraseña
deleteConfirmTitle: Eliminar los elementos seleccionados
changeState: Cambiar estado
raid: 'Redada {daysInForward} días'
isVies: Vies
pageTitles: pageTitles:
logIn: Inicio de sesión logIn: Inicio de sesión
addressEdit: Modificar consignatario addressEdit: Modificar consignatario
@ -154,17 +175,17 @@ globals:
inheritedRoles: Roles heredados inheritedRoles: Roles heredados
customers: Clientes customers: Clientes
customerCreate: Nuevo cliente customerCreate: Nuevo cliente
createCustomer: Crear cliente
createOrder: Nuevo pedido createOrder: Nuevo pedido
list: Listado list: Listado
webPayments: Pagos Web webPayments: Pagos Web
extendedList: Listado extendido extendedList: Listado extendido
notifications: Notificaciones notifications: Notificaciones
defaulter: Morosos defaulter: Morosos
createCustomer: Crear cliente
fiscalData: Datos fiscales fiscalData: Datos fiscales
billingData: Forma de pago billingData: Forma de pago
consignees: Consignatarios consignees: Consignatarios
'address-create': Nuevo consignatario address-create: Nuevo consignatario
notes: Notas notes: Notas
credits: Créditos credits: Créditos
greuges: Greuges greuges: Greuges
@ -230,10 +251,10 @@ globals:
wagonsList: Listado vagones wagonsList: Listado vagones
wagonCreate: Crear tipo wagonCreate: Crear tipo
wagonEdit: Editar tipo wagonEdit: Editar tipo
wagonCounter: Contador de carros
typesList: Listado tipos typesList: Listado tipos
typeCreate: Crear tipo typeCreate: Crear tipo
typeEdit: Editar tipo typeEdit: Editar tipo
wagonCounter: Contador de carros
roadmap: Troncales roadmap: Troncales
stops: Paradas stops: Paradas
routes: Rutas routes: Rutas
@ -242,8 +263,8 @@ globals:
routeCreate: Nueva ruta routeCreate: Nueva ruta
RouteRoadmap: Troncales RouteRoadmap: Troncales
RouteRoadmapCreate: Crear troncal RouteRoadmapCreate: Crear troncal
autonomous: Autónomos
RouteExtendedList: Enrutador RouteExtendedList: Enrutador
autonomous: Autónomos
suppliers: Proveedores suppliers: Proveedores
supplier: Proveedor supplier: Proveedor
supplierCreate: Nuevo proveedor supplierCreate: Nuevo proveedor
@ -308,23 +329,9 @@ globals:
wasteRecalc: Recalcular mermas wasteRecalc: Recalcular mermas
operator: Operario operator: Operario
parking: Parking parking: Parking
supplier: Proveedor
created: Fecha creación
worker: Trabajador
now: Ahora
name: Nombre
new: Nuevo
comment: Comentario
observations: Observaciones
goToModuleIndex: Ir al índice del módulo
unsavedPopup: unsavedPopup:
title: Los cambios que no haya guardado se perderán title: Los cambios que no haya guardado se perderán
subtitle: ¿Seguro que quiere salir sin guardar? subtitle: ¿Seguro que quiere salir sin guardar?
createInvoiceIn: Crear factura recibida
myAccount: Mi cuenta
noOne: Nadie
maxTemperature: Máx
minTemperature: Mín
params: params:
clientFk: Id cliente clientFk: Id cliente
salesPersonFk: Comercial salesPersonFk: Comercial
@ -347,12 +354,6 @@ globals:
packing: ITP packing: ITP
countryFk: País countryFk: País
companyFk: Empresa companyFk: Empresa
changePass: Cambiar contraseña
setPass: Establecer contraseña
deleteConfirmTitle: Eliminar los elementos seleccionados
changeState: Cambiar estado
raid: 'Redada {daysInForward} días'
isVies: Vies
errors: errors:
statusUnauthorized: Acceso denegado statusUnauthorized: Acceso denegado
statusInternalServerError: Ha ocurrido un error interno del servidor statusInternalServerError: Ha ocurrido un error interno del servidor
@ -447,48 +448,30 @@ ticket:
attender: Consignatario attender: Consignatario
create: create:
address: Dirección address: Dirección
invoiceOut: order:
card: field:
issued: Fecha emisión salesPersonFk: Comercial
customerCard: Ficha del cliente form:
ticketList: Listado de tickets clientFk: Cliente
addressFk: Dirección
agencyModeFk: Agencia
list:
newOrder: Nuevo Pedido
summary: summary:
issued: Fecha basket: Cesta
dued: Fecha límite notConfirmed: No confirmada
booked: Contabilizada created: Creado
taxBreakdown: Desglose impositivo createdFrom: Creado desde
taxableBase: Base imp. address: Dirección
rate: Tarifa total: Total
fee: Cuota vat: IVA
tickets: Tickets state: Estado
totalWithVat: Importe alias: Alias
globalInvoices: items: Artículos
errors: orderTicketList: Tickets del pedido
chooseValidClient: Selecciona un cliente válido amount: Monto
chooseValidCompany: Selecciona una empresa válida confirm: Confirmar
chooseValidPrinter: Selecciona una impresora válida confirmLines: Confirmar lineas
chooseValidSerialType: Selecciona una tipo de serie válida
fillDates: La fecha de la factura y la fecha máxima deben estar completas
invoiceDateLessThanMaxDate: La fecha de la factura no puede ser menor que la fecha máxima
invoiceWithFutureDate: Existe una factura con una fecha futura
noTicketsToInvoice: No existen tickets para facturar
criticalInvoiceError: Error crítico en la facturación proceso detenido
invalidSerialTypeForAll: El tipo de serie debe ser global cuando se facturan todos los clientes
table:
addressId: Id dirección
streetAddress: Dirección fiscal
statusCard:
percentageText: '{getPercentage}% {getAddressNumber} de {getNAddresses}'
pdfsNumberText: '{nPdfs} de {totalPdfs} PDFs'
negativeBases:
clientId: Id cliente
base: Base
active: Activo
hasToInvoice: Facturar
verifiedData: Datos comprobados
comercial: Comercial
errors:
downloadCsvFailed: Error al descargar CSV
shelving: shelving:
list: list:
parking: Parking parking: Parking

View File

@ -1,19 +1,11 @@
<script setup> <script setup>
import InvoiceOutDescriptor from './InvoiceOutDescriptor.vue'; import InvoiceOutDescriptor from './InvoiceOutDescriptor.vue';
import VnCard from 'components/common/VnCard.vue'; import VnCardBeta from 'components/common/VnCardBeta.vue';
import InvoiceOutFilter from '../InvoiceOutFilter.vue';
</script> </script>
<template> <template>
<VnCard <VnCardBeta
data-key="InvoiceOut" data-key="InvoiceOut"
base-url="InvoiceOuts" base-url="InvoiceOuts"
:descriptor="InvoiceOutDescriptor" :descriptor="InvoiceOutDescriptor"
:filter-panel="InvoiceOutFilter"
search-data-key="InvoiceOutList"
:searchbar-props="{
url: 'InvoiceOuts/filter',
label: 'Search invoice',
info: 'You can search by invoice reference',
}"
/> />
</template> </template>

View File

@ -3,7 +3,6 @@ import { ref, computed, watchEffect } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import VnSelect from 'src/components/common/VnSelect.vue'; import VnSelect from 'src/components/common/VnSelect.vue';
import VnInputDate from 'src/components/common/VnInputDate.vue'; import VnInputDate from 'src/components/common/VnInputDate.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import { usePrintService } from 'src/composables/usePrintService'; import { usePrintService } from 'src/composables/usePrintService';
@ -12,12 +11,12 @@ import InvoiceOutSummary from './Card/InvoiceOutSummary.vue';
import { toCurrency, toDate } from 'src/filters/index'; import { toCurrency, toDate } from 'src/filters/index';
import { QBtn } from 'quasar'; import { QBtn } from 'quasar';
import axios from 'axios'; import axios from 'axios';
import RightMenu from 'src/components/common/RightMenu.vue';
import InvoiceOutFilter from './InvoiceOutFilter.vue'; import InvoiceOutFilter from './InvoiceOutFilter.vue';
import VnRow from 'src/components/ui/VnRow.vue'; import VnRow from 'src/components/ui/VnRow.vue';
import VnRadio from 'src/components/common/VnRadio.vue'; import VnRadio from 'src/components/common/VnRadio.vue';
import VnInput from 'src/components/common/VnInput.vue'; import VnInput from 'src/components/common/VnInput.vue';
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue'; import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
import VnSection from 'src/components/common/VnSection.vue';
const { t } = useI18n(); const { t } = useI18n();
const { viewSummary } = useSummaryDialog(); const { viewSummary } = useSummaryDialog();
@ -30,6 +29,8 @@ const MODEL = 'InvoiceOuts';
const { openReport } = usePrintService(); const { openReport } = usePrintService();
const addressOptions = ref([]); const addressOptions = ref([]);
const selectedOption = ref('ticket'); const selectedOption = ref('ticket');
const dataKey = 'InvoiceOutList';
async function fetchClientAddress(id) { async function fetchClientAddress(id) {
const { data } = await axios.get( const { data } = await axios.get(
`Clients/${id}/addresses?filter[order]=isActive DESC` `Clients/${id}/addresses?filter[order]=isActive DESC`
@ -180,223 +181,239 @@ watchEffect(selectedRows);
</script> </script>
<template> <template>
<VnSearchbar <VnSection
:info="t('youCanSearchByInvoiceReference')" :data-key="dataKey"
:label="t('Search invoice')"
data-key="invoiceOutList"
/>
<RightMenu>
<template #right-panel>
<InvoiceOutFilter data-key="invoiceOutList" />
</template>
</RightMenu>
<VnSubToolbar>
<template #st-actions>
<QBtn
color="primary"
icon-right="cloud_download"
@click="downloadPdf()"
:disable="!hasSelectedCards"
data-cy="InvoiceOutDownloadPdfBtn"
>
<QTooltip>{{ t('downloadPdf') }}</QTooltip>
</QBtn>
</template>
</VnSubToolbar>
<VnTable
ref="tableRef"
data-key="invoiceOutList"
:url="`${MODEL}/filter`"
:create="{
urlCreate: 'InvoiceOuts/createManualInvoice',
title: t('createManualInvoice'),
onDataSaved: ({ id }) => tableRef.redirect(id),
formInitialData: { active: true },
}"
:right-search="false"
v-model:selected="selectedRows"
order="id DESC"
:columns="columns" :columns="columns"
redirect="invoice-out" prefix="invoiceOut"
:table="{ :array-data-props="{
'row-key': 'id', url: 'InvoiceOuts/filter',
selection: 'multiple', order: ['id DESC'],
}" }"
> >
<template #column-clientFk="{ row }"> <template #rightMenu>
<span class="link" @click.stop> <InvoiceOutFilter data-key="InvoiceOutList" />
{{ row.clientSocialName }}
<CustomerDescriptorProxy :id="row.clientFk" />
</span>
</template> </template>
<template #more-create-dialog="{ data }"> <template #body>
<div class="row q-col-gutter-xs"> <VnSubToolbar>
<div class="col-12"> <template #st-actions>
<div class="q-col-gutter-xs"> <QBtn
<VnRow fixed> color="primary"
<VnRadio icon-right="cloud_download"
v-model="selectedOption" @click="downloadPdf()"
val="ticket" :disable="!hasSelectedCards"
:label="t('globals.ticket')" data-cy="InvoiceOutDownloadPdfBtn"
class="q-my-none q-mr-md" >
/> <QTooltip>{{ t('globals.downloadPdf') }}</QTooltip>
</QBtn>
</template>
</VnSubToolbar>
<VnTable
ref="tableRef"
:data-key="dataKey"
:create="{
urlCreate: 'InvoiceOuts/createManualInvoice',
title: t('createManualInvoice'),
onDataSaved: ({ id }) => tableRef.redirect(id),
formInitialData: { active: true },
}"
:right-search="false"
v-model:selected="selectedRows"
:columns="columns"
redirect="invoice-out"
:table="{
'row-key': 'id',
selection: 'multiple',
}"
>
<template #column-clientFk="{ row }">
<span class="link" @click.stop>
{{ row.clientSocialName }}
<CustomerDescriptorProxy :id="row.clientFk" />
</span>
</template>
<template #more-create-dialog="{ data }">
<div class="row q-col-gutter-xs">
<div class="col-12">
<div class="q-col-gutter-xs">
<VnRow fixed>
<VnRadio
v-model="selectedOption"
val="ticket"
:label="t('globals.ticket')"
class="q-my-none q-mr-md"
/>
<VnInput <VnInput
v-show="selectedOption === 'ticket'" v-show="selectedOption === 'ticket'"
v-model="data.ticketFk" v-model="data.ticketFk"
:label="t('globals.ticket')" :label="t('globals.ticket')"
style="flex: 1" style="flex: 1"
data-cy="InvoiceOutCreateTicketinput" data-cy="InvoiceOutCreateTicketinput"
/> />
<div <div
class="row q-col-gutter-xs q-ml-none" class="row q-col-gutter-xs q-ml-none"
v-show="selectedOption !== 'ticket'" v-show="selectedOption !== 'ticket'"
> >
<div class="col"> <div class="col">
<VnSelect <VnSelect
v-model="data.clientFk" v-model="data.clientFk"
:label="t('globals.client')"
url="Clients"
:options="customerOptions"
option-label="name"
option-value="id"
@update:model-value="fetchClientAddress"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>
#{{ scope.opt?.id }} -
{{ scope.opt?.name }}
</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
</div>
<div class="col">
<VnSelect
v-model="data.addressFk"
:label="t('ticket.summary.consignee')"
:options="addressOptions"
option-label="nickname"
option-value="id"
v-if="
data.clientFk &&
selectedOption === 'consignatario'
"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel
:class="{
'color-vn-label':
!scope.opt
?.isActive,
}"
>
{{
`${
!scope.opt
?.isActive
? t(
'inactive'
)
: ''
} `
}}
<span>{{
scope.opt?.nickname
}}</span>
<span
v-if="
scope.opt
?.province ||
scope.opt?.city ||
scope.opt?.street
"
>
,
{{
scope.opt?.street
}},
{{ scope.opt?.city }},
{{
scope.opt
?.province
?.name
}}
-
{{
scope.opt
?.agencyMode
?.name
}}
</span>
</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
</div>
</div>
</VnRow>
<VnRow fixed>
<VnRadio
v-model="selectedOption"
val="cliente"
:label="t('globals.client')" :label="t('globals.client')"
url="Clients" class="q-my-none q-mr-md"
:options="customerOptions" />
option-label="name" </VnRow>
option-value="id" <VnRow fixed>
@update:model-value="fetchClientAddress" <VnRadio
> v-model="selectedOption"
<template #option="scope"> val="consignatario"
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>
#{{ scope.opt?.id }} -
{{ scope.opt?.name }}
</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
</div>
<div class="col">
<VnSelect
v-model="data.addressFk"
:label="t('ticket.summary.consignee')" :label="t('ticket.summary.consignee')"
:options="addressOptions" class="q-my-none q-mr-md"
option-label="nickname" />
option-value="id" </VnRow>
v-if="
data.clientFk &&
selectedOption === 'consignatario'
"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel
:class="{
'color-vn-label':
!scope.opt?.isActive,
}"
>
{{
`${
!scope.opt?.isActive
? t('inactive')
: ''
} `
}}
<span>{{
scope.opt?.nickname
}}</span>
<span
v-if="
scope.opt?.province ||
scope.opt?.city ||
scope.opt?.street
"
>
, {{ scope.opt?.street }},
{{ scope.opt?.city }},
{{
scope.opt?.province?.name
}}
-
{{
scope.opt?.agencyMode
?.name
}}
</span>
</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
</div>
</div> </div>
</VnRow> </div>
<VnRow fixed> <div class="full-width">
<VnRadio <VnRow class="row q-col-gutter-xs">
v-model="selectedOption" <VnSelect
val="cliente" url="InvoiceOutSerials"
:label="t('globals.client')" v-model="data.serial"
class="q-my-none q-mr-md" :label="t('invoicein.serial')"
/> :options="invoiceOutSerialsOptions"
</VnRow> option-label="description"
<VnRow fixed> option-value="code"
<VnRadio option-filter
v-model="selectedOption" :expr-builder="exprBuilder"
val="consignatario" data-cy="InvoiceOutCreateSerialSelect"
:label="t('ticket.summary.consignee')" >
class="q-my-none q-mr-md" <template #option="scope">
/> <QItem v-bind="scope.itemProps">
</VnRow> <QItemSection>
<QItemLabel>
{{ scope.opt?.code }} -
{{ scope.opt?.description }}
</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
<VnInputDate
:label="t('invoiceOut.summary.dued')"
v-model="data.maxShipped"
/>
</VnRow>
<VnRow class="row q-col-gutter-xs">
<VnSelect
url="TaxAreas"
v-model="data.taxArea"
:label="
t('invoiceOutList.tableVisibleColumns.taxArea')
"
:options="taxAreasOptions"
option-label="code"
option-value="code"
/>
<VnInput
v-model="data.reference"
:label="t('globals.reference')"
/>
</VnRow>
</div>
</div> </div>
</div> </template>
<div class="full-width"> </VnTable>
<VnRow class="row q-col-gutter-xs">
<VnSelect
url="InvoiceOutSerials"
v-model="data.serial"
:label="t('invoicein.serial')"
:options="invoiceOutSerialsOptions"
option-label="description"
option-value="code"
option-filter
:expr-builder="exprBuilder"
data-cy="InvoiceOutCreateSerialSelect"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>
{{ scope.opt?.code }} -
{{ scope.opt?.description }}
</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
<VnInputDate
:label="t('invoiceOut.summary.dued')"
v-model="data.maxShipped"
/>
</VnRow>
<VnRow class="row q-col-gutter-xs">
<VnSelect
url="TaxAreas"
v-model="data.taxArea"
:label="t('invoiceOutList.tableVisibleColumns.taxArea')"
:options="taxAreasOptions"
option-label="code"
option-value="code"
/>
<VnInput
v-model="data.reference"
:label="t('globals.reference')"
/>
</VnRow>
</div>
</div>
</template> </template>
</VnTable> </VnSection>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -39,7 +39,7 @@ const columns = computed(() => [
{ {
align: 'left', align: 'left',
name: 'country', name: 'country',
label: t('negativeBases.country'), label: t('invoiceOut.negativeBases.country'),
component: 'select', component: 'select',
attrs: { attrs: {
url: 'Countries', url: 'Countries',
@ -53,7 +53,7 @@ const columns = computed(() => [
{ {
align: 'left', align: 'left',
name: 'clientId', name: 'clientId',
label: t('negativeBases.clientId'), label: t('invoiceOut.negativeBases.clientId'),
cardVisible: true, cardVisible: true,
}, },
{ {
@ -85,28 +85,28 @@ const columns = computed(() => [
{ {
align: 'left', align: 'left',
name: 'taxableBase', name: 'taxableBase',
label: t('negativeBases.base'), label: t('invoiceOut.negativeBases.base'),
}, },
{ {
align: 'left', align: 'left',
name: 'ticketFk', name: 'ticketFk',
label: t('negativeBases.ticketId'), label: t('invoiceOut.negativeBases.ticketId'),
cardVisible: true, cardVisible: true,
}, },
{ {
align: 'left', align: 'left',
name: 'isActive', name: 'isActive',
label: t('negativeBases.active'), label: t('invoiceOut.negativeBases.active'),
}, },
{ {
align: 'left', align: 'left',
name: 'hasToInvoice', name: 'hasToInvoice',
label: t('negativeBases.hasToInvoice'), label: t('invoiceOut.negativeBases.hasToInvoice'),
}, },
{ {
align: 'left', align: 'left',
name: 'hasVerifiedData', name: 'hasVerifiedData',
label: t('negativeBases.verifiedData'), label: t('invoiceOut.negativeBases.verifiedData'),
}, },
{ {
align: 'left', align: 'left',

View File

@ -105,28 +105,3 @@ const props = defineProps({
</template> </template>
</VnFilterPanel> </VnFilterPanel>
</template> </template>
<i18n>
en:
params:
from: From
to: To
company: Company
country: Country
clientId: Client Id
clientSocialName: Client
amount: Amount
comercialName: Comercial
es:
params:
from: Desde
to: Hasta
company: Empresa
country: País
clientId: Id cliente
clientSocialName: Cliente
amount: Importe
comercialName: Comercial
Date is required: La fecha es requerida
</i18n>

View File

@ -1,3 +1,60 @@
invoiceOut:
search: Search invoice
searchInfo: You can search by invoice reference
params:
company: Company
country: Country
clientId: Client ID
clientSocialName: Client
taxableBase: Base
ticketFk: Ticket
isActive: Active
hasToInvoice: Has to invoice
hasVerifiedData: Verified data
workerName: Worker
card:
issued: Issued
customerCard: Customer card
ticketList: Ticket List
summary:
issued: Issued
dued: Due
booked: Booked
taxBreakdown: Tax breakdown
taxableBase: Taxable base
rate: Rate
fee: Fee
tickets: Tickets
totalWithVat: Amount
globalInvoices:
errors:
chooseValidClient: Choose a valid client
chooseValidCompany: Choose a valid company
chooseValidPrinter: Choose a valid printer
chooseValidSerialType: Choose a serial type
fillDates: Invoice date and the max date should be filled
invoiceDateLessThanMaxDate: Invoice date can not be less than max date
invoiceWithFutureDate: Exists an invoice with a future date
noTicketsToInvoice: There are not tickets to invoice
criticalInvoiceError: 'Critical invoicing error, process stopped'
invalidSerialTypeForAll: The serial type must be global when invoicing all clients
table:
addressId: Address id
streetAddress: Street
statusCard:
percentageText: '{getPercentage}% {getAddressNumber} of {getNAddresses}'
pdfsNumberText: '{nPdfs} of {totalPdfs} PDFs'
negativeBases:
country: Country
clientId: Client Id
base: Base
ticketId: Ticket
active: Active
hasToInvoice: Has to Invoice
verifiedData: Verified Data
comercial: Commercial
errors:
downloadCsvFailed: CSV download failed
invoiceOutModule: invoiceOutModule:
customer: Client customer: Client
amount: Amount amount: Amount
@ -13,27 +70,4 @@ invoiceOutList:
invoiceOutSerial: Serial invoiceOutSerial: Serial
ticket: Ticket ticket: Ticket
taxArea: Tax area taxArea: Tax area
customsAgent: Custom Agent customsAgent: Custom Agent
DownloadPdf: Download PDF
InvoiceOutSummary: Summary
negativeBases:
country: Country
clientId: Client ID
base: Base
ticketId: Ticket
active: Active
hasToInvoice: Has to invoice
verifiedData: Verified data
commercial: Commercial
invoiceout:
params:
company: Company
country: Country
clientId: Client ID
clientSocialName: Client
taxableBase: Base
ticketFk: Ticket
isActive: Active
hasToInvoice: Has to invoice
hasVerifiedData: Verified data
workerName: Worker

View File

@ -1,5 +1,60 @@
Search invoice: Buscar factura emitida invoiceOut:
You can search by invoice reference: Puedes buscar por referencia de la factura search: Buscar factura emitida
searchInfo: Puedes buscar por referencia de la factura
params:
company: Empresa
country: País
clientId: ID del cliente
clientSocialName: Cliente
taxableBase: Base
ticketFk: Ticket
isActive: Activo
hasToInvoice: Debe facturar
hasVerifiedData: Datos verificados
workerName: Comercial
card:
issued: Fecha emisión
customerCard: Ficha del cliente
ticketList: Listado de tickets
summary:
issued: Fecha
dued: Fecha límite
booked: Contabilizada
taxBreakdown: Desglose impositivo
taxableBase: Base imp.
rate: Tarifa
fee: Cuota
tickets: Tickets
totalWithVat: Importe
globalInvoices:
errors:
chooseValidClient: Selecciona un cliente válido
chooseValidCompany: Selecciona una empresa válida
chooseValidPrinter: Selecciona una impresora válida
chooseValidSerialType: Selecciona una tipo de serie válida
fillDates: La fecha de la factura y la fecha máxima deben estar completas
invoiceDateLessThanMaxDate: La fecha de la factura no puede ser menor que la fecha máxima
invoiceWithFutureDate: Existe una factura con una fecha futura
noTicketsToInvoice: No existen tickets para facturar
criticalInvoiceError: Error crítico en la facturación proceso detenido
invalidSerialTypeForAll: El tipo de serie debe ser global cuando se facturan todos los clientes
table:
addressId: Id dirección
streetAddress: Dirección fiscal
statusCard:
percentageText: '{getPercentage}% {getAddressNumber} de {getNAddresses}'
pdfsNumberText: '{nPdfs} de {totalPdfs} PDFs'
negativeBases:
country: País
clientId: Id cliente
base: Base
ticketId: Ticket
active: Activo
hasToInvoice: Facturar
verifiedData: Datos comprobados
comercial: Comercial
errors:
downloadCsvFailed: Error al descargar CSV
invoiceOutModule: invoiceOutModule:
customer: Cliente customer: Cliente
amount: Importe amount: Importe
@ -15,28 +70,4 @@ invoiceOutList:
invoiceOutSerial: Serial invoiceOutSerial: Serial
ticket: Ticket ticket: Ticket
taxArea: Area taxArea: Area
customsAgent: Agente de aduanas customsAgent: Agente de aduanas
DownloadPdf: Descargar PDF
InvoiceOutSummary: Resumen
negativeBases:
country: País
clientId: ID del cliente
client: Cliente
base: Base
ticketId: Ticket
active: Activo
hasToInvoice: Debe facturar
verifiedData: Datos verificados
commercial: Comercial
invoiceout:
params:
company: Empresa
country: País
clientId: ID del cliente
clientSocialName: Cliente
taxableBase: Base
ticketFk: Ticket
isActive: Activo
hasToInvoice: Debe facturar
hasVerifiedData: Datos verificados
workerName: Comercial

View File

@ -136,7 +136,7 @@ const columns = computed(() => [
name: 'tableActions', name: 'tableActions',
actions: [ actions: [
{ {
title: t('InvoiceOutSummary'), title: t('globals.pageTitles.summary'),
icon: 'preview', icon: 'preview',
action: (row) => viewSummary(row.id, OrderSummary), action: (row) => viewSummary(row.id, OrderSummary),
isPrimary: true, isPrimary: true,

View File

@ -1,34 +1,60 @@
import { RouterView } from 'vue-router'; import { RouterView } from 'vue-router';
const invoiceOutCard = {
name: 'InvoiceOutCard',
path: ':id',
component: () => import('src/pages/InvoiceOut/Card/InvoiceOutCard.vue'),
redirect: { name: 'InvoiceOutSummary' },
meta: {
menu: [],
},
children: [
{
path: 'summary',
name: 'InvoiceOutSummary',
meta: {
title: 'summary',
icon: 'launch',
},
component: () => import('src/pages/InvoiceOut/Card/InvoiceOutSummary.vue'),
}
],
};
export default { export default {
path: '/invoice-out',
name: 'InvoiceOut', name: 'InvoiceOut',
path: '/invoice-out',
meta: { meta: {
title: 'invoiceOuts', title: 'invoiceOuts',
icon: 'vn:invoice-out', icon: 'vn:invoice-out',
moduleName: 'InvoiceOut', moduleName: 'InvoiceOut',
menu: ['InvoiceOutList', 'InvoiceOutGlobal', 'InvoiceOutNegativeBases'],
}, },
component: RouterView, component: RouterView,
redirect: { name: 'InvoiceOutMain' }, redirect: { name: 'InvoiceOutMain' },
menus: {
main: ['InvoiceOutList', 'InvoiceOutGlobal', 'InvoiceOutNegativeBases'],
card: [],
},
children: [ children: [
{ {
path: '',
name: 'InvoiceOutMain', name: 'InvoiceOutMain',
path: '',
component: () => import('src/components/common/VnModule.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'InvoiceOutList' }, redirect: { name: 'InvoiceOutIndexMain' },
children: [ children: [
{ {
path: 'list', path: '',
name: 'InvoiceOutList', name: 'InvoiceOutIndexMain',
meta: { redirect: { name: 'InvoiceOutList' },
title: 'list',
icon: 'view_list',
},
component: () => import('src/pages/InvoiceOut/InvoiceOutList.vue'), component: () => import('src/pages/InvoiceOut/InvoiceOutList.vue'),
children: [
{
name: 'InvoiceOutList',
path: 'list',
meta: {
title: 'list',
icon: 'view_list',
},
},
invoiceOutCard,
],
}, },
{ {
path: 'global-invoicing', path: 'global-invoicing',
@ -51,22 +77,5 @@ export default {
}, },
], ],
}, },
{
name: 'InvoiceOutCard',
path: ':id',
component: () => import('src/pages/InvoiceOut/Card/InvoiceOutCard.vue'),
redirect: { name: 'InvoiceOutSummary' },
children: [
{
name: 'InvoiceOutSummary',
path: 'summary',
meta: {
title: 'summary',
},
component: () =>
import('src/pages/InvoiceOut/Card/InvoiceOutSummary.vue'),
},
],
},
], ],
}; };