diff --git a/CHANGELOG.md b/CHANGELOG.md index 6533a84ed..ea4725448 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [2306.01] - 2023-02-23 ### Added -- +- (Tickets -> Datos Básicos) Mensaje de confirmación al intentar generar tickets con negativos ### Changed - (General -> Inicio) Ahora permite recuperar la contraseña tanto con el correo de recuperación como el usuario diff --git a/modules/ticket/back/locale/ticket/es.yml b/modules/ticket/back/locale/ticket/es.yml index 2c524a74f..15b5a39bf 100644 --- a/modules/ticket/back/locale/ticket/es.yml +++ b/modules/ticket/back/locale/ticket/es.yml @@ -21,3 +21,5 @@ companyFk: empresa agencyModeFk: agencia ticketFk: ticket mergedTicket: ticket fusionado +withWarningAccept: aviso negativos +isWithoutNegatives: sin negativos diff --git a/modules/ticket/back/methods/ticket/componentUpdate.js b/modules/ticket/back/methods/ticket/componentUpdate.js index f4a4bb98d..94b91e237 100644 --- a/modules/ticket/back/methods/ticket/componentUpdate.js +++ b/modules/ticket/back/methods/ticket/componentUpdate.js @@ -83,6 +83,11 @@ module.exports = Self => { type: 'boolean', description: 'Is whithout negatives', required: true + }, + { + arg: 'withWarningAccept', + type: 'boolean', + description: 'Has pressed in confirm message', }], returns: { type: ['object'], diff --git a/modules/ticket/front/basic-data/step-two/index.html b/modules/ticket/front/basic-data/step-two/index.html index 6be455fc9..ad0c49dbb 100644 --- a/modules/ticket/front/basic-data/step-two/index.html +++ b/modules/ticket/front/basic-data/step-two/index.html @@ -40,7 +40,7 @@ - {{::sale.movable}} @@ -64,14 +64,14 @@
-
Total
+
Total
Price {{$ctrl.totalPrice | currency: 'EUR': 2}}
New price {{$ctrl.totalNewPrice | currency: 'EUR': 2}}
Difference {{$ctrl.totalPriceDifference | currency: 'EUR': 2}}
-
Charge difference to
+
Charge difference to
- @@ -95,4 +95,10 @@ warehouse-fk="$ctrl.ticket.warehouseFk" ticket-fk="$ctrl.ticket.id"> + + diff --git a/modules/ticket/front/basic-data/step-two/index.js b/modules/ticket/front/basic-data/step-two/index.js index 4ac9f292e..74e2df074 100644 --- a/modules/ticket/front/basic-data/step-two/index.js +++ b/modules/ticket/front/basic-data/step-two/index.js @@ -83,6 +83,17 @@ class Controller extends Component { } onSubmit() { + if (this.haveNegatives && !this.ticket.withoutNegatives) + this.$.negativesConfirm.show(); + else this.applyChanges(); + } + + onConfirmAccept() { + this.ticket.withWarningAccept = true; + this.applyChanges(); + } + + applyChanges() { if (!this.ticket.option) { return this.vnApp.showError( this.$t('Choose an option') @@ -102,7 +113,8 @@ class Controller extends Component { landed: this.ticket.landed, isDeleted: this.ticket.isDeleted, option: parseInt(this.ticket.option), - isWithoutNegatives: this.ticket.withoutNegatives + isWithoutNegatives: this.ticket.withoutNegatives, + withWarningAccept: this.ticket.withWarningAccept }; this.$http.post(query, params) diff --git a/modules/ticket/front/basic-data/step-two/locale/es.yml b/modules/ticket/front/basic-data/step-two/locale/es.yml index e1f1e0bfc..71f893e1e 100644 --- a/modules/ticket/front/basic-data/step-two/locale/es.yml +++ b/modules/ticket/front/basic-data/step-two/locale/es.yml @@ -8,4 +8,6 @@ New price: Nuevo precio Price difference: Diferencia de precio Create without negatives: Crear sin negativos Clone this ticket with the changes and only sales availables: Clona este ticket con los cambios y solo las ventas disponibles. -Movable: Movible \ No newline at end of file +Movable: Movible +Negatives are going to be generated, are you sure you want to advance all the lines?: Se van a generar negativos, ¿seguro que quieres adelantar todas las líneas? +Edit basic data: Editar datos básicos