diff --git a/modules/monitor/back/methods/sales-monitor/salesFilter.js b/modules/monitor/back/methods/sales-monitor/salesFilter.js
index 1b56d87f78..cec8026ffd 100644
--- a/modules/monitor/back/methods/sales-monitor/salesFilter.js
+++ b/modules/monitor/back/methods/sales-monitor/salesFilter.js
@@ -196,7 +196,6 @@ module.exports = Self => {
t.id,
t.shipped,
CAST(DATE(t.shipped) AS CHAR) AS shippedDate,
- HOUR(t.shipped) AS shippedHour,
t.nickname,
t.refFk,
t.routeFk,
@@ -218,11 +217,10 @@ module.exports = Self => {
u.name AS userName,
c.salesPersonFk,
z.hour AS zoneLanding,
- HOUR(z.hour) AS zoneHour,
- MINUTE(z.hour) AS zoneMinute,
z.name AS zoneName,
z.id AS zoneFk,
- CAST(z.hour AS CHAR) AS hour,
+ th.preparationHour,
+ TIME_FORMAT(z.hour, '%H:%i') AS theoreticalhour,
TIME_FORMAT(zed.etc, '%H:%i') AS practicalHour
FROM ticket t
LEFT JOIN invoiceOut io ON t.refFk = io.ref
@@ -236,7 +234,11 @@ module.exports = Self => {
LEFT JOIN client c ON c.id = t.clientFk
LEFT JOIN worker wk ON wk.id = c.salesPersonFk
LEFT JOIN account.user u ON u.id = wk.userFk
- LEFT JOIN zoneEstimatedDelivery zed ON zed.zoneFk = t.zoneFk`);
+ LEFT JOIN zoneEstimatedDelivery zed ON zed.zoneFk = t.zoneFk
+ JOIN (
+ SELECT t.id, TIME_FORMAT(t.shipped, '%H:%i') AS preparationHour
+ FROM ticket AS t
+ ) AS th ON th.id = t.id`);
if (args.orderFk) {
stmt.merge({
diff --git a/modules/monitor/front/index/tickets/index.html b/modules/monitor/front/index/tickets/index.html
index 82adf27656..4e8bf0e470 100644
--- a/modules/monitor/front/index/tickets/index.html
+++ b/modules/monitor/front/index/tickets/index.html
@@ -1,31 +1,28 @@
-
+ order="shippedDate DESC, preparationHour ASC, zoneLanding ASC, id">
-
@@ -37,8 +34,8 @@
Client
Salesperson
Date
- Prep.
- Theoretical
+ Prep.
+ Theoretical
Practical
Province
State
@@ -48,61 +45,37 @@
-
-
+
-
+
-
+
-
-
+
-
+
-
{{::ticket.nickname}}
-
+
{{::ticket.userName | dashIfEmpty}}
@@ -116,23 +89,16 @@
{{::ticket.practicalHour | date: 'HH:mm'}}
{{::ticket.province}}
-
+
{{::ticket.refFk}}
-
+
{{::ticket.state}}
-
{{::ticket.zoneName | dashIfEmpty}}
@@ -143,70 +109,48 @@
-
+ }" vn-tooltip="Go to lines" icon="icon-lines">
-
+
-
+
-
+
-
+
-
+
-
+
-
+
Filter by selection
-
+
Exclude selection
-
+
Remove filter
-
+
Remove all filters
-
+
Copy value
-
+
\ No newline at end of file
diff --git a/modules/monitor/front/index/tickets/index.js b/modules/monitor/front/index/tickets/index.js
index d8832d1b54..a224ecac63 100644
--- a/modules/monitor/front/index/tickets/index.js
+++ b/modules/monitor/front/index/tickets/index.js
@@ -68,8 +68,12 @@ export default class Controller extends Section {
return {'c.salesPersonFk': value};
case 'provinceFk':
return {'a.provinceFk': value};
- case 'hour':
+ case 'theoreticalHour':
return {'z.hour': value};
+ case 'practicalHour':
+ return {'zed.etc': value};
+ case 'preparationHour':
+ return {'th.preparationHour': value};
case 'shipped':
return {'t.shipped': {
between: this.dateRange(value)}