refactor: refs #8930 update vehicle labels to use global translations and clean up unused keys in locale files
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
6122b64268
commit
db2a0b2685
|
@ -12,6 +12,7 @@ import InvoiceIntoBook from '../InvoiceInToBook.vue';
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
import InvoiceInDescriptorMenu from './InvoiceInDescriptorMenu.vue';
|
import InvoiceInDescriptorMenu from './InvoiceInDescriptorMenu.vue';
|
||||||
import VehicleDescriptorProxy from 'src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue';
|
import VehicleDescriptorProxy from 'src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue';
|
||||||
|
import { getTotal } from 'src/composables/getTotal';
|
||||||
|
|
||||||
const props = defineProps({ id: { type: [Number, String], default: 0 } });
|
const props = defineProps({ id: { type: [Number, String], default: 0 } });
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -165,7 +166,7 @@ const intrastatColumns = ref([
|
||||||
const vehicleColumns = ref([
|
const vehicleColumns = ref([
|
||||||
{
|
{
|
||||||
name: 'numberPlate',
|
name: 'numberPlate',
|
||||||
label: 'invoiceIn.summary.vehicle',
|
label: 'globals.vehicle',
|
||||||
field: (row) => row.vehicleInvoiceIn?.numberPlate,
|
field: (row) => row.vehicleInvoiceIn?.numberPlate,
|
||||||
format: (value) => value,
|
format: (value) => value,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -203,8 +204,6 @@ const getTotalTax = (tax) =>
|
||||||
tax.reduce((acc, cur) => acc + taxRate(cur.taxableBase, cur.taxTypeSage?.rate), 0);
|
tax.reduce((acc, cur) => acc + taxRate(cur.taxableBase, cur.taxTypeSage?.rate), 0);
|
||||||
|
|
||||||
const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
||||||
const getVehicleTotalAmount = (vehicles) =>
|
|
||||||
vehicles.reduce((acc, cur) => acc + cur.amount, 0);
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<CardSummary
|
<CardSummary
|
||||||
|
@ -302,7 +301,7 @@ const getVehicleTotalAmount = (vehicles) =>
|
||||||
:value="entity.expenseDeductible?.name"
|
:value="entity.expenseDeductible?.name"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceIn.card.company')"
|
:label="t('globals.company')"
|
||||||
:value="entity.company?.code"
|
:value="entity.company?.code"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
|
@ -339,10 +338,10 @@ const getVehicleTotalAmount = (vehicles) =>
|
||||||
</div>
|
</div>
|
||||||
</QCard>
|
</QCard>
|
||||||
<!--Vat-->
|
<!--Vat-->
|
||||||
<QCard v-if="entity.invoiceInTax.length" class="vat">
|
<QCard v-if="entity.invoiceInTax.length" class="col-65">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="getLink('vat')"
|
:url="getLink('vat')"
|
||||||
:text="t('invoiceIn.card.vat')"
|
:text="t('globals.pageTitles.vat')"
|
||||||
data-cy="vatTitleLink"
|
data-cy="vatTitleLink"
|
||||||
/>
|
/>
|
||||||
<QTable
|
<QTable
|
||||||
|
@ -395,15 +394,16 @@ const getVehicleTotalAmount = (vehicles) =>
|
||||||
currency,
|
currency,
|
||||||
)
|
)
|
||||||
}}</QTd>
|
}}</QTd>
|
||||||
|
<QTd></QTd>
|
||||||
</QTr>
|
</QTr>
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
</QCard>
|
</QCard>
|
||||||
<!--Due Day-->
|
<!--Due Day-->
|
||||||
<QCard v-if="entity.invoiceInDueDay.length" class="due-day">
|
<QCard v-if="entity.invoiceInDueDay.length" class="col-30">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="getLink('due-day')"
|
:url="getLink('due-day')"
|
||||||
:text="t('invoiceIn.card.dueDay')"
|
:text="t('globals.pageTitles.dueDay')"
|
||||||
data-cy="dueDayTitleLink"
|
data-cy="dueDayTitleLink"
|
||||||
/>
|
/>
|
||||||
<QTable :columns="dueDayColumns" :rows="entity.invoiceInDueDay" flat>
|
<QTable :columns="dueDayColumns" :rows="entity.invoiceInDueDay" flat>
|
||||||
|
@ -440,10 +440,10 @@ const getVehicleTotalAmount = (vehicles) =>
|
||||||
</QTable>
|
</QTable>
|
||||||
</QCard>
|
</QCard>
|
||||||
<!--Intrastat-->
|
<!--Intrastat-->
|
||||||
<QCard v-if="entity.invoiceInIntrastat.length" class="vat">
|
<QCard v-if="entity.invoiceInIntrastat.length" class="col-65">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="getLink('intrastat')"
|
:url="getLink('intrastat')"
|
||||||
:text="t('invoiceIn.card.intrastat')"
|
:text="t('globals.pageTitles.intrastat')"
|
||||||
data-cy="intrastatTitleLink"
|
data-cy="intrastatTitleLink"
|
||||||
/>
|
/>
|
||||||
<QTable
|
<QTable
|
||||||
|
@ -479,10 +479,10 @@ const getVehicleTotalAmount = (vehicles) =>
|
||||||
</QTable>
|
</QTable>
|
||||||
</QCard>
|
</QCard>
|
||||||
<!-- Vehicle -->
|
<!-- Vehicle -->
|
||||||
<QCard v-if="entity?.vehicleInvoiceIn?.length" class="due-day">
|
<QCard v-if="entity?.vehicleInvoiceIn?.length" class="col-30">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="getLink('vehicle')"
|
:url="getLink('vehicle')"
|
||||||
:text="t('invoiceIn.summary.vehicle')"
|
:text="t('globals.vehicle')"
|
||||||
data-cy="vehicleTitleLink"
|
data-cy="vehicleTitleLink"
|
||||||
/>
|
/>
|
||||||
<QTable :columns="vehicleColumns" :rows="entity.vehicleInvoiceIn" flat>
|
<QTable :columns="vehicleColumns" :rows="entity.vehicleInvoiceIn" flat>
|
||||||
|
@ -517,7 +517,7 @@ const getVehicleTotalAmount = (vehicles) =>
|
||||||
<QTd>
|
<QTd>
|
||||||
{{
|
{{
|
||||||
toCurrency(
|
toCurrency(
|
||||||
getVehicleTotalAmount(entity.vehicleInvoiceIn),
|
getTotal(entity.vehicleInvoiceIn, 'amount'),
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</QTd>
|
</QTd>
|
||||||
|
@ -538,15 +538,15 @@ const getVehicleTotalAmount = (vehicles) =>
|
||||||
|
|
||||||
@media (min-width: $breakpoint-md) {
|
@media (min-width: $breakpoint-md) {
|
||||||
.summaryBody {
|
.summaryBody {
|
||||||
.vat {
|
.col-65 {
|
||||||
flex: 65%;
|
flex: 65%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.due-day {
|
.col-30 {
|
||||||
flex: 30%;
|
flex: 30%;
|
||||||
}
|
}
|
||||||
.vat,
|
.col-65,
|
||||||
.due-day {
|
.col-30 {
|
||||||
.q-table th {
|
.q-table th {
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'vehicleFk',
|
name: 'vehicleFk',
|
||||||
label: t('invoiceIn.summary.vehicle'),
|
label: t('globals.vehicle'),
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'vehicles',
|
url: 'vehicles',
|
||||||
|
|
|
@ -34,14 +34,6 @@ invoiceIn:
|
||||||
originalInvoice: Original invoice
|
originalInvoice: Original invoice
|
||||||
entry: Entry
|
entry: Entry
|
||||||
emailEmpty: The email can't be empty
|
emailEmpty: The email can't be empty
|
||||||
card:
|
|
||||||
client: Client
|
|
||||||
company: Company
|
|
||||||
customerCard: Customer card
|
|
||||||
ticketList: Ticket List
|
|
||||||
vat: Vat
|
|
||||||
dueDay: Due day
|
|
||||||
intrastat: Intrastat
|
|
||||||
summary:
|
summary:
|
||||||
currency: Currency
|
currency: Currency
|
||||||
issued: Expedition date
|
issued: Expedition date
|
||||||
|
@ -63,11 +55,7 @@ invoiceIn:
|
||||||
net: Net
|
net: Net
|
||||||
stems: Stems
|
stems: Stems
|
||||||
country: Country
|
country: Country
|
||||||
vehicle: Vehicle
|
|
||||||
params:
|
params:
|
||||||
invoiceInFk: Invoice nº
|
|
||||||
vehicleFk: Vehicle
|
|
||||||
amount: Amount
|
|
||||||
search: Id or supplier name
|
search: Id or supplier name
|
||||||
correctedFk: Corrected
|
correctedFk: Corrected
|
||||||
isBooked: Is booked
|
isBooked: Is booked
|
||||||
|
|
|
@ -33,13 +33,6 @@ invoiceIn:
|
||||||
originalInvoice: Factura origen
|
originalInvoice: Factura origen
|
||||||
entry: Entrada
|
entry: Entrada
|
||||||
emailEmpty: El email no puede estar vacío
|
emailEmpty: El email no puede estar vacío
|
||||||
card:
|
|
||||||
client: Cliente
|
|
||||||
company: Empresa
|
|
||||||
customerCard: Ficha del cliente
|
|
||||||
ticketList: Listado de tickets
|
|
||||||
vat: Iva
|
|
||||||
dueDay: Fecha de vencimiento
|
|
||||||
summary:
|
summary:
|
||||||
currency: Divisa
|
currency: Divisa
|
||||||
docNumber: Número documento
|
docNumber: Número documento
|
||||||
|
@ -52,7 +45,7 @@ invoiceIn:
|
||||||
expense: Gasto
|
expense: Gasto
|
||||||
taxableBase: Base imp.
|
taxableBase: Base imp.
|
||||||
rate: Tasa
|
rate: Tasa
|
||||||
sageTransaction: Sage transación
|
sageTransaction: Sage transacción
|
||||||
dueDay: Fecha
|
dueDay: Fecha
|
||||||
bank: Caja
|
bank: Caja
|
||||||
foreignValue: Divisa
|
foreignValue: Divisa
|
||||||
|
@ -61,11 +54,7 @@ invoiceIn:
|
||||||
net: Neto
|
net: Neto
|
||||||
stems: Tallos
|
stems: Tallos
|
||||||
country: País
|
country: País
|
||||||
vehicle: Vehículo
|
|
||||||
params:
|
params:
|
||||||
invoiceInFk: Factura nº
|
|
||||||
vehicleFk: Vehículo
|
|
||||||
amount: Importe
|
|
||||||
search: Id o nombre proveedor
|
search: Id o nombre proveedor
|
||||||
correctedFk: Rectificada
|
correctedFk: Rectificada
|
||||||
isBooked: Contabilizada
|
isBooked: Contabilizada
|
||||||
|
|
Loading…
Reference in New Issue