diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 086909ebf..dcd9211f9 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -625,6 +625,7 @@ export default { selectAllSalesCheckbox: 'vn-ticket-sale vn-thead vn-check', secondSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(2) vn-check[ng-model="sale.checked"]', thirdSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(3) vn-check[ng-model="sale.checked"]', + fourthSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(4) vn-check[ng-model="sale.checked"]', deleteSaleButton: 'vn-ticket-sale vn-tool-bar > vn-button[icon="delete"]', transferSaleButton: 'vn-ticket-sale vn-tool-bar > vn-button[icon="call_split"]', moveToTicketInput: 'form vn-input-number[ng-model="$ctrl.transfer.ticketId"] input', diff --git a/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js b/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js index 2158eec8b..2c9646708 100644 --- a/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js +++ b/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js @@ -251,7 +251,6 @@ describe('Ticket Edit sale path', () => { await page.waitToClick(selectors.ticketSales.moreMenu); await page.waitToClick(selectors.ticketSales.moreMenuCreateClaim); await page.waitToClick(selectors.globalItems.acceptButton); - await page.waitToClick(selectors.globalItems.acceptButton); await page.waitForState('claim.card.basicData'); }); diff --git a/loopback/locale/en.json b/loopback/locale/en.json index a517a6183..14ffffeb5 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -172,5 +172,6 @@ "Comment added to client": "Comment added to client", "This ticket is already a refund": "This ticket is already a refund", "A claim with that sale already exists": "A claim with that sale already exists", - "ASSIGN_ZONE_FIRST": "Assign zone first" + "Can't transfer claimed sales": "Can't transfer claimed sales", + "Invalid quantity": "Invalid quantity" } diff --git a/modules/client/front/dms/edit/index.html b/modules/client/front/dms/edit/index.html index 58899df2b..2d653c827 100644 --- a/modules/client/front/dms/edit/index.html +++ b/modules/client/front/dms/edit/index.html @@ -34,7 +34,7 @@ diff --git a/modules/entry/front/basic-data/index.html b/modules/entry/front/basic-data/index.html index 888205320..6bccb0b5f 100644 --- a/modules/entry/front/basic-data/index.html +++ b/modules/entry/front/basic-data/index.html @@ -157,14 +157,14 @@ diff --git a/modules/item/front/descriptor/index.html b/modules/item/front/descriptor/index.html index d98eabe3e..7c442d364 100644 --- a/modules/item/front/descriptor/index.html +++ b/modules/item/front/descriptor/index.html @@ -115,7 +115,7 @@ ng-model="$ctrl.warehouseFk" data="warehouses" show-field="name" - value="id">> + value="id"> diff --git a/modules/monitor/front/index/search-panel/index.html b/modules/monitor/front/index/search-panel/index.html index 822f84922..0d24c41f9 100644 --- a/modules/monitor/front/index/search-panel/index.html +++ b/modules/monitor/front/index/search-panel/index.html @@ -88,7 +88,7 @@ vn-one label="Warehouse" ng-model="filter.warehouseFk" - data="Warehouses"> + data="warehouses"> diff --git a/modules/ticket/back/methods/sale/refund.js b/modules/ticket/back/methods/sale/refund.js index af58a6286..18ccee976 100644 --- a/modules/ticket/back/methods/sale/refund.js +++ b/modules/ticket/back/methods/sale/refund.js @@ -101,6 +101,9 @@ module.exports = Self => { } } + const query = `CALL vn.ticket_recalc(?)`; + await Self.rawSql(query, [refundTicket.id], myOptions); + if (tx) await tx.commit(); return refundTicket; diff --git a/modules/ticket/front/basic-data/step-one/index.html b/modules/ticket/front/basic-data/step-one/index.html index 73df8c370..bbe315ca6 100644 --- a/modules/ticket/front/basic-data/step-one/index.html +++ b/modules/ticket/front/basic-data/step-one/index.html @@ -30,7 +30,7 @@ diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index b2c0db18d..7d14a4fa3 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -61,20 +61,20 @@ - Visible - Available - Id - Quantity - Item - Price - Disc - Amount - Packaging + Visible + Available + Id + Quantity + Item + Price + Disc + Amount + Packaging - + @@ -481,7 +481,7 @@ on-accept="$ctrl.transferSales($ctrl.transfer.ticketId)"> - + on-accept="$ctrl.onCreateClaimAccepted()"> @@ -513,9 +513,9 @@ - Add claim + Add claim = this.ticketConfig[0].daysForWarningClaim) this.$.claimConfirm.show(); else - this.onCreateClaimAccepted(); + this.$.claimSure.show(); } onCreateClaimAccepted() { diff --git a/modules/ticket/front/sale/index.spec.js b/modules/ticket/front/sale/index.spec.js index 5fb3b3df3..9da8e6e7c 100644 --- a/modules/ticket/front/sale/index.spec.js +++ b/modules/ticket/front/sale/index.spec.js @@ -758,5 +758,15 @@ describe('Ticket', () => { expect(controller.$.editDiscount.hide).toHaveBeenCalledWith(); }); }); + + describe('sortBy()', () => { + it('should set reverse and propertyName properties', () => { + const propertyName = 'id'; + controller.sortBy(propertyName); + + expect(controller.propertyName).toEqual(propertyName); + expect(controller.reverse).toEqual(false); + }); + }); }); }); diff --git a/modules/ticket/front/search-panel/index.html b/modules/ticket/front/search-panel/index.html index d22b06a46..52bede97f 100644 --- a/modules/ticket/front/search-panel/index.html +++ b/modules/ticket/front/search-panel/index.html @@ -107,7 +107,7 @@ vn-one label="Warehouse" ng-model="filter.warehouseFk" - data="Warehouses"> + data="warehouses"> diff --git a/modules/worker/front/dms/edit/index.html b/modules/worker/front/dms/edit/index.html index e4939b4ea..39d4af801 100644 --- a/modules/worker/front/dms/edit/index.html +++ b/modules/worker/front/dms/edit/index.html @@ -34,7 +34,7 @@