+
+ {{::sale.item.name}}
+
+ {{::sale.item.subName}}
+
+ tabindex="-1">
{{::sale.quantity}}
diff --git a/modules/ticket/front/component/index.html b/modules/ticket/front/component/index.html
index f47521e4d..ac109c334 100644
--- a/modules/ticket/front/component/index.html
+++ b/modules/ticket/front/component/index.html
@@ -29,12 +29,15 @@
{{sale.itemFk | zeroFill:6}}
-
+ |
+ {{::sale.item.name}}
+
+ {{::sale.item.subName}}
+
+ tabindex="-1">
|
diff --git a/modules/ticket/front/descriptor-menu/index.html b/modules/ticket/front/descriptor-menu/index.html
index 075b97766..80ad71d5f 100644
--- a/modules/ticket/front/descriptor-menu/index.html
+++ b/modules/ticket/front/descriptor-menu/index.html
@@ -84,6 +84,7 @@
ng-show="$ctrl.isInvoiced"
vn-acl="invoicing"
vn-acl-action="remove"
+ name="regenerateInvoice"
translate>
Regenerate invoice
diff --git a/modules/ticket/front/index/index.html b/modules/ticket/front/index/index.html
index d137d40be..4243ef1ab 100644
--- a/modules/ticket/front/index/index.html
+++ b/modules/ticket/front/index/index.html
@@ -18,12 +18,12 @@
Salesperson
Date
Hour
+ Closure
Alias
Province
State
Zone
Warehouse
- Closure
Total
@@ -86,6 +86,7 @@
{{::ticket.shipped | date: 'HH:mm'}}
+ {{::ticket.zoneLanding | date: 'HH:mm'}}
{{::ticket.warehouse}}
- {{::ticket.zoneLanding | date: 'HH:mm'}}
{{::ticket.total | currency: 'EUR': 2}}
diff --git a/modules/ticket/front/main/index.html b/modules/ticket/front/main/index.html
index 953dc8a6b..8e9af1e12 100644
--- a/modules/ticket/front/main/index.html
+++ b/modules/ticket/front/main/index.html
@@ -2,7 +2,7 @@
vn-id="model"
url="Tickets/filter"
limit="20"
- order="shipped DESC, zoneHour DESC, zoneMinute DESC, clientFk">
+ order="shippedDate DESC, shippedHour ASC, zoneLanding ASC">
-
+
+ {{::sale.item.name}}
+
+ {{::sale.item.subName}}
+
+ tabindex="-1">
{{::sale.quantity}}
diff --git a/modules/ticket/front/sale-tracking/index.html b/modules/ticket/front/sale-tracking/index.html
index 100021f13..4e80b3565 100644
--- a/modules/ticket/front/sale-tracking/index.html
+++ b/modules/ticket/front/sale-tracking/index.html
@@ -8,7 +8,7 @@
auto-load="true">
-
+
@@ -39,12 +39,15 @@
{{sale.itemFk | zeroFill:6}}
-
+
+ {{::sale.item.name}}
+
+ {{::sale.item.subName}}
+
+ tabindex="-1">
{{::sale.quantity}}
diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html
index ed3cbc02b..d7dfa802c 100644
--- a/modules/ticket/front/sale/index.html
+++ b/modules/ticket/front/sale/index.html
@@ -58,8 +58,8 @@
- Id
- Quantity
+ Id
+ Quantity
Item
Price
Disc
@@ -97,7 +97,7 @@
zoom-image="{{::$root.imagePath('catalog', '1600x900', sale.itemFk)}}"
on-error-src/>
-
+
{{sale.itemFk}}
@@ -117,7 +117,7 @@
-
+
{{sale.quantity}}
-
+
+ {{sale.concept}}
+
+ {{::sale.subName}}
+
+ tabindex="-1">
diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js
index 384fd9b5f..f5772b6e5 100644
--- a/modules/ticket/front/sale/index.js
+++ b/modules/ticket/front/sale/index.js
@@ -367,6 +367,7 @@ class Controller extends Section {
notAvailables
};
this.newSMS = {
+ ticketId: this.ticket.id,
destinationFk: this.ticket.clientFk,
destination: phone,
message: this.$t('Product not available', params)
diff --git a/modules/ticket/front/sale/style.scss b/modules/ticket/front/sale/style.scss
index ea7c65385..a55487978 100644
--- a/modules/ticket/front/sale/style.scss
+++ b/modules/ticket/front/sale/style.scss
@@ -23,6 +23,25 @@ vn-ticket-sale {
margin: 3px;
}
}
+ vn-td-editable[vn-fetched-tags] {
+ & text {
+ max-width: 430px;
+ min-width: 150px;
+ & vn-one {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ font-size: 0.75rem;
+ }
+
+ & vn-one:nth-child(2) h3 {
+ color: $color-font-secondary;
+ text-transform: uppercase;
+ line-height: initial;
+ font-size: 0.75rem
+ }
+ }
+ }
+
vn-dialog.edit {
@extend .edit-popover;
diff --git a/modules/ticket/front/search-panel/index.html b/modules/ticket/front/search-panel/index.html
index d9ab2ee91..55611899b 100644
--- a/modules/ticket/front/search-panel/index.html
+++ b/modules/ticket/front/search-panel/index.html
@@ -35,7 +35,7 @@
ng-model="filter.to"
on-change="$ctrl.to = value">
- O
+ Or
{{::sale.quantity}}
-
-
+ {{::sale.item.name}}
+
+ {{::sale.item.subName}}
+
+
+ tabindex="-1">
{{::sale.price | currency: 'EUR':2}}
diff --git a/modules/ticket/front/summary/index.js b/modules/ticket/front/summary/index.js
index 42e5fcb69..714460221 100644
--- a/modules/ticket/front/summary/index.js
+++ b/modules/ticket/front/summary/index.js
@@ -54,18 +54,14 @@ class Controller extends Summary {
}
setOkState() {
- let params = {};
-
- if (this.$params.id)
- params = {ticketFk: this.$params.id};
-
- if (!this.$params.id)
- params = {ticketFk: this.ticket.id};
+ const params = {ticketFk: 'id' in this.ticket ? this.ticket.id : this.$params.id};
params.code = 'OK';
this.$http.post(`TicketTrackings/changeState`, params)
- .then(() => this.reload())
+ .then(() => {
+ if ('id' in this.$params) this.reload();
+ })
.then(() => {
this.vnApp.showSuccess(this.$t('Data saved!'));
});
diff --git a/modules/ticket/front/volume/index.html b/modules/ticket/front/volume/index.html
index 3378b70a1..eb2a07d26 100644
--- a/modules/ticket/front/volume/index.html
+++ b/modules/ticket/front/volume/index.html
@@ -42,12 +42,16 @@
{{sale.itemFk | zeroFill:6}}
-
-
+ {{::sale.item.name}}
+
+ {{::sale.item.subName}}
+
+
+ tabindex="-1">
+
{{::sale.quantity}}
{{::sale.saleVolume.volume | number:3}}
diff --git a/modules/travel/front/main/index.spec.js b/modules/travel/front/main/index.spec.js
index 96d819a6f..6d9db4dc8 100644
--- a/modules/travel/front/main/index.spec.js
+++ b/modules/travel/front/main/index.spec.js
@@ -12,29 +12,38 @@ describe('Travel Component vnTravel', () => {
describe('fetchParams()', () => {
it('should return a range of dates with passed scope days', () => {
- /**
- * Calculates the difference in days between two dates, it also
- * accounts for cases where the two dates in question span a
- * daylight saving time (DST) change.
- *
- * @param {Date} a The start date
- * @param {Date} b The end date
- * @return {Number} The difference in days
- */
- function diffInDays(a, b) {
- const utc1 = Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());
- const utc2 = Date.UTC(b.getFullYear(), b.getMonth(), b.getDate());
- const msInDay = 86400 * 1000;
- return Math.floor((utc2 - utc1) / msInDay);
- }
+ let params = controller.fetchParams({
+ scopeDays: 2
+ });
+ const shippedFrom = new Date();
+ shippedFrom.setHours(0, 0, 0, 0);
+ const shippedTo = new Date(shippedFrom.getTime());
+ shippedTo.setDate(shippedTo.getDate() + params.scopeDays);
+ shippedTo.setHours(23, 59, 59, 999);
- let params = controller.fetchParams({scopeDays: 2});
- const diff = diffInDays(
- params.shippedFrom,
- new Date(params.shippedTo.getTime() + 1)
- );
+ const expectedParams = {
+ shippedFrom,
+ scopeDays: params.scopeDays,
+ shippedTo
+ };
- expect(diff).toEqual(3);
+ expect(params).toEqual(expectedParams);
+ });
+
+ it('should return default value for scope days', () => {
+ let params = controller.fetchParams({
+ scopeDays: 1
+ });
+
+ expect(params.scopeDays).toEqual(1);
+ });
+
+ it('should return the given scope days', () => {
+ let params = controller.fetchParams({
+ scopeDays: 2
+ });
+
+ expect(params.scopeDays).toEqual(2);
});
});
});
diff --git a/modules/travel/front/search-panel/index.html b/modules/travel/front/search-panel/index.html
index afc041f66..8e7f4140d 100644
--- a/modules/travel/front/search-panel/index.html
+++ b/modules/travel/front/search-panel/index.html
@@ -1,6 +1,6 @@
- |