@@ -58,7 +58,7 @@ onMounted(async () => {
dash
/>
diff --git a/src/pages/Entry/Card/EntryDescriptor.vue b/src/pages/Entry/Card/EntryDescriptor.vue
index 188e66358..9814615a6 100644
--- a/src/pages/Entry/Card/EntryDescriptor.vue
+++ b/src/pages/Entry/Card/EntryDescriptor.vue
@@ -74,8 +74,8 @@ const showEntryReport = () => {
-
-
+
+
{
- const { data } = await axios.get(`Entries/${entry.value.id}/getBuys`);
- if (data) entryBuys.value = data;
-
+ const { data } = await axios.get(`Entries/${entry.value.id}/getBuys`);
+ if (data) entryBuys.value = data;
};
@@ -173,13 +174,10 @@ const fetchEntryBuys = async () => {
-
+
{
/>
-
+
@@ -212,61 +207,42 @@ const fetchEntryBuys = async () => {
:label="t('entry.summary.travelAgency')"
:value="entry.travel.agency?.name"
/>
-
+
-
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
-import { computed } from 'vue';
+import { computed, ref } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { QBtn } from 'quasar';
import VnPaginate from 'src/components/ui/VnPaginate.vue';
import { usePrintService } from 'composables/usePrintService';
-const { openReport } = usePrintService();
+const { openReport } = usePrintService();
+const buyRows = ref([]);
const route = useRoute();
const { t } = useI18n();
const $props = defineProps({
id: {
- type: String,
+ type: Number,
required: false,
default: null,
},
});
const entityId = computed(() => $props.id || route.params.id);
-
const entriesTableColumns = computed(() => [
{
align: 'left',
@@ -63,34 +63,39 @@ const entriesTableColumns = computed(() => [
field: 'grouping',
},
]);
-
+function downloadCSV(rows) {
+ const headers = ['id', 'itemFk', 'name', 'stickers', 'packing', 'comment'];
+
+ const csvRows = rows.map((row) => {
+ const buy = row;
+ const item = buy.item || {};
+
+ return [
+ buy.id,
+ buy.itemFk,
+ item.name || '',
+ buy.stickers,
+ buy.packing,
+ item.comment || '',
+ ].join(',');
+ });
+
+ const csvContent = [headers.join(','), ...csvRows].join('\n');
+
+ const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
+ const url = URL.createObjectURL(blob);
+ const link = document.createElement('a');
+ link.href = url;
+ link.setAttribute('download', `${entityId.value}data.csv`);
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+}
+
-
-
- {{ title }}
-
-
-
-
-
-
[
>
[
:grid="$q.screen.lt.md"
:no-data-label="t('globals.noResults')"
>
+
+
+
+
+
+
@@ -118,7 +144,6 @@ const entriesTableColumns = computed(() => [
- {{
- scope.opt?.name + ': ' + scope.opt?.nickname
- }}
+
+ {{ scope.opt?.name}}
+
+
+ {{ `#${scope.opt?.id } , ${ scope.opt?.nickname}` }}
+
diff --git a/src/pages/Entry/EntryLatestBuysFilter.vue b/src/pages/Entry/EntryLatestBuysFilter.vue
index 83124c1bf..59dddce26 100644
--- a/src/pages/Entry/EntryLatestBuysFilter.vue
+++ b/src/pages/Entry/EntryLatestBuysFilter.vue
@@ -58,7 +58,7 @@ const tagValues = ref([]);
-
-
+
+
- {{ opt.name }}
+
+ {{ scope.opt?.name}}
+
- {{ opt.nickname }}
+ {{ `#${scope.opt?.id } , ${ scope.opt?.nickname}` }}
@@ -85,7 +87,7 @@ const tagValues = ref([]);
-import { onMounted, ref, computed } from 'vue';
+import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import EntryFilter from './EntryFilter.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
-import { useStateStore } from 'stores/useStateStore';
import VnTable from 'components/VnTable/VnTable.vue';
import RightMenu from 'src/components/common/RightMenu.vue';
import { toDate } from 'src/filters';
@@ -12,7 +11,6 @@ import EntrySummary from './Card/EntrySummary.vue';
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
-const stateStore = useStateStore();
const { t } = useI18n();
const tableRef = ref();
diff --git a/src/pages/Entry/EntryStockBoughtFilter.vue b/src/pages/Entry/EntryStockBoughtFilter.vue
index e59332064..136881f17 100644
--- a/src/pages/Entry/EntryStockBoughtFilter.vue
+++ b/src/pages/Entry/EntryStockBoughtFilter.vue
@@ -65,6 +65,6 @@ onMounted(async () => {
es:
Date: Fecha
params:
- dated: Date
+ dated: Fecha
workerFk: Trabajador
diff --git a/src/pages/Entry/MyEntries.vue b/src/pages/Entry/MyEntries.vue
index 91a29b190..dbe05eb88 100644
--- a/src/pages/Entry/MyEntries.vue
+++ b/src/pages/Entry/MyEntries.vue
@@ -102,7 +102,7 @@ const columns = computed(() => [
actions: [
{
title: t('myEntries.printLabels'),
- icon: 'print',
+ icon: 'move_item',
isPrimary: true,
action: (row) => printBuys(row.id),
},
diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml
index cd5113d84..6e41566d0 100644
--- a/src/pages/Entry/locale/en.yml
+++ b/src/pages/Entry/locale/en.yml
@@ -17,5 +17,6 @@ myEntries:
warehouseInFk: Warehouse in
daysOnward: Days onward
daysAgo: Days ago
+ downloadCsv: Download CSV
wasteRecalc:
recalcOk: The wastes were successfully recalculated
diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml
index 3007c5d44..7e627b09f 100644
--- a/src/pages/Entry/locale/es.yml
+++ b/src/pages/Entry/locale/es.yml
@@ -20,5 +20,6 @@ myEntries:
warehouseInFk: Alm. entrada
daysOnward: Días adelante
daysAgo: Días atras
+ downloadCsv: Descargar CSV
wasteRecalc:
recalcOk: Se han recalculado las mermas correctamente
diff --git a/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue b/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue
index 1c4091169..e529ea6cd 100644
--- a/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue
+++ b/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue
@@ -161,7 +161,7 @@ const columns = computed(() => [
+ >
+
+
+
+
+ {{ scope.opt?.name}}
+
+
+ {{ `#${scope.opt?.id } , ${ scope.opt?.nickname}` }}
+
+
+
+
+
diff --git a/src/pages/InvoiceIn/InvoiceInList.vue b/src/pages/InvoiceIn/InvoiceInList.vue
index db6e7d214..2d8fb2989 100644
--- a/src/pages/InvoiceIn/InvoiceInList.vue
+++ b/src/pages/InvoiceIn/InvoiceInList.vue
@@ -108,19 +108,6 @@ const cols = computed(() => [
},
format: (row) => row.code,
},
- {
- name: 'companyFk',
- label: t('globals.company'),
- columnFilter: {
- component: 'select',
- attrs: {
- url: 'Companies',
- fields: ['id', 'code'],
- optionLabel: 'code',
- },
- },
- format: (row) => row.code,
- },
{
align: 'right',
name: 'tableActions',
@@ -178,18 +165,18 @@ const cols = computed(() => [
{{ scope.opt?.nickname }}
- #{{ scope.opt?.id }}
+ #{{ scope.opt?.id }}, {{ scope.opt?.name }}
diff --git a/src/pages/InvoiceIn/locale/en.yml b/src/pages/InvoiceIn/locale/en.yml
index ef7e31ac3..3723a0f05 100644
--- a/src/pages/InvoiceIn/locale/en.yml
+++ b/src/pages/InvoiceIn/locale/en.yml
@@ -44,7 +44,10 @@ InvoiceIn:
country: Country
params:
search: Id or supplier name
- account: Ledger account
- correctingFk: Rectificative
correctedFk: Corrected
isBooked: Is booked
+invoicein:
+ params:
+ account: Ledger account
+ correctingFk: Rectificative
+
\ No newline at end of file
diff --git a/src/pages/InvoiceIn/locale/es.yml b/src/pages/InvoiceIn/locale/es.yml
index ed5943489..5637605f6 100644
--- a/src/pages/InvoiceIn/locale/es.yml
+++ b/src/pages/InvoiceIn/locale/es.yml
@@ -42,6 +42,9 @@ InvoiceIn:
country: País
params:
search: Id o nombre proveedor
+ correctedFk: Rectificada
+invoicein:
+ params:
account: Cuenta contable
correctingFk: Rectificativa
- correctedFk: Rectificada
+
diff --git a/src/pages/InvoiceOut/InvoiceOutFilter.vue b/src/pages/InvoiceOut/InvoiceOutFilter.vue
index dc1d833a2..cdc9f037a 100644
--- a/src/pages/InvoiceOut/InvoiceOutFilter.vue
+++ b/src/pages/InvoiceOut/InvoiceOutFilter.vue
@@ -47,6 +47,7 @@ const states = ref();
:label="t('Amount')"
v-model="params.amount"
is-outlined
+ data-cy="InvoiceOutFilterAmountBtn"
/>
diff --git a/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue b/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue
index e6c689523..392256473 100644
--- a/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue
+++ b/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue
@@ -101,6 +101,7 @@ onMounted(async () => {
dense
outlined
rounded
+ data-cy="InvoiceOutGlobalClientSelect"
>
@@ -125,6 +126,7 @@ onMounted(async () => {
dense
outlined
rounded
+ data-cy="InvoiceOutGlobalSerialSelect"
/>
{
v-model="formData.maxShipped"
:label="t('maxShipped')"
is-outlined
+ data-cy="InvoiceOutGlobalMaxShippedDate"
/>
{
dense
outlined
rounded
+ data-cy="InvoiceOutGlobalCompanySelect"
/>
{
dense
outlined
rounded
+ data-cy="InvoiceOutGlobalPrinterSelect"
/>
[
columnField: { component: null },
format: (row) => toDate(row.dued),
},
+ {
+ align: 'left',
+ name: 'customsAgentFk',
+ label: t('invoiceOutList.tableVisibleColumns.customsAgent'),
+ cardVisible: true,
+ format: (row, dashIfEmpty) => dashIfEmpty(row.customsAgentName),
+ },
{
align: 'right',
name: 'tableActions',
@@ -190,6 +197,7 @@ watchEffect(selectedRows);
icon-right="cloud_download"
@click="downloadPdf()"
:disable="!hasSelectedCards"
+ data-cy="InvoiceOutDownloadPdfBtn"
>
{{ t('downloadPdf') }}
@@ -238,6 +246,7 @@ watchEffect(selectedRows);
v-model="data.ticketFk"
:label="t('globals.ticket')"
style="flex: 1"
+ data-cy="InvoiceOutCreateTicketinput"
/>
diff --git a/src/pages/InvoiceOut/locale/en.yml b/src/pages/InvoiceOut/locale/en.yml
index 8cefe8bdc..f31e5a07c 100644
--- a/src/pages/InvoiceOut/locale/en.yml
+++ b/src/pages/InvoiceOut/locale/en.yml
@@ -13,6 +13,7 @@ invoiceOutList:
invoiceOutSerial: Serial
ticket: Ticket
taxArea: Tax area
+ customsAgent: Custom Agent
DownloadPdf: Download PDF
InvoiceOutSummary: Summary
negativeBases:
@@ -24,3 +25,15 @@ negativeBases:
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
\ No newline at end of file
diff --git a/src/pages/InvoiceOut/locale/es.yml b/src/pages/InvoiceOut/locale/es.yml
index 106168a5d..deca8bdea 100644
--- a/src/pages/InvoiceOut/locale/es.yml
+++ b/src/pages/InvoiceOut/locale/es.yml
@@ -15,6 +15,7 @@ invoiceOutList:
invoiceOutSerial: Serial
ticket: Ticket
taxArea: Area
+ customsAgent: Agente de aduanas
DownloadPdf: Descargar PDF
InvoiceOutSummary: Resumen
negativeBases:
@@ -27,3 +28,15 @@ negativeBases:
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
\ No newline at end of file
diff --git a/src/pages/Item/Card/ItemBasicData.vue b/src/pages/Item/Card/ItemBasicData.vue
index a1788617f..4c96401f3 100644
--- a/src/pages/Item/Card/ItemBasicData.vue
+++ b/src/pages/Item/Card/ItemBasicData.vue
@@ -203,6 +203,12 @@ const onIntrastatCreated = (response, formData) => {
v-model="data.hasKgPrice"
:label="t('item.basicData.hasKgPrice')"
/>
+
+
+
{
:fields="['id', 'name']"
sort-by="name ASC"
hide-selected
+ data-cy="AddGenusSelectDialog"
>
{
:fields="['id', 'name']"
sort-by="name ASC"
hide-selected
+ data-cy="AddSpeciesSelectDialog"
>
-
+
{
switch (param) {
@@ -49,10 +40,6 @@ const where = {
itemFk: route.params.id,
};
-if (hideInventory.value) {
- where.supplierFk = { neq: inventorySupplierFk };
-}
-
const arrayData = useArrayData('ItemLastEntries', {
url: 'Items/lastEntriesFilter',
order: ['landed DESC', 'buyFk DESC'],
@@ -110,7 +97,7 @@ const columns = computed(() => [
format: (val) => dashIfEmpty(val),
},
{
- label: t('shelvings.packing'),
+ label: 'Packing',
name: 'packing',
field: 'packing',
align: 'center',
@@ -182,15 +169,11 @@ const updateFilter = async () => {
const userFilter = arrayData.store.userFilter.where;
userFilter.landed = filter;
- if (hideInventory.value) userFilter.supplierFk = { neq: inventorySupplierFk };
- else delete userFilter.supplierFk;
await fetchItemLastEntries();
};
onMounted(async () => {
- await getInventorySupplier();
-
const _from = Date.vnNew();
_from.setDate(_from.getDate() - 75);
from.value = getDate(_from, 'from');
@@ -200,12 +183,16 @@ onMounted(async () => {
updateFilter();
- watch([from, to, hideInventory], ([nFrom, nTo], [oFrom, oTo]) => {
+ watch([from, to], ([nFrom, nTo], [oFrom, oTo]) => {
if (nFrom && nFrom != oFrom) nFrom = getDate(new Date(nFrom), 'from');
if (nTo && nTo != oTo) nTo = getDate(new Date(nTo), 'to');
updateFilter();
});
});
+
+function getBadgeClass(groupingMode, expectedGrouping) {
+ return groupingMode === expectedGrouping ? 'accent-badge' : 'simple-badge';
+}
@@ -224,13 +211,6 @@ onMounted(async () => {
class="q-mr-lg"
data-cy="to"
/>
-
@@ -249,6 +229,11 @@ onMounted(async () => {
/>
+
+
+ {{ row.warehouse }}
+
+
@@ -262,32 +247,37 @@ onMounted(async () => {
+
+
+ {{ value }}
+ {{ t('lastEntries.grouping') }}/Packing
+
+
+
+
+ {{ row.printedStickers }}
+
+
{{ dashIfEmpty(row.packing) }}
- {{ t('lastEntries.packing') }}
+ Packing
-
-
- {{ value }}
-
- {{ t('lastEntries.grouping') }}/{{ t('lastEntries.packing') }}
-
-
{{ dashIfEmpty(row.grouping) }}
{{ t('lastEntries.grouping') }}
@@ -315,13 +305,16 @@ onMounted(async () => {
-
-
+
- {{ row.supplier }}
+ >
+
+ {{ row.supplier }}
+
@@ -349,4 +342,13 @@ onMounted(async () => {
background-color: red;
}
}
+.accent-badge {
+ background-color: var(--vn-label-color);
+ color: var(--vn-text-color-contrast);
+}
+.simple-badge {
+ background-color: transparent;
+ color: var(--vn-text-color);
+ font-size: 14px;
+}
diff --git a/src/pages/Item/Card/ItemTags.vue b/src/pages/Item/Card/ItemTags.vue
index fbb0e01a7..992b1042b 100644
--- a/src/pages/Item/Card/ItemTags.vue
+++ b/src/pages/Item/Card/ItemTags.vue
@@ -107,7 +107,7 @@ const submitTags = async (data) => {
@on-fetch="onItemTagsFetched"
>
-
+
{
rowsSelected.value.length > 0);
const rowsSelected = ref([]);
const itemFixedPriceFilterRef = ref();
@@ -53,7 +54,6 @@ const columns = computed(() => [
name: 'itemFk',
...defaultColumnAttrs,
isId: true,
- cardVisible: true,
columnField: {
component: 'input',
type: 'number',
@@ -65,14 +65,12 @@ const columns = computed(() => [
name: 'name',
...defaultColumnAttrs,
create: true,
- cardVisible: true,
},
{
label: t('item.fixedPrice.groupingPrice'),
field: 'rate2',
name: 'rate2',
...defaultColumnAttrs,
- cardVisible: true,
component: 'input',
type: 'number',
},
@@ -81,7 +79,6 @@ const columns = computed(() => [
field: 'rate3',
name: 'rate3',
...defaultColumnAttrs,
- cardVisible: true,
component: 'input',
type: 'number',
},
@@ -91,7 +88,6 @@ const columns = computed(() => [
field: 'minPrice',
name: 'minPrice',
...defaultColumnAttrs,
- cardVisible: true,
component: 'input',
type: 'number',
},
@@ -100,7 +96,6 @@ const columns = computed(() => [
field: 'started',
name: 'started',
format: ({ started }) => toDate(started),
- cardVisible: true,
...defaultColumnAttrs,
columnField: {
component: 'date',
@@ -116,7 +111,6 @@ const columns = computed(() => [
field: 'ended',
name: 'ended',
...defaultColumnAttrs,
- cardVisible: true,
columnField: {
component: 'date',
class: 'shrink',
@@ -251,11 +245,14 @@ const upsertPrice = async (props, resetMinPrice = false) => {
}
if (!changes.updates && !changes.creates) return;
const data = await upsertFixedPrice(row);
- tableRef.value.CrudModelRef.formData[props.rowIndex] = data;
+ Object.assign(tableRef.value.CrudModelRef.formData[props.rowIndex], data);
+ notify(t('globals.dataSaved'), 'positive');
+ tableRef.value.reload();
};
async function upsertFixedPrice(row) {
const { data } = await axios.patch('FixedPrices/upsertFixedPrice', row);
+ data.hasMinPrice = data.hasMinPrice ? 1 : 0;
return data;
}
@@ -372,9 +369,9 @@ function handleOnDataSave({ CrudModelRef }) {
-
+
confirmRemove(row, true)"
:title="t('globals.remove')"
- v-if="rowsSelected.length"
/>
- 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']"
+ :order="['name DESC', 'itemFk DESC']"
save-url="FixedPrices/crud"
ref="tableRef"
dense
@@ -498,14 +489,15 @@ function handleOnDataSave({ CrudModelRef }) {
diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue
index 4aa3b13fe..1d6e69339 100644
--- a/src/pages/Item/ItemList.vue
+++ b/src/pages/Item/ItemList.vue
@@ -1,5 +1,5 @@
@@ -310,15 +336,18 @@ const columns = computed(() => [
[