I create form " receipt voucher " and create the template with the same name, to print it as PDF, As the image.
How can I link them and Print the data
How can I link them and Print the data
setup: function () {
Dep.prototype.setup.call(this);
this.dropdownItemList.push({
name: 'printPdf',
label: 'Print to PDF'
});
}
actionPrintPdf: function () {
this.createView('pdfTemplate', 'Modals.SelectTemplate', {
entityType: this.model.name
}, function (view) {
view.render();
this.listenToOnce(view, 'select', function (model) {
window.open('?entryPoint=pdf&entityType='+this.model.name+'&entityId='+this.model.id+'&templateId=' + model.id, '_blank');
}, this);
}.bind(this));
},
Comment