0
1
Fork 0
hedera-web-mindshore/forms/ecomerce/invoices/index.js

33 lines
634 B
JavaScript
Raw Normal View History

2022-11-16 01:44:39 +00:00
import './style.scss';
2015-09-03 23:28:07 +00:00
2022-11-16 01:44:39 +00:00
export default new Class({
Extends: Hedera.Form,
2022-11-16 01:44:39 +00:00
Template: require('./ui.xml'),
2016-07-22 20:00:27 +00:00
2022-11-16 01:46:44 +00:00
donwloadRenderer(column, invoice) {
2022-05-28 15:49:46 +00:00
var invoiceId = invoice.$.id;
2022-05-28 15:49:46 +00:00
if (invoice.$.hasPdf && invoiceId) {
var params = {
srv: 'rest:dms/invoice',
invoice: invoiceId,
2022-05-20 12:20:34 +00:00
access_token: this.conn.token
};
Object.assign(column, {
tip: _('Download PDF'),
disabled: false,
icon: 'download',
2019-08-02 10:48:41 +00:00
href: '?'+ Vn.Url.makeUri(params)
});
} else
Object.assign(column, {
tip: _('Request the invoice to your salesperson'),
disabled: true,
icon: 'warning',
href: null
});
2015-09-03 23:28:07 +00:00
}
});