diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue
index 3649ba8f5..920836a93 100644
--- a/src/components/ui/VnPaginate.vue
+++ b/src/components/ui/VnPaginate.vue
@@ -74,6 +74,10 @@ const props = defineProps({
type: Boolean,
default: false,
},
+ mapKey: {
+ type: String,
+ default: '',
+ },
});
const emit = defineEmits(['onFetch', 'onPaginate', 'onChange']);
@@ -96,6 +100,7 @@ const arrayData = useArrayData(props.dataKey, {
exprBuilder: props.exprBuilder,
keepOpts: props.keepOpts,
searchUrl: props.searchUrl,
+ mapKey: props.mapKey,
});
const store = arrayData.store;
diff --git a/src/composables/getExchange.js b/src/composables/getExchange.js
new file mode 100644
index 000000000..e81e9e895
--- /dev/null
+++ b/src/composables/getExchange.js
@@ -0,0 +1,16 @@
+import axios from 'axios';
+export async function getExchange(amount, currencyFk, dated, decimalPlaces = 2) {
+ try {
+ const { data } = await axios.get('ReferenceRates/findOne', {
+ params: {
+ filter: {
+ fields: ['value'],
+ where: { currencyFk, dated },
+ },
+ },
+ });
+ return (amount / data.value).toFixed(decimalPlaces);
+ } catch (e) {
+ return null;
+ }
+}
diff --git a/src/composables/getTotal.js b/src/composables/getTotal.js
index 41c4330c4..24ac3aa27 100644
--- a/src/composables/getTotal.js
+++ b/src/composables/getTotal.js
@@ -1,10 +1,10 @@
import { toCurrency } from 'src/filters';
export function getTotal(rows, key, opts = {}) {
- const { currency, cb } = opts;
+ const { currency, cb, decimalPlaces } = opts;
const total = rows.reduce((acc, row) => acc + +(cb ? cb(row) : row[key] || 0), 0);
return currency
? toCurrency(total, currency == 'default' ? undefined : currency)
- : total;
+ : parseFloat(total).toFixed(decimalPlaces ?? 2);
}
diff --git a/src/composables/useAccountShortToStandard.js b/src/composables/useAccountShortToStandard.js
new file mode 100644
index 000000000..ca221433e
--- /dev/null
+++ b/src/composables/useAccountShortToStandard.js
@@ -0,0 +1,4 @@
+export function useAccountShortToStandard(val) {
+ if (!val || !/^\d+(\.\d*)$/.test(val)) return;
+ return val?.replace('.', '0'.repeat(11 - val.length));
+}
diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js
index da62eee3e..6e685ee20 100644
--- a/src/composables/useArrayData.js
+++ b/src/composables/useArrayData.js
@@ -49,6 +49,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
'exprBuilder',
'searchUrl',
'navigate',
+ 'mapKey',
];
if (typeof userOptions === 'object') {
for (const option in userOptions) {
@@ -119,17 +120,12 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
const { limit } = filter;
store.hasMoreData = limit && response.data.length >= limit;
- if (append) {
- if (!store.data) store.data = [];
- for (const row of response.data) store.data.push(row);
- } else {
- store.data = response.data;
- if (!isDialogOpened()) updateRouter && updateStateParams();
- }
+ processData(response.data, { map: !!store.mapKey, append });
+ if (!append && !isDialogOpened()) updateRouter && updateStateParams();
store.isLoading = false;
-
canceller = null;
+
return response;
}
@@ -288,6 +284,31 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
router.replace(newUrl);
}
+ function processData(data, { map = true, append = true }) {
+ if (!append) {
+ store.data = [];
+ store.map = new Map();
+ }
+
+ if (!Array.isArray(data)) store.data = data;
+ else if (!map && append) for (const row of data) store.data.push(row);
+ else
+ for (const row of data) {
+ const key = row[store.mapKey];
+ const val = { ...row, key };
+ if (store.map.has(key)) {
+ const { position } = store.map.get(key);
+ val.position = position;
+ store.map.set(key, val);
+ store.data[position] = val;
+ } else {
+ val.position = store.map.size;
+ store.map.set(key, val);
+ store.data.push(val);
+ }
+ }
+ }
+
const totalRows = computed(() => (store.data && store.data.length) || 0);
const isLoading = computed(() => store.isLoading || false);
diff --git a/src/css/app.scss b/src/css/app.scss
index abb388be9..e87b37154 100644
--- a/src/css/app.scss
+++ b/src/css/app.scss
@@ -11,6 +11,7 @@ body.body--light {
--vn-text-color: var(--font-color);
--vn-label-color: #5f5f5f;
--vn-accent-color: #e7e3e3;
+ --vn-empty-tag: #acacac;
background-color: var(--vn-page-color);
@@ -26,6 +27,7 @@ body.body--dark {
--vn-text-color: white;
--vn-label-color: #a8a8a8;
--vn-accent-color: #424242;
+ --vn-empty-tag: #2d2d2d;
background-color: var(--vn-page-color);
}
@@ -240,7 +242,7 @@ input::-webkit-inner-spin-button {
.q-table {
th,
td {
- padding: 1px 10px 1px 10px;
+ padding: 1px 3px 1px 3px;
max-width: 130px;
div span {
overflow: hidden;
@@ -296,3 +298,20 @@ input::-webkit-inner-spin-button {
.no-visible {
visibility: hidden;
}
+.q-field__inner {
+ .q-field__control {
+ min-height: auto !important;
+ display: flex;
+ align-items: flex-end;
+ padding-bottom: 2px;
+ .q-field__native.row {
+ min-height: auto !important;
+ }
+ }
+}
+
+.q-date__header-today {
+ border-radius: 12px;
+ border: 1px solid;
+ box-shadow: 0 4px 6px #00000000;
+}
diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml
index 1162f0b07..67d7a2bee 100644
--- a/src/i18n/locale/en.yml
+++ b/src/i18n/locale/en.yml
@@ -142,7 +142,7 @@ globals:
workCenters: Work centers
modes: Modes
zones: Zones
- zonesList: Zones
+ zonesList: List
deliveryDays: Delivery days
upcomingDeliveries: Upcoming deliveries
role: Role
@@ -333,11 +333,23 @@ globals:
packing: ITP
myTeam: My team
departmentFk: Department
+ from: From
+ to: To
+ supplierFk: Supplier
+ supplierRef: Supplier ref
+ serial: Serial
+ amount: Importe
+ awbCode: AWB
+ correctedFk: Rectified
+ correctingFk: Rectificative
+ daysOnward: Days onward
countryFk: Country
+ companyFk: Company
changePass: Change password
deleteConfirmTitle: Delete selected elements
changeState: Change state
raid: 'Raid {daysInForward} days'
+ isVies: Vies
errors:
statusUnauthorized: Access denied
statusInternalServerError: An internal server error has ocurred
@@ -731,7 +743,6 @@ supplier:
sageTransactionTypeFk: Sage transaction type
supplierActivityFk: Supplier activity
isTrucker: Trucker
- isVies: Vies
billingData:
payMethodFk: Billing data
payDemFk: Payment deadline
diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 5710a324a..4fa8699c9 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -144,7 +144,7 @@ globals:
workCenters: Centros de trabajo
modes: Modos
zones: Zonas
- zonesList: Zonas
+ zonesList: Listado
deliveryDays: Días de entrega
upcomingDeliveries: Próximos repartos
role: Role
@@ -336,12 +336,22 @@ globals:
SSN: NSS
fi: NIF
myTeam: Mi equipo
+ from: Desde
+ to: Hasta
+ supplierFk: Proveedor
+ supplierRef: Ref. proveedor
+ serial: Serie
+ amount: Importe
+ awbCode: AWB
+ daysOnward: Días adelante
packing: ITP
countryFk: País
+ companyFk: Empresa
changePass: Cambiar contraseña
deleteConfirmTitle: Eliminar los elementos seleccionados
changeState: Cambiar estado
raid: 'Redada {daysInForward} días'
+ isVies: Vies
errors:
statusUnauthorized: Acceso denegado
statusInternalServerError: Ha ocurrido un error interno del servidor
@@ -726,7 +736,6 @@ supplier:
sageTransactionTypeFk: Tipo de transacción sage
supplierActivityFk: Actividad proveedor
isTrucker: Transportista
- isVies: Vies
billingData:
payMethodFk: Forma de pago
payDemFk: Plazo de pago
diff --git a/src/pages/Claim/Card/ClaimLines.vue b/src/pages/Claim/Card/ClaimLines.vue
index 60c470d22..90a68beae 100644
--- a/src/pages/Claim/Card/ClaimLines.vue
+++ b/src/pages/Claim/Card/ClaimLines.vue
@@ -57,6 +57,7 @@ function onFetch(rows, newRows) {
const price = row.quantity * sale.price;
const discount = (sale.discount * price) / 100;
amountClaimed.value = amountClaimed.value + (price - discount);
+
}
}
@@ -207,9 +208,10 @@ async function saveWhenHasChanges() {
selection="multiple"
v-model:selected="selected"
:grid="$q.screen.lt.md"
+
>
-
+
-
+
{{ value }}
-
+
{{ value }}
-
+
-
+
{{ column.value }}
diff --git a/src/pages/Claim/Card/ClaimSummary.vue b/src/pages/Claim/Card/ClaimSummary.vue
index 200ab4bea..8939a0785 100644
--- a/src/pages/Claim/Card/ClaimSummary.vue
+++ b/src/pages/Claim/Card/ClaimSummary.vue
@@ -345,12 +345,9 @@ function claimUrl(section) {
{{
t(col.value)
}}
- {{ col.value }}
+ {{
+ t(col.value)
+ }}
[
title: t('components.smartCard.viewSummary'),
icon: 'preview',
action: (row) => viewSummary(row.id, ClaimSummary),
+ isPrimary: true,
},
],
},
@@ -141,7 +142,6 @@ const STATE_COLOR = {
:columns="columns"
redirect="claim"
:right-search="false"
- auto-load
>
diff --git a/src/pages/Customer/Card/CustomerFiscalData.vue b/src/pages/Customer/Card/CustomerFiscalData.vue
index 673c7dda9..aff7deda4 100644
--- a/src/pages/Customer/Card/CustomerFiscalData.vue
+++ b/src/pages/Customer/Card/CustomerFiscalData.vue
@@ -110,7 +110,7 @@ function handleLocation(data, location) {
-
+
{{ t('whenActivatingIt') }}
@@ -169,7 +169,6 @@ es:
Active: Activo
Frozen: Congelado
Has to invoice: Factura
- Vies: Vies
Notify by email: Notificar vía e-mail
Invoice by address: Facturar por consignatario
Is equalizated: Recargo de equivalencia
diff --git a/src/pages/Customer/Card/CustomerSummary.vue b/src/pages/Customer/Card/CustomerSummary.vue
index ae4c7f3ab..6650ea395 100644
--- a/src/pages/Customer/Card/CustomerSummary.vue
+++ b/src/pages/Customer/Card/CustomerSummary.vue
@@ -173,7 +173,7 @@ const sumRisk = ({ clientRisks }) => {
:label="t('customer.summary.notifyByEmail')"
:value="entity.isToBeMailed"
/>
-
+
diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue
index e86e35966..fdfd7ff9c 100644
--- a/src/pages/Customer/CustomerList.vue
+++ b/src/pages/Customer/CustomerList.vue
@@ -2,22 +2,21 @@
import { ref, computed, markRaw } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
+import { useSummaryDialog } from 'src/composables/useSummaryDialog';
+import { toDate } from 'src/filters';
+
+import RightMenu from 'src/components/common/RightMenu.vue';
+import CustomerSummary from './Card/CustomerSummary.vue';
+import CustomerFilter from './CustomerFilter.vue';
import VnTable from 'components/VnTable/VnTable.vue';
import VnLocation from 'src/components/common/VnLocation.vue';
import VnSearchbar from 'components/ui/VnSearchbar.vue';
-import CustomerSummary from './Card/CustomerSummary.vue';
-import { useSummaryDialog } from 'src/composables/useSummaryDialog';
-import RightMenu from 'src/components/common/RightMenu.vue';
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
-import { toDate } from 'src/filters';
-import CustomerFilter from './CustomerFilter.vue';
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
const { t } = useI18n();
const router = useRouter();
-
const tableRef = ref();
-
const columns = computed(() => [
{
align: 'left',
@@ -263,7 +262,7 @@ const columns = computed(() => [
},
{
align: 'left',
- label: t('customer.extendedList.tableVisibleColumns.isVies'),
+ label: t('globals.isVies'),
name: 'isVies',
columnFilter: {
inWhere: true,
@@ -405,6 +404,7 @@ function handleLocation(data, location) {
ref="tableRef"
data-key="CustomerList"
url="Clients/filter"
+ order="id DESC"
:create="{
urlCreate: 'Clients/createWithUser',
title: t('globals.pageTitles.customerCreate'),
@@ -414,11 +414,9 @@ function handleLocation(data, location) {
isEqualizated: false,
},
}"
- order="id DESC"
:columns="columns"
- redirect="customer"
:right-search="false"
- auto-load
+ redirect="customer"
>
+ >
+
+
+
+
+
+
+ {{ scope.opt?.name }}
+ {{ scope.opt?.nickname }},
+ {{ scope.opt?.code }}
+
+
+
+
es:
- Web user: Usuario Web
+ Web user: Usuario web
es:
Original invoice: Factura origen
diff --git a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue
index 92f3fffca..cb8a45833 100644
--- a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue
+++ b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue
@@ -1,5 +1,5 @@
{
@@ -138,8 +130,8 @@ const formatOpt = (row, { model, options }, prop) => {
@@ -154,7 +146,7 @@ const formatOpt = (row, { model, options }, prop) => {
{{ getTotal(rows, 'net') }}
- {{ getTotal(rows, 'stems') }}
+ {{ getTotal(rows, 'stems', { decimalPlaces: 0 }) }}
@@ -174,7 +166,9 @@ const formatOpt = (row, { model, options }, prop) => {
v-model="props.row['intrastatFk']"
:options="intrastats"
option-value="id"
- option-label="description"
+ :option-label="
+ (row) => `${row.id}:${row.description}`
+ "
:filter-options="['id', 'description']"
>
@@ -248,11 +242,6 @@ const formatOpt = (row, { model, options }, prop) => {
}
}
-
en:
amount: Amount
@@ -261,7 +250,7 @@ const formatOpt = (row, { model, options }, prop) => {
country: Country
es:
Code: Código
- amount: Cantidad
+ amount: Valor mercancía
net: Neto
stems: Tallos
country: País
diff --git a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue
index 08fc11f69..115a33208 100644
--- a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue
+++ b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue
@@ -26,14 +26,14 @@ const intrastatTotals = ref({ amount: 0, net: 0, stems: 0 });
const vatColumns = ref([
{
name: 'expense',
- label: 'invoiceIn.summary.expense',
+ label: 'InvoiceIn.summary.expense',
field: (row) => row.expenseFk,
sortable: true,
align: 'left',
},
{
name: 'landed',
- label: 'invoiceIn.summary.taxableBase',
+ label: 'InvoiceIn.summary.taxableBase',
field: (row) => row.taxableBase,
format: (value) => toCurrency(value),
sortable: true,
@@ -41,7 +41,7 @@ const vatColumns = ref([
},
{
name: 'vat',
- label: 'invoiceIn.summary.sageVat',
+ label: 'InvoiceIn.summary.sageVat',
field: (row) => {
if (row.taxTypeSage) return `#${row.taxTypeSage.id} : ${row.taxTypeSage.vat}`;
},
@@ -51,7 +51,7 @@ const vatColumns = ref([
},
{
name: 'transaction',
- label: 'invoiceIn.summary.sageTransaction',
+ label: 'InvoiceIn.summary.sageTransaction',
field: (row) => {
if (row.transactionTypeSage)
return `#${row.transactionTypeSage.id} : ${row.transactionTypeSage?.transaction}`;
@@ -62,7 +62,7 @@ const vatColumns = ref([
},
{
name: 'rate',
- label: 'invoiceIn.summary.rate',
+ label: 'InvoiceIn.summary.rate',
field: (row) => taxRate(row.taxableBase, row.taxTypeSage?.rate),
format: (value) => toCurrency(value),
sortable: true,
@@ -70,7 +70,7 @@ const vatColumns = ref([
},
{
name: 'currency',
- label: 'invoiceIn.summary.currency',
+ label: 'InvoiceIn.summary.currency',
field: (row) => row.foreignValue,
format: (val) => val && toCurrency(val, currency.value),
sortable: true,
@@ -81,21 +81,21 @@ const vatColumns = ref([
const dueDayColumns = ref([
{
name: 'date',
- label: 'invoiceIn.summary.dueDay',
+ label: 'InvoiceIn.summary.dueDay',
field: (row) => toDate(row.dueDated),
sortable: true,
align: 'left',
},
{
name: 'bank',
- label: 'invoiceIn.summary.bank',
+ label: 'InvoiceIn.summary.bank',
field: (row) => row.bank.bank,
sortable: true,
align: 'left',
},
{
name: 'amount',
- label: 'invoiceIn.list.amount',
+ label: 'InvoiceIn.list.amount',
field: (row) => row.amount,
format: (value) => toCurrency(value),
sortable: true,
@@ -103,7 +103,7 @@ const dueDayColumns = ref([
},
{
name: 'landed',
- label: 'invoiceIn.summary.foreignValue',
+ label: 'InvoiceIn.summary.foreignValue',
field: (row) => row.foreignValue,
format: (val) => val && toCurrency(val, currency.value),
sortable: true,
@@ -114,7 +114,7 @@ const dueDayColumns = ref([
const intrastatColumns = ref([
{
name: 'code',
- label: 'invoiceIn.summary.code',
+ label: 'InvoiceIn.summary.code',
field: (row) => {
return `${row.intrastat.id}: ${row.intrastat?.description}`;
},
@@ -123,21 +123,21 @@ const intrastatColumns = ref([
},
{
name: 'amount',
- label: 'invoiceIn.list.amount',
+ label: 'InvoiceIn.list.amount',
field: (row) => toCurrency(row.amount),
sortable: true,
align: 'left',
},
{
name: 'net',
- label: 'invoiceIn.summary.net',
+ label: 'InvoiceIn.summary.net',
field: (row) => row.net,
sortable: true,
align: 'left',
},
{
name: 'stems',
- label: 'invoiceIn.summary.stems',
+ label: 'InvoiceIn.summary.stems',
field: (row) => row.stems,
format: (value) => value,
sortable: true,
@@ -145,7 +145,7 @@ const intrastatColumns = ref([
},
{
name: 'landed',
- label: 'invoiceIn.summary.country',
+ label: 'InvoiceIn.summary.country',
field: (row) => row.country?.code,
format: (value) => value,
sortable: true,
@@ -210,7 +210,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
/>
@@ -221,14 +221,18 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
-
+
+
@@ -239,21 +243,22 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
+
@@ -263,18 +268,18 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
/>
-
+
@@ -285,11 +290,11 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
-
+
`#/invoice-in/${entityId.value}/${param}`;
:color="amountsNotMatch ? 'negative' : 'transparent'"
:title="
amountsNotMatch
- ? t('invoiceIn.summary.noMatch')
- : t('invoiceIn.summary.dueTotal')
+ ? t('InvoiceIn.summary.noMatch')
+ : t('InvoiceIn.summary.dueTotal')
"
>
{{ toCurrency(entity.totals.totalDueDay) }}
@@ -309,7 +314,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
-
+
`#/invoice-in/${entityId.value}/${param}`;
-
+
@@ -395,7 +400,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
arrayData.store.data);
-const invoiceId = +useRoute().params.id;
const currency = computed(() => invoiceIn.value?.currency?.code);
const expenses = ref([]);
const sageTaxTypes = ref([]);
@@ -39,9 +41,8 @@ const columns = computed(() => [
options: expenses.value,
model: 'expenseFk',
optionValue: 'id',
- optionLabel: 'id',
+ optionLabel: (row) => `${row.id}: ${row.name}`,
sortable: true,
- tabIndex: 1,
align: 'left',
},
{
@@ -50,7 +51,6 @@ const columns = computed(() => [
field: (row) => row.taxableBase,
model: 'taxableBase',
sortable: true,
- tabIndex: 2,
align: 'left',
},
{
@@ -60,9 +60,8 @@ const columns = computed(() => [
options: sageTaxTypes.value,
model: 'taxTypeSageFk',
optionValue: 'id',
- optionLabel: 'id',
+ optionLabel: (row) => `${row.id}: ${row.vat}`,
sortable: true,
- tabindex: 3,
align: 'left',
},
{
@@ -72,16 +71,14 @@ const columns = computed(() => [
options: sageTransactionTypes.value,
model: 'transactionTypeSageFk',
optionValue: 'id',
- optionLabel: 'id',
+ optionLabel: (row) => `${row.id}: ${row.transaction}`,
sortable: true,
- tabIndex: 4,
align: 'left',
},
{
name: 'rate',
label: t('Rate'),
sortable: true,
- tabIndex: 5,
field: (row) => taxRate(row, row.taxTypeSageFk),
align: 'left',
},
@@ -89,7 +86,6 @@ const columns = computed(() => [
name: 'foreignvalue',
label: t('Foreign value'),
sortable: true,
- tabIndex: 6,
field: (row) => row.foreignValue,
align: 'left',
},
@@ -106,7 +102,7 @@ const filter = {
'transactionTypeSageFk',
],
where: {
- invoiceInFk: invoiceId,
+ invoiceInFk: route.params.id,
},
};
@@ -120,14 +116,20 @@ function taxRate(invoiceInTax) {
const taxTypeSage = taxRateSelection?.rate ?? 0;
const taxableBase = invoiceInTax?.taxableBase ?? 0;
- return (taxTypeSage / 100) * taxableBase;
+ return ((taxTypeSage / 100) * taxableBase).toFixed(2);
}
-const formatOpt = (row, { model, options }, prop) => {
- const obj = row[model];
- const option = options.find(({ id }) => id == obj);
- return option ? `${obj}:${option[prop]}` : '';
-};
+function autocompleteExpense(evt, row, col) {
+ const val = evt.target.value;
+ if (!val) return;
+
+ const param = isNaN(val) ? row[col.model] : val;
+ const lookup = expenses.value.find(
+ ({ id }) => id == useAccountShortToStandard(param)
+ );
+
+ if (lookup) row[col.model] = lookup;
+}
{
data-key="InvoiceInTaxes"
url="InvoiceInTaxes"
:filter="filter"
- :data-required="{ invoiceInFk: invoiceId }"
+ :data-required="{ invoiceInFk: $route.params.id }"
auto-load
v-model:selected="rowsSelected"
- :go-to="`/invoice-in/${invoiceId}/due-day`"
+ :go-to="`/invoice-in/${$route.params.id}/due-day`"
>
{
:option-label="col.optionLabel"
:filter-options="['id', 'name']"
:tooltip="t('Create a new expense')"
+ @keydown.tab="autocompleteExpense($event, row, col)"
>
@@ -187,13 +190,7 @@ const formatOpt = (row, { model, options }, prop) => {
- {{ currency }}
{
:option-value="col.optionValue"
:option-label="col.optionLabel"
:filter-options="['id', 'vat']"
- :hide-selected="false"
- :fill-input="false"
- :display-value="formatOpt(row, col, 'vat')"
+ data-cy="vat-sageiva"
>
@@ -233,11 +228,6 @@ const formatOpt = (row, { model, options }, prop) => {
:option-value="col.optionValue"
:option-label="col.optionLabel"
:filter-options="['id', 'transaction']"
- :autofocus="col.tabIndex == 1"
- input-debounce="0"
- :hide-selected="false"
- :fill-input="false"
- :display-value="formatOpt(row, col, 'transaction')"
>
@@ -262,6 +252,16 @@ const formatOpt = (row, { model, options }, prop) => {
}"
:disable="!isNotEuro(currency)"
v-model="row.foreignValue"
+ @update:model-value="
+ async (val) => {
+ if (!isNotEuro(currency)) return;
+ row.taxableBase = await getExchange(
+ val,
+ row.currencyFk,
+ invoiceIn.issued
+ );
+ }
+ "
/>
@@ -305,7 +305,7 @@ const formatOpt = (row, { model, options }, prop) => {
v-model="props.row['expenseFk']"
:options="expenses"
option-value="id"
- option-label="name"
+ :option-label="(row) => `${row.id}:${row.name}`"
:filter-options="['id', 'name']"
:tooltip="t('Create a new expense')"
>
@@ -339,7 +339,7 @@ const formatOpt = (row, { model, options }, prop) => {
v-model="props.row['taxTypeSageFk']"
:options="sageTaxTypes"
option-value="id"
- option-label="vat"
+ :option-label="(row) => `${row.id}:${row.vat}`"
:filter-options="['id', 'vat']"
>
@@ -362,7 +362,9 @@ const formatOpt = (row, { model, options }, prop) => {
v-model="props.row['transactionTypeSageFk']"
:options="sageTransactionTypes"
option-value="id"
- option-label="transaction"
+ :option-label="
+ (row) => `${row.id}:${row.transaction}`
+ "
:filter-options="['id', 'transaction']"
>
@@ -418,11 +420,6 @@ const formatOpt = (row, { model, options }, prop) => {
.bg {
background-color: var(--vn-light-gray);
}
-
-:deep(.q-table tr td:nth-child(n + 4):nth-child(-n + 5) input) {
- display: none;
-}
-
@media (max-width: $breakpoint-xs) {
.q-dialog {
.q-card {
diff --git a/src/pages/InvoiceIn/InvoiceInCreate.vue b/src/pages/InvoiceIn/InvoiceInCreate.vue
index c809e032b..200997f65 100644
--- a/src/pages/InvoiceIn/InvoiceInCreate.vue
+++ b/src/pages/InvoiceIn/InvoiceInCreate.vue
@@ -83,7 +83,7 @@ const redirectToInvoiceInBasicData = (__, { id }) => {
@@ -97,10 +97,10 @@ const redirectToInvoiceInBasicData = (__, { id }) => {
map-options
hide-selected
:required="true"
- :rules="validate('invoiceIn.companyFk')"
+ :rules="validate('InvoiceIn.companyFk')"
/>
diff --git a/src/pages/InvoiceIn/InvoiceInFilter.vue b/src/pages/InvoiceIn/InvoiceInFilter.vue
index 130a77960..653692026 100644
--- a/src/pages/InvoiceIn/InvoiceInFilter.vue
+++ b/src/pages/InvoiceIn/InvoiceInFilter.vue
@@ -1,41 +1,66 @@
- (activities = data)"
- />
-
-
+
+
- {{ t(`params.${tag.label}`) }}:
+ {{ getLocale(tag.label) }}:
{{ formatFn(tag.value) }}
-
+
-
+
-
+
+
+
+
+
+ handleDaysAgo(params, val)"
+ @remove="(val) => handleDaysAgo(params, val)"
+ />
@@ -44,20 +69,18 @@ const activities = ref([]);
v-model="params.supplierFk"
url="Suppliers"
:fields="['id', 'nickname']"
- :label="t('params.supplierFk')"
- option-value="id"
+ :label="getLocale('supplierFk')"
option-label="nickname"
dense
outlined
rounded
- :filter-options="['id', 'name']"
/>
+
+
+
+
+
-
-
-
-
-en:
- params:
- search: Id or supplier name
- supplierRef: Supplier ref.
- supplierFk: Supplier
- fi: Supplier fiscal id
- clientFk: Customer
- amount: Amount
- created: Created
- awb: AWB
- dued: Dued
- serialNumber: Serial Number
- serial: Serial
- account: Ledger account
- isBooked: is booked
- correctedFk: Rectified
- issued: Issued
- to: To
- from: From
- awbCode: AWB
- correctingFk: Rectificative
- supplierActivityFk: Supplier activity
-es:
- params:
- search: Id o nombre proveedor
- supplierRef: Ref. proveedor
- supplierFk: Proveedor
- clientFk: Cliente
- fi: CIF proveedor
- serialNumber: Num. serie
- serial: Serie
- awb: AWB
- amount: Importe
- issued: Emitida
- isBooked: Contabilizada
- account: Cuenta contable
- created: Creada
- dued: Vencida
- correctedFk: Rectificada
- correctingFk: Rectificativa
- supplierActivityFk: Actividad proveedor
- from: Desde
- to: Hasta
- From: Desde
- To: Hasta
- Amount: Importe
- Issued: Fecha factura
- Id or supplier: Id o proveedor
-
diff --git a/src/pages/InvoiceIn/InvoiceInList.vue b/src/pages/InvoiceIn/InvoiceInList.vue
index 8d658bee3..db6e7d214 100644
--- a/src/pages/InvoiceIn/InvoiceInList.vue
+++ b/src/pages/InvoiceIn/InvoiceInList.vue
@@ -1,7 +1,7 @@
+ (companies = data)" auto-load />
@@ -116,7 +160,7 @@ const cols = computed(() => [
urlCreate: 'InvoiceIns',
title: t('globals.createInvoiceIn'),
onDataSaved: ({ id }) => tableRef.redirect(id),
- formInitialData: {},
+ formInitialData: { companyFk: user.companyFk, issued: Date.vnNew() },
}"
redirect="invoice-in"
:columns="cols"
@@ -151,7 +195,7 @@ const cols = computed(() => [
[
option-label="code"
:required="true"
/>
-
+
diff --git a/src/pages/InvoiceIn/Serial/InvoiceInSerial.vue b/src/pages/InvoiceIn/Serial/InvoiceInSerial.vue
index 4eb9fa69d..a8fb3b0c8 100644
--- a/src/pages/InvoiceIn/Serial/InvoiceInSerial.vue
+++ b/src/pages/InvoiceIn/Serial/InvoiceInSerial.vue
@@ -58,6 +58,14 @@ onBeforeMount(async () => {
:right-search="false"
:user-params="{ daysAgo }"
:disable-option="{ card: true }"
+ :row-click="
+ (row) => {
+ $router.push({
+ name: 'InvoiceInList',
+ query: { table: JSON.stringify({ serial: row.serial }) },
+ });
+ }
+ "
auto-load
/>
diff --git a/src/pages/InvoiceIn/Serial/InvoiceInSerialFilter.vue b/src/pages/InvoiceIn/Serial/InvoiceInSerialFilter.vue
index 4f8c9d70b..19ed73e50 100644
--- a/src/pages/InvoiceIn/Serial/InvoiceInSerialFilter.vue
+++ b/src/pages/InvoiceIn/Serial/InvoiceInSerialFilter.vue
@@ -8,7 +8,11 @@ defineProps({ dataKey: { type: String, required: true } });
const { t } = useI18n();
-
+
{{ t(`params.${tag.label}`) }}:
diff --git a/src/pages/InvoiceIn/locale/en.yml b/src/pages/InvoiceIn/locale/en.yml
index b39511f29..ef7e31ac3 100644
--- a/src/pages/InvoiceIn/locale/en.yml
+++ b/src/pages/InvoiceIn/locale/en.yml
@@ -1,4 +1,4 @@
-invoiceIn:
+InvoiceIn:
serial: Serial
isBooked: Is booked
list:
@@ -7,8 +7,11 @@ invoiceIn:
supplierRef: Supplier ref.
file: File
issued: Issued
+ dueDated: Due dated
awb: AWB
amount: Amount
+ descriptor:
+ ticketList: Ticket list
card:
client: Client
company: Company
@@ -39,3 +42,9 @@ invoiceIn:
net: Net
stems: Stems
country: Country
+ params:
+ search: Id or supplier name
+ account: Ledger account
+ correctingFk: Rectificative
+ correctedFk: Corrected
+ isBooked: Is booked
diff --git a/src/pages/InvoiceIn/locale/es.yml b/src/pages/InvoiceIn/locale/es.yml
index 5f483dd08..ed5943489 100644
--- a/src/pages/InvoiceIn/locale/es.yml
+++ b/src/pages/InvoiceIn/locale/es.yml
@@ -1,15 +1,17 @@
-invoiceIn:
+InvoiceIn:
serial: Serie
isBooked: Contabilizada
list:
ref: Referencia
supplier: Proveedor
supplierRef: Ref. proveedor
- shortIssued: F. emisión
+ issued: F. emisión
+ dueDated: F. vencimiento
file: Fichero
- issued: Fecha emisión
awb: AWB
amount: Importe
+ descriptor:
+ ticketList: Listado de tickets
card:
client: Cliente
company: Empresa
@@ -38,3 +40,8 @@ invoiceIn:
net: Neto
stems: Tallos
country: País
+ params:
+ search: Id o nombre proveedor
+ account: Cuenta contable
+ correctingFk: Rectificativa
+ correctedFk: Rectificada
diff --git a/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue b/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue
index 3fd3104bf..e6c689523 100644
--- a/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue
+++ b/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue
@@ -115,6 +115,9 @@ onMounted(async () => {
-import { onMounted, onUnmounted, ref, computed, watchEffect } from 'vue';
+import { ref, computed, watchEffect } from 'vue';
import { useI18n } from 'vue-i18n';
import VnSelect from 'src/components/common/VnSelect.vue';
import VnInputDate from 'src/components/common/VnInputDate.vue';
@@ -10,7 +10,6 @@ import { usePrintService } from 'src/composables/usePrintService';
import VnTable from 'src/components/VnTable/VnTable.vue';
import InvoiceOutSummary from './Card/InvoiceOutSummary.vue';
import { toCurrency, toDate } from 'src/filters/index';
-import { useStateStore } from 'stores/useStateStore';
import { QBtn } from 'quasar';
import axios from 'axios';
import RightMenu from 'src/components/common/RightMenu.vue';
@@ -21,7 +20,6 @@ import VnInput from 'src/components/common/VnInput.vue';
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
const { t } = useI18n();
-const stateStore = useStateStore();
const { viewSummary } = useSummaryDialog();
const tableRef = ref();
const invoiceOutSerialsOptions = ref([]);
@@ -147,8 +145,6 @@ const columns = computed(() => [
],
},
]);
-onMounted(() => (stateStore.rightDrawer = true));
-onUnmounted(() => (stateStore.rightDrawer = false));
function openPdf(id) {
openReport(`${MODEL}/${id}/download`);
@@ -214,7 +210,6 @@ watchEffect(selectedRows);
order="id DESC"
:columns="columns"
redirect="invoice-out"
- auto-load
:table="{
'row-key': 'id',
selection: 'multiple',
diff --git a/src/pages/Item/ItemFixedPrice.vue b/src/pages/Item/ItemFixedPrice.vue
index 09fccfd6d..74403d471 100644
--- a/src/pages/Item/ItemFixedPrice.vue
+++ b/src/pages/Item/ItemFixedPrice.vue
@@ -361,7 +361,7 @@ function handleOnDataSave({ CrudModelRef }) {
@on-fetch="(data) => (warehousesOptions = data)"
auto-load
url="Warehouses"
- :filter="{ fields: ['id', 'name'], order: 'name ASC', limit: 30 }"
+ :filter="{ fields: ['id', 'name'], order: 'name ASC' }"
/>
@@ -394,191 +394,186 @@ function handleOnDataSave({ CrudModelRef }) {
/>
-
-
- data.forEach((item) => {
- item.hasMinPrice = `${item.hasMinPrice !== 0}`;
- })
- "
- :default-remove="false"
- :default-reset="false"
- :default-save="false"
- data-key="ItemFixedPrices"
- url="FixedPrices/filter"
- :order="['itemFk DESC', 'name DESC']"
- save-url="FixedPrices/crud"
- ref="tableRef"
- dense
- :filter="{
- where: {
- warehouseFk: user.warehouseFk,
- },
- }"
- :columns="columns"
- default-mode="table"
- auto-load
- :is-editable="true"
- :right-search="false"
- :table="{
- 'row-key': 'id',
- selection: 'multiple',
- }"
- :crud-model="{
- disableInfiniteScroll: true,
- }"
- v-model:selected="rowsSelected"
- :create-as-dialog="false"
- :create="{
- onDataSaved: handleOnDataSave,
- }"
- :use-model="true"
- :disable-option="{ card: true }"
- >
-
-
-
-
- {{ scope }}
-
-
+
+ data.forEach((item) => {
+ item.hasMinPrice = `${item.hasMinPrice !== 0}`;
+ })
+ "
+ :default-remove="false"
+ :default-reset="false"
+ :default-save="false"
+ data-key="ItemFixedPrices"
+ url="FixedPrices/filter"
+ :order="['itemFk DESC', 'name DESC']"
+ save-url="FixedPrices/crud"
+ ref="tableRef"
+ dense
+ :filter="{
+ where: {
+ warehouseFk: user.warehouseFk,
+ },
+ }"
+ :columns="columns"
+ default-mode="table"
+ auto-load
+ :is-editable="true"
+ :right-search="false"
+ :table="{
+ 'row-key': 'id',
+ selection: 'multiple',
+ }"
+ :use-model="true"
+ v-model:selected="rowsSelected"
+ :create-as-dialog="false"
+ :create="{
+ onDataSaved: handleOnDataSave,
+ }"
+ :disable-option="{ card: true }"
+ >
+
+
+
+
+ {{ scope }}
+
+
-
-
+
+
+
+
+ #{{ scope.opt?.id }}
+ {{ scope.opt?.name }}
+
+
+
+
+
+
+
+ {{ row.name }}
+
+ {{ row.subName }}
+
+
+
+
+
+
-
-
-
- #{{ scope.opt?.id }}
- {{ scope.opt?.name }}
-
-
-
-
-
-
-
- {{ row.name }}
-
- {{ row.subName }}
-
-
-
-
-
-
- €
-
-
-
-
-
-
- €
-
-
-
-
-
-
-
-
- €
-
-
-
-
-
-
-
-
-
-
-
-
- €
+
+
+
+
+
+
+ €
+
+
+
+
+
+
+
-
-
-
- removePrice(row.id, rowIndex)
- )
- "
- >
-
- {{ t('globals.delete') }}
-
-
-
-
-
-
-
+ €
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+ removePrice(row.id, rowIndex)
+ )
+ "
+ >
+
+ {{ t('globals.delete') }}
+
+
+
+
+
+
+
+
diff --git a/src/pages/Item/ItemType/Card/ItemTypeDescriptor.vue b/src/pages/Item/ItemType/Card/ItemTypeDescriptor.vue
index cd12fc238..936e95d2f 100644
--- a/src/pages/Item/ItemType/Card/ItemTypeDescriptor.vue
+++ b/src/pages/Item/ItemType/Card/ItemTypeDescriptor.vue
@@ -6,13 +6,11 @@ import { useI18n } from 'vue-i18n';
import CardDescriptor from 'components/ui/CardDescriptor.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
-
import useCardDescription from 'src/composables/useCardDescription';
const $props = defineProps({
id: {
type: Number,
- required: false,
default: null,
},
summary: {
@@ -24,6 +22,10 @@ const $props = defineProps({
const route = useRoute();
const { t } = useI18n();
+const entityId = computed(() => {
+ return $props.id || route.params.id;
+});
+
const itemTypeFilter = {
include: [
{ relation: 'worker' },
@@ -33,10 +35,6 @@ const itemTypeFilter = {
],
};
-const entityId = computed(() => {
- return $props.id || route.params.id;
-});
-
const data = ref(useCardDescription());
const setData = (entity) => (data.value = useCardDescription(entity.code, entity.id));
@@ -48,8 +46,8 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
:filter="itemTypeFilter"
:title="data.title"
:subtitle="data.subtitle"
+ data-key="itemTypeDescriptor"
@on-fetch="setData"
- data-key="entry"
>
diff --git a/src/pages/Item/ItemType/Card/ItemTypeDescriptorProxy.vue b/src/pages/Item/ItemType/Card/ItemTypeDescriptorProxy.vue
new file mode 100644
index 000000000..7cde9aef8
--- /dev/null
+++ b/src/pages/Item/ItemType/Card/ItemTypeDescriptorProxy.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
diff --git a/src/pages/Item/locale/en.yml b/src/pages/Item/locale/en.yml
index bd91ef745..74feb512b 100644
--- a/src/pages/Item/locale/en.yml
+++ b/src/pages/Item/locale/en.yml
@@ -135,7 +135,7 @@ item:
origin: Orig.
userName: Buyer
weight: Weight
- weightByPiece: Weight/Piece
+ weightByPiece: Weight/stem
stemMultiplier: Multiplier
producer: Producer
landed: Landed
diff --git a/src/pages/Item/locale/es.yml b/src/pages/Item/locale/es.yml
index b821d276a..3f2a06f1f 100644
--- a/src/pages/Item/locale/es.yml
+++ b/src/pages/Item/locale/es.yml
@@ -136,7 +136,7 @@ item:
size: Medida
origin: Orig.
weight: Peso
- weightByPiece: Peso (gramos)/tallo
+ weightByPiece: Peso/tallo
userName: Comprador
stemMultiplier: Multiplicador
producer: Productor
diff --git a/src/pages/Order/Card/OrderVolume.vue b/src/pages/Order/Card/OrderVolume.vue
index 27ee24197..fb104157e 100644
--- a/src/pages/Order/Card/OrderVolume.vue
+++ b/src/pages/Order/Card/OrderVolume.vue
@@ -71,9 +71,11 @@ onMounted(async () => (stateStore.rightDrawer = false));
auto-load
/>
-
+
@@ -111,12 +113,12 @@ onMounted(async () => (stateStore.rightDrawer = false));
-