diff --git a/modules/route/back/methods/route/getTickets.js b/modules/route/back/methods/route/getTickets.js index 708644c1a..1eb9e27f5 100644 --- a/modules/route/back/methods/route/getTickets.js +++ b/modules/route/back/methods/route/getTickets.js @@ -50,14 +50,17 @@ module.exports = Self => { am.name AS agencyModeName, u.nickname AS userNickname, vn.ticketTotalVolume(t.id) AS volume, - tob.description + tob.description, + GROUP_CONCAT(DISTINCT i.itemPackingTypeFk ORDER BY i.itemPackingTypeFk) ipt FROM vn.route r JOIN ticket t ON t.routeFk = r.id + JOIN vn.sale s ON s.ticketFk = t.id + JOIN vn.item i ON i.id = s.itemFk LEFT JOIN ticketState ts ON ts.ticketFk = t.id LEFT JOIN state st ON st.id = ts.stateFk LEFT JOIN warehouse wh ON wh.id = t.warehouseFk LEFT JOIN observationType ot ON ot.code = 'delivery' - LEFT JOIN ticketObservation tob ON tob.ticketFk = t.id + LEFT JOIN ticketObservation tob ON tob.ticketFk = t.id AND tob.observationTypeFk = ot.id LEFT JOIN address a ON a.id = t.addressFk LEFT JOIN agencyMode am ON am.id = t.agencyModeFk @@ -70,7 +73,9 @@ module.exports = Self => { const where = filter.where; where['r.id'] = filter.id; - stmt.merge(conn.makeSuffix(filter)); + stmt.merge(conn.makeWhere(filter.where)); + stmt.merge(conn.makeGroupBy('t.id')); + stmt.merge(conn.makeOrderBy(filter.order)); const tickets = await conn.executeStmt(stmt, myOptions); diff --git a/modules/route/front/summary/index.html b/modules/route/front/summary/index.html index 86f558634..a64ad4ff7 100644 --- a/modules/route/front/summary/index.html +++ b/modules/route/front/summary/index.html @@ -10,26 +10,26 @@ - - - - - {{$ctrl.summary.route.worker.user.name}} - @@ -40,35 +40,35 @@ - - - -

- Ticket

-

Ticket @@ -77,45 +77,49 @@ Order - Ticket id - Alias + Street + City + PC + Client + Warehouse Packages - Warehouse - PC - Street + Packaging + Ticket {{ticket.priority | dashIfEmpty}} + {{ticket.street}} + {{ticket.city}} + {{ticket.postalCode}} + + + {{ticket.nickname}} + + + {{ticket.warehouseName}} + {{ticket.packages}} + {{ticket.volume}} + {{ticket.ipt}} - {{ticket.id}} - - {{ticket.nickname}} - - - {{ticket.packages}} - {{ticket.volume}} - {{ticket.warehouseName}} - {{ticket.postalCode}} - {{ticket.street}} - - - + + @@ -123,12 +127,12 @@ - - diff --git a/modules/route/front/tickets/index.html b/modules/route/front/tickets/index.html index dae894ac7..18d6fb160 100644 --- a/modules/route/front/tickets/index.html +++ b/modules/route/front/tickets/index.html @@ -6,9 +6,9 @@ data="$ctrl.tickets" auto-load="true"> - -
@@ -25,18 +25,18 @@ vn-tooltip="Open buscaman" icon="icon-buscaman"> - - - City PC Client + Warehouse Packages + Packaging Ticket @@ -100,8 +102,10 @@ {{::ticket.nickname}} + {{ticket.warehouseName}} {{::ticket.packages}} {{::ticket.volume | number:2}} + {{::ticket.ipt}}
- - @@ -160,7 +164,7 @@
-
- - - \ No newline at end of file +