- {{::sale.item.name}}
+ {{::sale.concept}}
{{::sale.item.subName}}
diff --git a/modules/ticket/front/summary/index.js b/modules/ticket/front/summary/index.js
index 60394b5b3..9d161f63e 100644
--- a/modules/ticket/front/summary/index.js
+++ b/modules/ticket/front/summary/index.js
@@ -59,13 +59,12 @@ class Controller extends Summary {
this.$.invoiceOutDescriptor.show(event.target, this.summary.invoiceOut.id);
}
- changeState(value) {
+ state(value) {
const params = {
ticketFk: 'id' in this.ticket ? this.ticket.id : this.$params.id,
code: value
};
-
- this.$http.post(`TicketTrackings/changeState`, params)
+ this.$http.post(`Tickets/state`, params)
.then(() => {
if ('id' in this.$params) this.reload();
})
diff --git a/modules/ticket/front/summary/index.spec.js b/modules/ticket/front/summary/index.spec.js
index 599da73ae..6837bfd54 100644
--- a/modules/ticket/front/summary/index.spec.js
+++ b/modules/ticket/front/summary/index.spec.js
@@ -43,15 +43,15 @@ describe('Ticket', () => {
});
});
- describe('changeState()', () => {
+ describe('state()', () => {
it('should change the state', () => {
jest.spyOn(controller.vnApp, 'showSuccess');
const value = 'myTicketState';
let res = {id: 1, nickname: 'myNickname'};
$httpBackend.when('GET', `Tickets/1/summary`).respond(200, res);
- $httpBackend.expectPOST(`TicketTrackings/changeState`).respond(200, 'ok');
- controller.changeState(value);
+ $httpBackend.expectPOST(`Tickets/state`).respond(200, 'ok');
+ controller.state(value);
$httpBackend.flush();
expect(controller.vnApp.showSuccess).toHaveBeenCalledWith('Data saved!');
diff --git a/modules/ticket/front/tracking/edit/index.html b/modules/ticket/front/tracking/edit/index.html
index bff8e71b1..47f367007 100644
--- a/modules/ticket/front/tracking/edit/index.html
+++ b/modules/ticket/front/tracking/edit/index.html
@@ -1,4 +1,4 @@
-
+
{
+ this.$http.post(`Tickets/state`, this.params).then(() => {
this.$.watcher.updateOriginalData();
this.card.reload();
this.vnApp.showSuccess(this.$t('Data saved!'));
diff --git a/modules/ticket/front/tracking/edit/index.spec.js b/modules/ticket/front/tracking/edit/index.spec.js
index 1ba5912b5..9d9aa7983 100644
--- a/modules/ticket/front/tracking/edit/index.spec.js
+++ b/modules/ticket/front/tracking/edit/index.spec.js
@@ -61,7 +61,7 @@ describe('Ticket', () => {
jest.spyOn(controller.vnApp, 'showSuccess');
jest.spyOn(controller.$state, 'go');
- $httpBackend.expectPOST(`TicketTrackings/changeState`, controller.params).respond({});
+ $httpBackend.expectPOST(`Tickets/state`, controller.params).respond({});
controller.onSubmit();
$httpBackend.flush();
diff --git a/modules/worker/back/models/operator.json b/modules/worker/back/models/operator.json
index 2417078e1..6da3945fc 100644
--- a/modules/worker/back/models/operator.json
+++ b/modules/worker/back/models/operator.json
@@ -33,6 +33,16 @@
"type": "belongsTo",
"model": "Sector",
"foreignKey": "sectorFk"
+ },
+ "train": {
+ "type": "belongsTo",
+ "model": "Train",
+ "foreignKey": "trainFk"
+ },
+ "printer": {
+ "type": "belongsTo",
+ "model": "Printer",
+ "foreignKey": "labelerFk"
}
}
}
diff --git a/modules/worker/front/time-control/index.js b/modules/worker/front/time-control/index.js
index a60c71589..0a955c586 100644
--- a/modules/worker/front/time-control/index.js
+++ b/modules/worker/front/time-control/index.js
@@ -404,7 +404,7 @@ class Controller extends Section {
});
}
- changeState(state, reason) {
+ state(state, reason) {
this.state = state;
this.reason = reason;
this.repaint();
diff --git a/package-lock.json b/package-lock.json
index c3f88bc2c..5bf7a2cb1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "salix-back",
- "version": "23.42.01",
+ "version": "23.46.01",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "salix-back",
- "version": "23.42.01",
+ "version": "23.46.01",
"license": "GPL-3.0",
"dependencies": {
"axios": "^1.2.2",
diff --git a/package.json b/package.json
index 3320705f5..b1539f9a0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "salix-back",
- "version": "23.42.01",
+ "version": "23.46.01",
"author": "Verdnatura Levante SL",
"description": "Salix backend",
"license": "GPL-3.0",
diff --git a/print/templates/reports/invoice/invoice.js b/print/templates/reports/invoice/invoice.js
index 1c9965d3b..b26472b08 100755
--- a/print/templates/reports/invoice/invoice.js
+++ b/print/templates/reports/invoice/invoice.js
@@ -7,6 +7,7 @@ module.exports = {
mixins: [vnReport],
async serverPrefetch() {
this.invoice = await this.findOneFromDef('invoice', [this.reference]);
+
this.checkMainEntity(this.invoice);
this.client = await this.findOneFromDef('client', [this.reference]);
this.taxes = await this.rawSqlFromDef(`taxes`, [this.reference]);