diff --git a/modules/ticket/back/methods/ticket/docuwareDownload.js b/modules/ticket/back/methods/ticket/docuwareDownload.js
index e9b74b1a9..7084bbdd4 100644
--- a/modules/ticket/back/methods/ticket/docuwareDownload.js
+++ b/modules/ticket/back/methods/ticket/docuwareDownload.js
@@ -32,6 +32,14 @@ module.exports = Self => {
});
Self.docuwareDownload = async id => {
+ const models = Self.app.models;
+ const docuwareInfo = await models.Docuware.findOne({
+ where: {
+ code: 'deliveryNote',
+ action: 'find'
+ }
+ });
+
const filter = {
condition: [
{
@@ -50,6 +58,6 @@ module.exports = Self => {
}
]
};
- return Self.app.models.Docuware.download(id, 'deliveryNote', filter);
+ return models.Docuware.download(id, 'deliveryNote', filter);
};
};
diff --git a/modules/ticket/back/models/ticket-methods.js b/modules/ticket/back/models/ticket-methods.js
index c37337253..14cb104be 100644
--- a/modules/ticket/back/models/ticket-methods.js
+++ b/modules/ticket/back/models/ticket-methods.js
@@ -42,4 +42,5 @@ module.exports = function(Self) {
require('../methods/ticket/expeditionPalletLabel')(Self);
require('../methods/ticket/saveSign')(Self);
require('../methods/ticket/invoiceTickets')(Self);
+ require('../methods/ticket/docuwareDownload')(Self);
};
diff --git a/modules/ticket/front/descriptor-menu/index.js b/modules/ticket/front/descriptor-menu/index.js
index 360d93564..d1f39fd19 100644
--- a/modules/ticket/front/descriptor-menu/index.js
+++ b/modules/ticket/front/descriptor-menu/index.js
@@ -3,10 +3,11 @@ import Section from 'salix/components/section';
import './style.scss';
class Controller extends Section {
- constructor($element, $, vnReport, vnEmail) {
+ constructor($element, $, vnReport, vnEmail, vnFile) {
super($element, $);
this.vnReport = vnReport;
this.vnEmail = vnEmail;
+ this.vnFile = vnFile;
}
get ticketId() {
@@ -322,7 +323,7 @@ class Controller extends Section {
}
docuwareDownload() {
- this.vnFile.download(`api/Ticket/${this.ticket.id}/docuwareDownload`);
+ this.vnFile.download(`api/Tickets/${this.ticket.id}/docuwareDownload`);
}
setTicketWeight(weight) {
@@ -335,7 +336,7 @@ class Controller extends Section {
}
}
-Controller.$inject = ['$element', '$scope', 'vnReport', 'vnEmail'];
+Controller.$inject = ['$element', '$scope', 'vnReport', 'vnEmail', 'vnFile'];
ngModule.vnComponent('vnTicketDescriptorMenu', {
template: require('./index.html'),
diff --git a/modules/worker/front/pbx/index.js b/modules/worker/front/pbx/index.js
index d37f6f7d8..3b6443d3c 100644
--- a/modules/worker/front/pbx/index.js
+++ b/modules/worker/front/pbx/index.js
@@ -5,7 +5,7 @@ class Controller extends Section {
onSubmit() {
const sip = this.worker.sip;
const params = {
- userFk: this.worker.userFk,
+ userFk: this.worker.id,
extension: sip.extension
};
this.$.watcher.check();
diff --git a/print/templates/reports/entry-order/sql/supplier.sql b/print/templates/reports/entry-order/sql/supplier.sql
index 11a2bc602..81ed7e883 100644
--- a/print/templates/reports/entry-order/sql/supplier.sql
+++ b/print/templates/reports/entry-order/sql/supplier.sql
@@ -8,4 +8,4 @@ SELECT
FROM supplier s
JOIN entry e ON e.supplierFk = s.id
LEFT JOIN province p ON p.id = s.provinceFk
-WHERE e.id = ?
\ No newline at end of file
+WHERE e.id = ?
diff --git a/print/templates/reports/invoiceIn/invoiceIn.html b/print/templates/reports/invoiceIn/invoiceIn.html
index 8f072947f..a86fd42b0 100644
--- a/print/templates/reports/invoiceIn/invoiceIn.html
+++ b/print/templates/reports/invoiceIn/invoiceIn.html
@@ -32,6 +32,7 @@
{{invoice.name}}
{{invoice.postalAddress}}
{{invoice.postcodeCity}}
+ {{invoice.postCode}}, {{invoice.city}}, ({{invoice.province}})
{{$t('fiscalId')}}: {{invoice.nif}}
{{$t('phone')}}: {{invoice.phone}}
diff --git a/print/templates/reports/invoiceIn/sql/invoice.sql b/print/templates/reports/invoiceIn/sql/invoice.sql
index dae979011..82eeebce0 100644
--- a/print/templates/reports/invoiceIn/sql/invoice.sql
+++ b/print/templates/reports/invoiceIn/sql/invoice.sql
@@ -4,6 +4,9 @@ SELECT
i.issued,
s.name,
s.street AS postalAddress,
+ s.city,
+ s.postCode,
+ pr.name province,
s.nif,
s.phone,
p.name payMethod
@@ -11,4 +14,5 @@ SELECT
JOIN supplier s ON s.id = i.supplierFk
JOIN company c ON c.id = i.companyFk
JOIN payMethod p ON p.id = s.payMethodFk
+ LEFT JOIN province pr ON pr.id = s.provinceFk
WHERE i.id = ?