diff --git a/src/pages/Entry/EntryBuysTableDialog.vue b/src/pages/Entry/EntryBuysTableDialog.vue
index 3975bff19..a2d8c9117 100644
--- a/src/pages/Entry/EntryBuysTableDialog.vue
+++ b/src/pages/Entry/EntryBuysTableDialog.vue
@@ -1,24 +1,24 @@
+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(() => [
[
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