diff --git a/modules/ticket/back/methods/sale-tracking/salePreparingList.js b/modules/ticket/back/methods/sale-tracking/filter.js similarity index 84% rename from modules/ticket/back/methods/sale-tracking/salePreparingList.js rename to modules/ticket/back/methods/sale-tracking/filter.js index 063730fde..ee074a852 100644 --- a/modules/ticket/back/methods/sale-tracking/salePreparingList.js +++ b/modules/ticket/back/methods/sale-tracking/filter.js @@ -2,7 +2,7 @@ const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; module.exports = Self => { - Self.remoteMethod('salePreparingList', { + Self.remoteMethod('filter', { description: 'Returns a list with the lines of a ticket and its different states of preparation', accessType: 'READ', accepts: [ @@ -24,12 +24,12 @@ module.exports = Self => { root: true }, http: { - path: `/:id/salePreparingList`, + path: `/:id/filter`, verb: 'GET' } }); - Self.salePreparingList = async(id, filter, options) => { + Self.filter = async(id, filter, options) => { const conn = Self.dataSource.connector; const myOptions = {}; @@ -44,24 +44,17 @@ module.exports = Self => { stmt = new ParameterizedSQL( `SELECT t.clientFk, t.shipped, - a.nickname, s.ticketFk, s.itemFk, s.quantity, s.concept, - s.reserved, s.id saleFk, - i.size, - i.inkFk, - i.stems, i.image, i.subName, - b.grouping, IF(stPrevious.saleFk,TRUE,FALSE) as isPreviousSelected, stPrevious.isChecked as isPrevious, stPrepared.isChecked as isPrepared, stControled.isChecked as isControled, - ib.code as barcode, (MAX(sgd.id) IS NOT NULL) AS hasSaleGroupDetail, p.code AS parkingCode, i.value5, @@ -71,15 +64,12 @@ module.exports = Self => { i.value9, i.value10 FROM vn.ticket t - JOIN vn.address a ON a.id = t.addressFk JOIN vn.sale s ON s.ticketFk = t.id JOIN vn.item i ON i.id = s.itemFk LEFT JOIN cache.last_buy lb ON lb.item_id = i.id AND lb.warehouse_id = t.warehouseFk - LEFT JOIN vn.buy b ON b.id = lb.buy_id LEFT JOIN vn.saleTracking stPrevious ON stPrevious.saleFk = s.id AND stPrevious.stateFk = 26 LEFT JOIN vn.saleTracking stPrepared ON stPrepared.saleFk = s.id AND stPrepared.stateFk = 14 LEFT JOIN vn.saleTracking stControled ON stControled.saleFk = s.id AND stControled.stateFk = 8 - LEFT JOIN vn.itemBarcode ib ON ib.itemFk = i.id LEFT JOIN vn.saleGroupDetail sgd ON sgd.saleFk = s.id LEFT JOIN vn.saleGroup sg ON sg.id = sgd.saleGroupFk LEFT JOIN vn.parking p ON p.id = sg.parkingFk diff --git a/modules/ticket/back/models/sale-tracking.js b/modules/ticket/back/models/sale-tracking.js index 76efff4c7..86a5ea4ca 100644 --- a/modules/ticket/back/models/sale-tracking.js +++ b/modules/ticket/back/models/sale-tracking.js @@ -1,5 +1,5 @@ module.exports = Self => { - require('../methods/sale-tracking/salePreparingList')(Self); + require('../methods/sale-tracking/filter')(Self); require('../methods/sale-tracking/listSaleTracking')(Self); require('../methods/sale-tracking/replace')(Self); require('../methods/sale-tracking/delete')(Self); diff --git a/modules/ticket/front/sale-tracking/index.html b/modules/ticket/front/sale-tracking/index.html index 1bd79642f..76b178c26 100644 --- a/modules/ticket/front/sale-tracking/index.html +++ b/modules/ticket/front/sale-tracking/index.html @@ -1,6 +1,6 @@ @@ -93,12 +93,12 @@ diff --git a/modules/ticket/front/sale-tracking/locale/es.yml b/modules/ticket/front/sale-tracking/locale/es.yml index eabc0a04d..559321dd6 100644 --- a/modules/ticket/front/sale-tracking/locale/es.yml +++ b/modules/ticket/front/sale-tracking/locale/es.yml @@ -1,6 +1,7 @@ -ItemShelvings sale: Carros línea -has saleGroupDetail: tiene detalle grupo lineas -is previousSelected: es previa seleccionada -is previous: es previa -is prepared: esta preparado -is controled: esta controlado +Shelvings sale: Carros línea +Log states: Historial estados +sale group detail: detalle grupo lineas +previous selected: previa seleccionado +previous: previa +prepared: preparado +checked: revisado