diff --git a/src/pages/DeliveryNote/Card/DeliveryNoteBasicData.vue b/src/pages/DeliveryNote/Card/DeliveryNoteBasicData.vue
index 8ddca2f04..42ade139b 100644
--- a/src/pages/DeliveryNote/Card/DeliveryNoteBasicData.vue
+++ b/src/pages/DeliveryNote/Card/DeliveryNoteBasicData.vue
@@ -1,5 +1,5 @@
(warehouses = data)"
auto-load
/>
+ setDefaultState(data)"
+ auto-load
+ />
-
+
diff --git a/src/pages/DeliveryNote/DeliveryNoteFilter.vue b/src/pages/DeliveryNote/DeliveryNoteFilter.vue
index 0d48e9dca..7c88845fe 100644
--- a/src/pages/DeliveryNote/DeliveryNoteFilter.vue
+++ b/src/pages/DeliveryNote/DeliveryNoteFilter.vue
@@ -48,6 +48,7 @@ defineProps({ dataKey: { type: String, required: true } });
option-label="name"
option-value="id"
filled
+ data-cy="deliveryNote-supplier-filter"
/>
diff --git a/src/pages/DeliveryNote/DeliveryNoteList.vue b/src/pages/DeliveryNote/DeliveryNoteList.vue
index c5028f51b..7e4a3854a 100644
--- a/src/pages/DeliveryNote/DeliveryNoteList.vue
+++ b/src/pages/DeliveryNote/DeliveryNoteList.vue
@@ -47,6 +47,7 @@ const columns = computed(() => [
name: 'shipped',
label: t('globals.shipped'),
component: 'date',
+ cardVisible: true,
format: (row) => toDate(row.shipped),
},
{
@@ -95,7 +96,6 @@ const columns = computed(() => [
align: 'left',
name: 'amount',
label: t('globals.amount'),
- isTitle: true,
columnFilter: {
inWhere: true,
},
@@ -183,7 +183,7 @@ watch(
-
+
{{}}
{{ toCurrency(round(totalAmount ?? 0)) }}
diff --git a/test/cypress/integration/deliveryNote/deliveryNoteList.spec.js b/test/cypress/integration/deliveryNote/deliveryNoteList.spec.js
new file mode 100644
index 000000000..9d7ac876f
--- /dev/null
+++ b/test/cypress/integration/deliveryNote/deliveryNoteList.spec.js
@@ -0,0 +1,59 @@
+///
+
+describe('DelieryNote list', () => {
+ const supplier = 'PLANTS SL';
+ let totalSelectedAmount = 0;
+
+ beforeEach(() => {
+ cy.login('developer');
+ cy.visit('/#/delivery-note/list');
+ cy.dataCy('vn-searchbar_input').type('{enter}');
+ });
+
+ it('Should show data and then filter by supplier', () => {
+ cy.selectOption('[data-cy="deliveryNote-supplier-filter"]', supplier);
+ cy.dataCy('vnFilterPanel_search').click();
+ cy.validateVnTableRows({ cols: [{ name: 'supplierFk', val: supplier }] });
+ });
+
+ it('click the first two checkboxes and the table footer quantity should match the sum of the checked rows', () => {
+ cy.selectRows([1, 2]);
+
+ [1, 2].forEach((index) => {
+ cy.get(
+ `.q-virtual-scroll__content > :nth-child(${index}) > :nth-child(1) > .q-checkbox > .q-checkbox__inner`,
+ ).should('have.class', 'q-checkbox__inner--truthy');
+ });
+
+ const getAmountFromRow = (index) => {
+ return cy
+ .get(
+ `.q-virtual-scroll__content > :nth-child(${index}) [data-col-field="amount"]`,
+ )
+ .invoke('text')
+ .then((text) =>
+ parseFloat(text.replace(/[^\d.,-]/g, '').replace(',', '')),
+ );
+ };
+
+ getAmountFromRow(1)
+ .then((amount1) => {
+ totalSelectedAmount += amount1;
+ return getAmountFromRow(2);
+ })
+ .then((amount2) => {
+ totalSelectedAmount += amount2;
+
+ cy.log('Total seleccionado:', totalSelectedAmount);
+
+ cy.dataCy('deliveryNote-total-amount')
+ .invoke('text')
+ .then((text) => {
+ const totalFooterAmount = parseFloat(
+ text.replace(/[^\d.,-]/g, '').replace(',', ''),
+ );
+ expect(totalFooterAmount).to.eq(totalSelectedAmount);
+ });
+ });
+ });
+});