- |
- |
- |
+ |
+
{{sale.quantity}} |
@@ -125,7 +126,6 @@
-
@@ -288,3 +288,9 @@
question="You are going to delete this ticket"
message="Continue anyway?">
+
+
\ No newline at end of file
diff --git a/client/ticket/src/sale/index.js b/client/ticket/src/sale/index.js
index e8e8dfc45..25af6251f 100644
--- a/client/ticket/src/sale/index.js
+++ b/client/ticket/src/sale/index.js
@@ -76,7 +76,7 @@ class Controller extends FilterTicketList {
for (let i = 0; i < data.length; i++)
if (data[i].checked)
lines.push({id: data[i].id, instance: i});
- console.log(this.$.index.model.instances);
+
return lines;
}
@@ -131,13 +131,15 @@ class Controller extends FilterTicketList {
}
// Remove Lines
- onRemoveLinesClick() {
- let sales = this.getCheckedLines();
- let params = {sales: sales, actualTicketFk: this.ticket.id};
- let query = `/ticket/api/Sales/removes`;
- this.$http.post(query, params).then(() => {
- this.removeInstances(sales);
- });
+ onRemoveLinesClick(response) {
+ if (response === 'ACCEPT') {
+ let sales = this.getCheckedLines();
+ let params = {sales: sales, actualTicketFk: this.ticket.id};
+ let query = `/ticket/api/Sales/removes`;
+ this.$http.post(query, params).then(() => {
+ this.removeInstances(sales);
+ });
+ }
}
removeInstances(instances) {
@@ -146,6 +148,10 @@ class Controller extends FilterTicketList {
}
}
+ showRemoveLinesDialog() {
+ this.$.deleteLines.show();
+ }
+
// Move Lines
showTransferPopover(event) {
let filter = {clientFk: this.ticket.clientFk, ticketFk: this.ticket.id};
@@ -284,12 +290,6 @@ class Controller extends FilterTicketList {
this.$.edit.hide();
}*/
- onMoreClick() {
- this.removeOptionByName('Mark as reserved');
- this.removeOptionByName('Unmark as reserved');
- this.removeOptionByName('Update discount');
- }
-
/**
* Remove options from 'More' menu
* @param {String} name - Option name
diff --git a/client/ticket/src/sale/locale/es.yml b/client/ticket/src/sale/locale/es.yml
index 727be3a78..d98539709 100644
--- a/client/ticket/src/sale/locale/es.yml
+++ b/client/ticket/src/sale/locale/es.yml
@@ -8,4 +8,6 @@ There is no changes to save: No hay cambios que guardar
Edit discount: Editar descuento
Move to ticket: Mover a ticket
New ticket: Nuevo ticket
-Edit price: Editar precio
\ No newline at end of file
+Edit price: Editar precio
+You are going to delete lines of the ticket: Vas a borrar lineas del ticket
+Continue anyway?: ¿Estás seguro?
\ No newline at end of file
|