forked from verdnatura/salix-front
fix: refs #7623 bugs & tests
This commit is contained in:
parent
121204fee4
commit
ca96e4e6e0
|
@ -119,7 +119,7 @@ const departments = ref();
|
||||||
emit-value
|
emit-value
|
||||||
hide-selected
|
hide-selected
|
||||||
map-options
|
map-options
|
||||||
option-label="country"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
|
|
|
@ -104,10 +104,14 @@ const totalEntryPrice = (rows) => {
|
||||||
for (const row of rows) {
|
for (const row of rows) {
|
||||||
let total = 0;
|
let total = 0;
|
||||||
let quantity = 0;
|
let quantity = 0;
|
||||||
for (const buy of row.buys) {
|
|
||||||
total = total + buy.total;
|
if (row.buys) {
|
||||||
quantity = quantity + buy.quantity;
|
for (const buy of row.buys) {
|
||||||
|
total = total + buy.total;
|
||||||
|
quantity = quantity + buy.quantity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
row.total = total;
|
row.total = total;
|
||||||
row.quantity = quantity;
|
row.quantity = quantity;
|
||||||
totalPrice = totalPrice + total;
|
totalPrice = totalPrice + total;
|
||||||
|
|
|
@ -6,15 +6,14 @@ describe('InvoiceInCorrective', () => {
|
||||||
const saveDialog = '.q-card > .q-card__actions > .q-btn--standard ';
|
const saveDialog = '.q-card > .q-card__actions > .q-btn--standard ';
|
||||||
|
|
||||||
it('should create a correcting invoice', () => {
|
it('should create a correcting invoice', () => {
|
||||||
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/invoice-in/1/summary?limit=10`);
|
cy.visit(`/#/invoice-in/1/summary?limit=10`);
|
||||||
|
|
||||||
cy.openLeftMenu();
|
|
||||||
cy.openActionsDescriptor();
|
cy.openActionsDescriptor();
|
||||||
|
|
||||||
cy.get(createRectificative).click();
|
cy.get(createRectificative).click();
|
||||||
cy.get(saveDialog).click();
|
cy.get(saveDialog).click();
|
||||||
cy.openLeftMenu();
|
|
||||||
cy.get(rectificativeSection).click();
|
cy.get(rectificativeSection).click();
|
||||||
cy.get('tbody > tr:visible').should('have.length', 1);
|
cy.get('tbody > tr:visible').should('have.length', 1);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue