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 InvoiceInDescriptorMenu from './InvoiceInDescriptorMenu.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 { t } = useI18n();
|
||||
|
@ -165,7 +166,7 @@ const intrastatColumns = ref([
|
|||
const vehicleColumns = ref([
|
||||
{
|
||||
name: 'numberPlate',
|
||||
label: 'invoiceIn.summary.vehicle',
|
||||
label: 'globals.vehicle',
|
||||
field: (row) => row.vehicleInvoiceIn?.numberPlate,
|
||||
format: (value) => value,
|
||||
align: 'left',
|
||||
|
@ -203,8 +204,6 @@ const getTotalTax = (tax) =>
|
|||
tax.reduce((acc, cur) => acc + taxRate(cur.taxableBase, cur.taxTypeSage?.rate), 0);
|
||||
|
||||
const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
||||
const getVehicleTotalAmount = (vehicles) =>
|
||||
vehicles.reduce((acc, cur) => acc + cur.amount, 0);
|
||||
</script>
|
||||
<template>
|
||||
<CardSummary
|
||||
|
@ -302,7 +301,7 @@ const getVehicleTotalAmount = (vehicles) =>
|
|||
:value="entity.expenseDeductible?.name"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.card.company')"
|
||||
:label="t('globals.company')"
|
||||
:value="entity.company?.code"
|
||||
/>
|
||||
<VnLv
|
||||
|
@ -339,10 +338,10 @@ const getVehicleTotalAmount = (vehicles) =>
|
|||
</div>
|
||||
</QCard>
|
||||
<!--Vat-->
|
||||
<QCard v-if="entity.invoiceInTax.length" class="vat">
|
||||
<QCard v-if="entity.invoiceInTax.length" class="col-65">
|
||||
<VnTitle
|
||||
:url="getLink('vat')"
|
||||
:text="t('invoiceIn.card.vat')"
|
||||
:text="t('globals.pageTitles.vat')"
|
||||
data-cy="vatTitleLink"
|
||||
/>
|
||||
<QTable
|
||||
|
@ -395,15 +394,16 @@ const getVehicleTotalAmount = (vehicles) =>
|
|||
currency,
|
||||
)
|
||||
}}</QTd>
|
||||
<QTd></QTd>
|
||||
</QTr>
|
||||
</template>
|
||||
</QTable>
|
||||
</QCard>
|
||||
<!--Due Day-->
|
||||
<QCard v-if="entity.invoiceInDueDay.length" class="due-day">
|
||||
<QCard v-if="entity.invoiceInDueDay.length" class="col-30">
|
||||
<VnTitle
|
||||
:url="getLink('due-day')"
|
||||
:text="t('invoiceIn.card.dueDay')"
|
||||
:text="t('globals.pageTitles.dueDay')"
|
||||
data-cy="dueDayTitleLink"
|
||||
/>
|
||||
<QTable :columns="dueDayColumns" :rows="entity.invoiceInDueDay" flat>
|
||||
|
@ -440,10 +440,10 @@ const getVehicleTotalAmount = (vehicles) =>
|
|||
</QTable>
|
||||
</QCard>
|
||||
<!--Intrastat-->
|
||||
<QCard v-if="entity.invoiceInIntrastat.length" class="vat">
|
||||
<QCard v-if="entity.invoiceInIntrastat.length" class="col-65">
|
||||
<VnTitle
|
||||
:url="getLink('intrastat')"
|
||||
:text="t('invoiceIn.card.intrastat')"
|
||||
:text="t('globals.pageTitles.intrastat')"
|
||||
data-cy="intrastatTitleLink"
|
||||
/>
|
||||
<QTable
|
||||
|
@ -479,10 +479,10 @@ const getVehicleTotalAmount = (vehicles) =>
|
|||
</QTable>
|
||||
</QCard>
|
||||
<!-- Vehicle -->
|
||||
<QCard v-if="entity?.vehicleInvoiceIn?.length" class="due-day">
|
||||
<QCard v-if="entity?.vehicleInvoiceIn?.length" class="col-30">
|
||||
<VnTitle
|
||||
:url="getLink('vehicle')"
|
||||
:text="t('invoiceIn.summary.vehicle')"
|
||||
:text="t('globals.vehicle')"
|
||||
data-cy="vehicleTitleLink"
|
||||
/>
|
||||
<QTable :columns="vehicleColumns" :rows="entity.vehicleInvoiceIn" flat>
|
||||
|
@ -517,7 +517,7 @@ const getVehicleTotalAmount = (vehicles) =>
|
|||
<QTd>
|
||||
{{
|
||||
toCurrency(
|
||||
getVehicleTotalAmount(entity.vehicleInvoiceIn),
|
||||
getTotal(entity.vehicleInvoiceIn, 'amount'),
|
||||
)
|
||||
}}
|
||||
</QTd>
|
||||
|
@ -538,15 +538,15 @@ const getVehicleTotalAmount = (vehicles) =>
|
|||
|
||||
@media (min-width: $breakpoint-md) {
|
||||
.summaryBody {
|
||||
.vat {
|
||||
.col-65 {
|
||||
flex: 65%;
|
||||
}
|
||||
|
||||
.due-day {
|
||||
.col-30 {
|
||||
flex: 30%;
|
||||
}
|
||||
.vat,
|
||||
.due-day {
|
||||
.col-65,
|
||||
.col-30 {
|
||||
.q-table th {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'vehicleFk',
|
||||
label: t('invoiceIn.summary.vehicle'),
|
||||
label: t('globals.vehicle'),
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'vehicles',
|
||||
|
|
|
@ -34,14 +34,6 @@ invoiceIn:
|
|||
originalInvoice: Original invoice
|
||||
entry: Entry
|
||||
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:
|
||||
currency: Currency
|
||||
issued: Expedition date
|
||||
|
@ -63,11 +55,7 @@ invoiceIn:
|
|||
net: Net
|
||||
stems: Stems
|
||||
country: Country
|
||||
vehicle: Vehicle
|
||||
params:
|
||||
invoiceInFk: Invoice nº
|
||||
vehicleFk: Vehicle
|
||||
amount: Amount
|
||||
search: Id or supplier name
|
||||
correctedFk: Corrected
|
||||
isBooked: Is booked
|
||||
|
|
|
@ -33,13 +33,6 @@ invoiceIn:
|
|||
originalInvoice: Factura origen
|
||||
entry: Entrada
|
||||
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:
|
||||
currency: Divisa
|
||||
docNumber: Número documento
|
||||
|
@ -52,7 +45,7 @@ invoiceIn:
|
|||
expense: Gasto
|
||||
taxableBase: Base imp.
|
||||
rate: Tasa
|
||||
sageTransaction: Sage transación
|
||||
sageTransaction: Sage transacción
|
||||
dueDay: Fecha
|
||||
bank: Caja
|
||||
foreignValue: Divisa
|
||||
|
@ -61,11 +54,7 @@ invoiceIn:
|
|||
net: Neto
|
||||
stems: Tallos
|
||||
country: País
|
||||
vehicle: Vehículo
|
||||
params:
|
||||
invoiceInFk: Factura nº
|
||||
vehicleFk: Vehículo
|
||||
amount: Importe
|
||||
search: Id o nombre proveedor
|
||||
correctedFk: Rectificada
|
||||
isBooked: Contabilizada
|
||||
|
|
Loading…
Reference in New Issue