From b94c97d322147e67aa54523b49d544ab7c1f45c6 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 13 May 2020 17:51:27 +0200 Subject: [PATCH 1/2] Hotfix: Clone option added to vnItemDescriptor --- modules/item/front/descriptor/index.html | 8 +++++++- modules/item/front/descriptor/index.js | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/item/front/descriptor/index.html b/modules/item/front/descriptor/index.html index 81f8299b0..16ea76cf7 100644 --- a/modules/item/front/descriptor/index.html +++ b/modules/item/front/descriptor/index.html @@ -99,4 +99,10 @@ - \ No newline at end of file + + + diff --git a/modules/item/front/descriptor/index.js b/modules/item/front/descriptor/index.js index e04fdb595..105216fbd 100644 --- a/modules/item/front/descriptor/index.js +++ b/modules/item/front/descriptor/index.js @@ -6,7 +6,8 @@ class Controller extends Component { constructor($element, $) { super($element, $); this.moreOptions = [ - {callback: this.showRegularizeDialog, name: 'Regularize stock'} + {callback: this.showRegularizeDialog, name: 'Regularize stock'}, + {callback: () => this.$.clone.show(), name: 'Clone'} ]; } @@ -88,6 +89,11 @@ class Controller extends Component { this.warehouseFk = null; this.quantity = null; } + + onCloneAccept() { + this.$http.post(`Items/${this.item.id}/clone`) + .then(res => this.$state.go('item.card.tags', {id: res.data.id})); + } } Controller.$inject = ['$element', '$scope']; From afa8aad96bb5c48f5bc4ffb2976a7bbc45ed8be3 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Mon, 1 Jun 2020 12:50:50 +0200 Subject: [PATCH 2/2] Changed closure procedure --- print/methods/closure.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/print/methods/closure.js b/print/methods/closure.js index 05490609d..610dc3eec 100644 --- a/print/methods/closure.js +++ b/print/methods/closure.js @@ -23,7 +23,7 @@ module.exports = app => { for (const ticket of tickets) { try { - await db.rawSql(`CALL vn.ticketClosureTicket(:ticketId)`, { + await db.rawSql(`CALL vn.ticket_closeByTicket(:ticketId)`, { ticketId: ticket.id });