diff --git a/src/components/ui/VnLinkPhone.vue b/src/components/ui/VnLinkPhone.vue
index 4c045968f..4068498cd 100644
--- a/src/components/ui/VnLinkPhone.vue
+++ b/src/components/ui/VnLinkPhone.vue
@@ -1,6 +1,7 @@
diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue
index f3f6d64f1..3649ba8f5 100644
--- a/src/components/ui/VnPaginate.vue
+++ b/src/components/ui/VnPaginate.vue
@@ -133,7 +133,7 @@ const addFilter = async (filter, params) => {
async function fetch(params) {
useArrayData(props.dataKey, params);
arrayData.reset(['filter.skip', 'skip', 'page']);
- await arrayData.fetch({ append: false });
+ await arrayData.fetch({ append: false, updateRouter: mounted.value });
return emitStoreData();
}
diff --git a/src/filters/index.js b/src/filters/index.js
index ae571d9bf..cefe8b0ed 100644
--- a/src/filters/index.js
+++ b/src/filters/index.js
@@ -14,12 +14,15 @@ import dashOrCurrency from './dashOrCurrency';
import getDifferences from './getDifferences';
import getUpdatedValues from './getUpdatedValues';
import getParamWhere from './getParamWhere';
+import parsePhone from './parsePhone';
import isDialogOpened from './isDialogOpened';
export {
isDialogOpened,
getUpdatedValues,
getDifferences,
+ isDialogOpened,
+ parsePhone,
toLowerCase,
toLowerCamel,
toDate,
diff --git a/src/filters/parsePhone.js b/src/filters/parsePhone.js
new file mode 100644
index 000000000..696f55007
--- /dev/null
+++ b/src/filters/parsePhone.js
@@ -0,0 +1,12 @@
+export default function (phone, prefix = 34) {
+ if (phone.startsWith('+')) {
+ return `${phone.slice(1)}`;
+ }
+ if (phone.startsWith('00')) {
+ return `${phone.slice(2)}`;
+ }
+ if (phone.startsWith(prefix) && phone.length === prefix.length + 9) {
+ return `${prefix}${phone.slice(prefix.length)}`;
+ }
+ return `${prefix}${phone}`;
+}
diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml
index a823a57d4..ecfa2c8fe 100644
--- a/src/i18n/locale/en.yml
+++ b/src/i18n/locale/en.yml
@@ -768,7 +768,7 @@ travel:
thermographs: Thermographs
hb: HB
basicData:
- daysInForward: Days in forward
+ daysInForward: Automatic movement (Raid)
isRaid: Raid
thermographs:
temperature: Temperature
diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 1a075dc50..def0b0696 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -762,7 +762,7 @@ travel:
thermographs: Termógrafos
hb: HB
basicData:
- daysInForward: Días redada
+ daysInForward: Desplazamiento automatico (redada)
isRaid: Redada
thermographs:
temperature: Temperatura
diff --git a/src/pages/Account/Card/AccountMailForwarding.vue b/src/pages/Account/Card/AccountMailForwarding.vue
index aa92e5072..30849d44a 100644
--- a/src/pages/Account/Card/AccountMailForwarding.vue
+++ b/src/pages/Account/Card/AccountMailForwarding.vue
@@ -41,8 +41,12 @@ const fetchAccountExistence = async () => {
};
const fetchMailForwards = async () => {
- const response = await axios.get(`MailForwards/${route.params.id}`);
- return response.data;
+ try {
+ const response = await axios.get(`MailForwards/${route.params.id}`);
+ return response.data;
+ } catch {
+ return null;
+ }
};
const deleteMailForward = async () => {
diff --git a/src/pages/Customer/Card/CustomerUnpaid.vue b/src/pages/Customer/Card/CustomerUnpaid.vue
index 1387329cc..e6820cba5 100644
--- a/src/pages/Customer/Card/CustomerUnpaid.vue
+++ b/src/pages/Customer/Card/CustomerUnpaid.vue
@@ -7,6 +7,7 @@ import VnInputDate from 'components/common/VnInputDate.vue';
import FormModel from 'components/FormModel.vue';
import FetchData from 'components/FetchData.vue';
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
+import VnRow from 'components/ui/VnRow.vue';
const formModelRef = ref(false);
const { t } = useI18n();
diff --git a/src/pages/Customer/CustomerFilter.vue b/src/pages/Customer/CustomerFilter.vue
index 79d48a667..cd567d415 100644
--- a/src/pages/Customer/CustomerFilter.vue
+++ b/src/pages/Customer/CustomerFilter.vue
@@ -101,8 +101,8 @@ const exprBuilder = (param, value) => {
-
+ {
/>
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
outlined
rounded
auto-load
+ />
+
+
+
+
-
-
-
-
-
-
-
+
+
@@ -203,7 +201,6 @@ es:
Salesperson: Comercial
Province: Provincia
City: Ciudad
- More options: Más opciones
Phone: Teléfono
Email: Email
Zone: Zona
diff --git a/src/pages/Entry/EntryBuysTableDialog.vue b/src/pages/Entry/EntryBuysTableDialog.vue
index c885c2485..3975bff19 100644
--- a/src/pages/Entry/EntryBuysTableDialog.vue
+++ b/src/pages/Entry/EntryBuysTableDialog.vue
@@ -82,11 +82,11 @@ const entriesTableColumns = computed(() => [
@@ -126,7 +126,9 @@ const entriesTableColumns = computed(() => [
"
unelevated
>
- {{ t('viewLabel') }}
+ {{
+ t('myEntries.viewLabel')
+ }}
diff --git a/src/pages/Entry/MyEntries.vue b/src/pages/Entry/MyEntries.vue
index 2c37c2c42..91a29b190 100644
--- a/src/pages/Entry/MyEntries.vue
+++ b/src/pages/Entry/MyEntries.vue
@@ -101,7 +101,7 @@ const columns = computed(() => [
name: 'tableActions',
actions: [
{
- title: t('printLabels'),
+ title: t('myEntries.printLabels'),
icon: 'print',
isPrimary: true,
action: (row) => printBuys(row.id),
diff --git a/src/pages/InvoiceIn/InvoiceInFilter.vue b/src/pages/InvoiceIn/InvoiceInFilter.vue
index d1c0856b5..130a77960 100644
--- a/src/pages/InvoiceIn/InvoiceInFilter.vue
+++ b/src/pages/InvoiceIn/InvoiceInFilter.vue
@@ -184,5 +184,4 @@ es:
Amount: Importe
Issued: Fecha factura
Id or supplier: Id o proveedor
- More options: Más opciones
diff --git a/src/pages/InvoiceOut/InvoiceOutFilter.vue b/src/pages/InvoiceOut/InvoiceOutFilter.vue
index 9ce8cc254..dc1d833a2 100644
--- a/src/pages/InvoiceOut/InvoiceOutFilter.vue
+++ b/src/pages/InvoiceOut/InvoiceOutFilter.vue
@@ -83,36 +83,29 @@ const states = ref();
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -149,5 +142,4 @@ es:
Issued: Fecha emisión
Created: Fecha creación
Dued: Fecha vencimiento
- More options: Más opciones
diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue
index 8edb78732..c8fffb0ef 100644
--- a/src/pages/InvoiceOut/InvoiceOutList.vue
+++ b/src/pages/InvoiceOut/InvoiceOutList.vue
@@ -60,8 +60,15 @@ const columns = computed(() => [
label: t('globals.reference'),
isTitle: true,
component: 'select',
- attrs: { url: MODEL, optionLabel: 'ref', optionValue: 'id' },
+ attrs: {
+ url: MODEL,
+ optionLabel: 'ref',
+ optionValue: 'ref',
+ },
columnField: { component: null },
+ columnFilter: {
+ inWhere: true,
+ },
},
{
align: 'left',
@@ -139,25 +146,22 @@ function openPdf(id) {
}
function downloadPdf() {
- if (selectedRows.value.size === 0) return;
- const selectedCardsArray = Array.from(selectedRows.value.values());
+ if (selectedRows.value.size === 0) return;
+ const selectedCardsArray = Array.from(selectedRows.value.values());
- if (selectedRows.value.size === 1) {
- const [invoiceOut] = selectedCardsArray;
- openPdf(invoiceOut.id);
- } else {
- const invoiceOutIdsArray = selectedCardsArray.map(
- (invoiceOut) => invoiceOut.id
- );
- const invoiceOutIds = invoiceOutIdsArray.join(',');
+ if (selectedRows.value.size === 1) {
+ const [invoiceOut] = selectedCardsArray;
+ openPdf(invoiceOut.id);
+ } else {
+ const invoiceOutIdsArray = selectedCardsArray.map((invoiceOut) => invoiceOut.id);
+ const invoiceOutIds = invoiceOutIdsArray.join(',');
- const params = {
- ids: invoiceOutIds,
- };
-
- openReport(`${MODEL}/downloadZip`, params);
- }
+ const params = {
+ ids: invoiceOutIds,
+ };
+ openReport(`${MODEL}/downloadZip`, params);
+ }
}
watchEffect(selectedRows);
diff --git a/src/pages/Item/Card/ItemTags.vue b/src/pages/Item/Card/ItemTags.vue
index 461aaef4b..f4ab90d93 100644
--- a/src/pages/Item/Card/ItemTags.vue
+++ b/src/pages/Item/Card/ItemTags.vue
@@ -66,6 +66,7 @@ const insertTag = (rows) => {
(tagOptions = data)"
auto-load
/>
diff --git a/src/pages/Order/Card/CatalogFilterValueDialog.vue b/src/pages/Order/Card/CatalogFilterValueDialog.vue
index 53bb87f8d..b91e7d229 100644
--- a/src/pages/Order/Card/CatalogFilterValueDialog.vue
+++ b/src/pages/Order/Card/CatalogFilterValueDialog.vue
@@ -49,7 +49,7 @@ const getSelectedTagValues = async (tag) => {
-
+
{
:emit-value="false"
use-input
@update:model-value="getSelectedTagValues"
+ data-cy="catalogFilterValueDialogTagSelect"
/>
{
:disable="!value"
is-outlined
class="col"
+ data-cy="catalogFilterValueDialogValueInput"
/>
-
+
diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue
index 6202a6f90..1dd569fb5 100644
--- a/src/pages/Order/Card/OrderCatalogFilter.vue
+++ b/src/pages/Order/Card/OrderCatalogFilter.vue
@@ -178,6 +178,7 @@ function addOrder(value, field, params) {
? resetCategory(params, searchFn)
: removeTagGroupParam(params, searchFn, valIndex)
"
+ data-cy="catalogFilterCustomTag"
>
{{
@@ -211,6 +212,7 @@ function addOrder(value, field, params) {
:name="category.icon"
class="category-icon"
@click="selectCategory(params, category, searchFn)"
+ data-cy="catalogFilterCategory"
>
{{ t(category.name) }}
@@ -234,6 +236,7 @@ function addOrder(value, field, params) {
sort-by="name ASC"
:disable="!params.categoryFk"
@update:model-value="searchFn()"
+ data-cy="catalogFilterType"
>
@@ -285,6 +288,7 @@ function addOrder(value, field, params) {
:is-clearable="false"
v-model="searchByTag"
@keyup.enter="(val) => onSearchByTag(val, params)"
+ data-cy="catalogFilterValueInput"
>
@@ -297,6 +301,7 @@ function addOrder(value, field, params) {
color="primary"
size="md"
dense
+ data-cy="catalogFilterValueDialogBtn"
/>
{
});
async function fetchClientAddress(id, formData = {}) {
const { data } = await axios.get(`Clients/${id}`, {
- params: { filter: { include: { relation: 'addresses' } } },
+ params: {
+ filter: {
+ order: ['isDefaultAddress DESC', 'isActive DESC', 'nickname ASC'],
+ include: { relation: 'addresses' },
+ },
+ },
});
addressesList.value = data.addresses;
formData.addressId = data.defaultAddressFk;
@@ -162,7 +168,7 @@ async function fetchAgencies({ landed, addressId }) {
const { data } = await axios.get('Agencies/landsThatDay', {
params: { addressFk: addressId, landed },
});
- agencyList.value = data;
+ agencyList.value = dataByOrder(data, 'agencyMode ASC');
}
const getDateColor = (date) => {
@@ -191,7 +197,7 @@ const getDateColor = (date) => {
urlCreate: 'Orders/new',
title: t('module.cerateOrder'),
onDataSaved: (url) => {
- tableRef.redirect(`${url}/catalog`);
+ tableRef.redirect(`${url}/catalog`);
},
formInitialData: {
active: true,
@@ -253,22 +259,27 @@ const getDateColor = (date) => {
@update:model-value="() => fetchAgencies(data)"
>
-
+
+
+
+
-
- {{
- `${
- !scope.opt?.isActive
- ? t('basicData.inactive')
- : ''
- } `
- }}
- {{ scope.opt?.nickname }}: {{ scope.opt?.street }},
- {{ scope.opt?.city }}
+
+ {{ scope.opt.nickname }}
+
+
+ {{ `${scope.opt.street}, ${scope.opt.city}` }}
diff --git a/src/pages/Supplier/Card/SupplierAccounts.vue b/src/pages/Supplier/Card/SupplierAccounts.vue
index 428ab05c2..c2934830a 100644
--- a/src/pages/Supplier/Card/SupplierAccounts.vue
+++ b/src/pages/Supplier/Card/SupplierAccounts.vue
@@ -24,13 +24,14 @@ const supplier = ref(null);
const supplierAccountRef = ref(null);
const wireTransferFk = ref(null);
const bankEntitiesOptions = ref([]);
+const filteredBankEntitiesOptions = ref([]);
const onBankEntityCreated = async (dataSaved, rowData) => {
await bankEntitiesRef.value.fetch();
rowData.bankEntityFk = dataSaved.id;
};
-const onChangesSaved = () => {
+const onChangesSaved = async () => {
if (supplier.value.payMethodFk !== wireTransferFk.value)
quasar
.dialog({
@@ -55,12 +56,35 @@ const setWireTransfer = async () => {
await axios.patch(`Suppliers/${route.params.id}`, params);
notify('globals.dataSaved', 'positive');
};
+
+function findBankFk(value, row) {
+ row.bankEntityFk = null;
+ if (!value) return;
+
+ const bankEntityFk = bankEntitiesOptions.value.find((b) => b.id == value.slice(4, 8));
+ if (bankEntityFk) row.bankEntityFk = bankEntityFk.id;
+}
+
+function bankEntityFilter(val, update) {
+ update(() => {
+ const needle = val.toLowerCase();
+ filteredBankEntitiesOptions.value = bankEntitiesOptions.value.filter(
+ (bank) =>
+ bank.bic.toLowerCase().startsWith(needle) ||
+ bank.name.toLowerCase().includes(needle)
+ );
+ });
+}
(bankEntitiesOptions = data)"
+ @on-fetch="
+ (data) => {
+ (bankEntitiesOptions = data), (filteredBankEntitiesOptions = data);
+ }
+ "
auto-load
/>
{
findBankFk(value, row)"
:required="true"
>
@@ -109,7 +134,9 @@ const setWireTransfer = async () => {
bankEntityFilter(val, update)"
option-label="bic"
option-value="id"
hide-selected
diff --git a/src/pages/Supplier/SupplierList.vue b/src/pages/Supplier/SupplierList.vue
index 69f826201..a54012b34 100644
--- a/src/pages/Supplier/SupplierList.vue
+++ b/src/pages/Supplier/SupplierList.vue
@@ -124,8 +124,7 @@ const columns = computed(() => [
-en:
- Search suppliers: Search suppliers
-es:
+ es:
Search suppliers: Buscar proveedores
+ Create Supplier: Crear proveedor
diff --git a/src/pages/Ticket/Card/TicketDescriptorMenu.vue b/src/pages/Ticket/Card/TicketDescriptorMenu.vue
index b8e64cb79..60a703f84 100644
--- a/src/pages/Ticket/Card/TicketDescriptorMenu.vue
+++ b/src/pages/Ticket/Card/TicketDescriptorMenu.vue
@@ -676,7 +676,7 @@ async function uploadDocuware(force) {
@@ -741,7 +741,6 @@ es:
Ticket invoiced: Ticket facturado
Set weight: Establecer peso
Weight set: Peso establecido
- This ticket may be invoiced, do you want to continue?: Es posible que se facture este ticket, desea continuar?
invoiceIds: "Se han generado las facturas con los siguientes ids: {invoiceIds}"
This ticket will be removed from current route! Continue anyway?: ¡Se eliminará el ticket de la ruta actual! ¿Continuar de todas formas?
You are going to delete this ticket: Vas a eliminar este ticket
diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue
index deeaaa28d..b534170c9 100644
--- a/src/pages/Ticket/Card/TicketSale.vue
+++ b/src/pages/Ticket/Card/TicketSale.vue
@@ -181,17 +181,34 @@ const resetChanges = async () => {
arrayData.fetch({ append: false });
tableRef.value.reload();
};
+const rowToUpdate = ref(null);
+const changeQuantity = async (sale) => {
+ canProceed.value = await isSalePrepared(sale);
+ if (!canProceed.value) return;
+ if (
+ !sale.itemFk ||
+ sale.quantity == null ||
+ edit.value?.oldQuantity === sale.quantity
+ )
+ return;
+ if (!sale.id) return addSale(sale);
-const updateQuantity = async (sale) => {
- const params = { quantity: sale.quantity };
try {
- await axios.post(`Sales/${sale.id}/updateQuantity`, params);
+ if (!rowToUpdate.value) return;
+ rowToUpdate.value = null;
+ await updateQuantity(sale);
} catch (e) {
- sale.quantity = tableRef.value.CrudModelRef.originalData.find(
+ const { quantity } = tableRef.value.CrudModelRef.originalData.find(
(s) => s.id === sale.id
- ).quantity;
+ );
+ sale.quantity = quantity;
throw e;
}
+};
+
+const updateQuantity = async ({ quantity, id }) => {
+ const params = { quantity: quantity };
+ await axios.post(`Sales/${id}/updateQuantity`, params);
notify('globals.dataSaved', 'positive');
};
@@ -219,19 +236,6 @@ const addSale = async (sale) => {
window.location.reload();
};
-const changeQuantity = async (sale) => {
- canProceed.value = await isSalePrepared(sale);
- if (!canProceed.value) return;
- if (
- !sale.itemFk ||
- sale.quantity == null ||
- edit.value?.oldQuantity === sale.quantity
- )
- return;
- if (!sale.id) return addSale(sale);
- await updateQuantity(sale);
-};
-
const updateConcept = async (sale) => {
canProceed.value = await isSalePrepared(sale);
if (!canProceed.value) return;
@@ -778,16 +782,12 @@ watch(
- (rowToUpdate = row)"
@focus="edit.oldQuantity = row.quantity"
/>
{{ row.quantity }}
diff --git a/src/pages/Ticket/Card/TicketSaleTracking.vue b/src/pages/Ticket/Card/TicketSaleTracking.vue
index 03e2336eb..7a33df795 100644
--- a/src/pages/Ticket/Card/TicketSaleTracking.vue
+++ b/src/pages/Ticket/Card/TicketSaleTracking.vue
@@ -471,7 +471,7 @@ const qCheckBoxController = (sale, action) => {
url="Shelvings"
hide-selected
option-label="code"
- option-value="code"
+ option-value="id"
v-model="row.shelvingFk"
@update:model-value="updateShelving(row)"
style="max-width: 120px"
diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue
index eeef65cd3..2f5f69e1c 100644
--- a/src/pages/Ticket/Card/TicketSummary.vue
+++ b/src/pages/Ticket/Card/TicketSummary.vue
@@ -258,7 +258,7 @@ function toTicketUrl(section) {
{
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -340,7 +337,6 @@ es:
With problems: Con problemas
Invoiced: Facturado
Routed: Enrutado
- More options: Más opciones
Province: Provincia
Agency: Agencia
Warehouse: Almacén
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue
index 149a794a9..2fe4fcddc 100644
--- a/src/pages/Ticket/TicketList.vue
+++ b/src/pages/Ticket/TicketList.vue
@@ -274,7 +274,7 @@ const fetchAddresses = async (formData) => {
const filter = {
fields: ['nickname', 'street', 'city', 'id', 'isActive'],
- order: 'nickname ASC',
+ order: ['isDefaultAddress DESC', 'isActive DESC', 'nickname ASC'],
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`Clients/${formData.clientId}/addresses`, {
@@ -590,7 +590,22 @@ function setReference(data) {
@update:model-value="() => fetchAvailableAgencies(data)"
>
-
+
+
+
+
diff --git a/src/pages/Zone/Card/ZoneEventExclusionForm.vue b/src/pages/Zone/Card/ZoneEventExclusionForm.vue
index 4b54f6743..0882036c1 100644
--- a/src/pages/Zone/Card/ZoneEventExclusionForm.vue
+++ b/src/pages/Zone/Card/ZoneEventExclusionForm.vue
@@ -1,5 +1,5 @@