diff --git a/modules/client/front/descriptor/index.html b/modules/client/front/descriptor/index.html index 722802c66..30777bcda 100644 --- a/modules/client/front/descriptor/index.html +++ b/modules/client/front/descriptor/index.html @@ -70,4 +70,35 @@ - \ No newline at end of file + + + +
+
+ From date +
+ + +
+ To date +
+ + +
+
+ + + + +
\ No newline at end of file diff --git a/modules/client/front/descriptor/index.js b/modules/client/front/descriptor/index.js index 332d87deb..3ef1e7616 100644 --- a/modules/client/front/descriptor/index.js +++ b/modules/client/front/descriptor/index.js @@ -2,12 +2,13 @@ import ngModule from '../module'; import Component from 'core/lib/component'; class Controller extends Component { - constructor($element, $) { + constructor($element, $, $httpParamSerializer) { super($element, $); - + this.$httpParamSerializer = $httpParamSerializer; this.moreOptions = [ {name: 'Simple ticket', callback: this.newTicket}, {name: 'Send SMS', callback: this.showSMSDialog}, + {name: 'Send consumer report', callback: this.showConsumerReportDialog} ]; } @@ -63,9 +64,22 @@ class Controller extends Component { }; this.$.sms.open(); } + + showConsumerReportDialog() { + this.$.consumerReportDialog.show(); + } + + sendConsumerReport(response) { + if (response === 'accept') { + const data = {from: this.from, to: this.to, clientId: this.client.id}; + const serializedParams = this.$httpParamSerializer(data); + const url = `api/report/campaign-metrics?${serializedParams}`; + window.open(url); + } + } } -Controller.$inject = ['$element', '$scope']; +Controller.$inject = ['$element', '$scope', '$httpParamSerializer']; ngModule.component('vnClientDescriptor', { template: require('./index.html'), diff --git a/modules/client/front/descriptor/locale/es.yml b/modules/client/front/descriptor/locale/es.yml index 5ae6935d0..293191ec5 100644 --- a/modules/client/front/descriptor/locale/es.yml +++ b/modules/client/front/descriptor/locale/es.yml @@ -1 +1,2 @@ -Simple ticket: Ticket simple \ No newline at end of file +Simple ticket: Ticket simple +Send consumer report: Enviar informe de consumo \ No newline at end of file diff --git a/print/templates/reports/campaign-metrics/campaign-metrics.html b/print/templates/reports/campaign-metrics/campaign-metrics.html index 5e4bc7d08..7a0f30948 100644 --- a/print/templates/reports/campaign-metrics/campaign-metrics.html +++ b/print/templates/reports/campaign-metrics/campaign-metrics.html @@ -57,27 +57,39 @@ - + - - - - - - + +
{{$t('Code')}}{{$t('Code')}} {{$t('Quantity')}} {{$t('Concept')}}
{{sale.itemFk}}{{Math.trunc(sale.subtotal)}} - {{sale.concept}} {{sale.subName | uppercase}} -
- {{sale.tag5}} - {{sale.value5}} - {{sale.tag6}} - {{sale.value6}} - {{sale.tag7}} - {{sale.value7}} -
-