hedera-web/forms/ecomerce/invoices/invoices.js

35 lines
547 B
JavaScript
Raw Normal View History

2015-09-03 23:28:07 +00:00
2016-09-26 09:28:47 +00:00
Hedera.Invoices = new Class
2015-09-03 23:28:07 +00:00
({
2016-09-26 09:28:47 +00:00
Extends: Hedera.Form
2016-07-22 20:00:27 +00:00
2017-10-10 11:58:25 +00:00
,activate: function ()
{
var params = this.params;
if (!params.$.from)
{
var from = new Date ();
from.setDate (from.getDate () - 30);
from.setHours (0, 0, 0, 0);
params.assign ({from: from});
}
}
2015-09-03 23:28:07 +00:00
,onDownloadClick: function (column, invoiceId)
{
if (!invoiceId)
return;
2016-08-30 07:43:47 +00:00
var params = {
2017-11-02 08:23:55 +00:00
srv: 'rest:dms/invoice'
,invoice: invoiceId
,token: this.conn.token
2016-08-30 07:43:47 +00:00
};
var url = '?'+ Vn.Url.makeUri (params);
2015-09-03 23:28:07 +00:00
window.open (url, '_blank');
}
});