function quoteFilter() { var companyID = $("select[name='companyID']").val(); var countryID = $("select[name='countryID']").val(); var year = $("select[name='year']").val(); var month = $("select[name='month']").val(); window.location.href = 'https://agent.mpcc.co.uk/quotes/filter/' + companyID + '/' + countryID + '/' + year + '/' + month + '/'; } function quoteReset() { window.location.href = 'https://agent.mpcc.co.uk/quotes/main/'; } function orderFilter() { var companyID = $("select[name='companyID']").val(); var countryID = $("select[name='countryID']").val(); var year = $("select[name='year']").val(); var month = $("select[name='month']").val(); window.location.href = 'https://agent.mpcc.co.uk/orders/filter/' + companyID + '/' + countryID + '/' + year + '/' + month + '/'; } function orderReset() { window.location.href = 'https://agent.mpcc.co.uk/orders/main/'; } function invoiceFilter() { var companyID = $("select[name='companyID']").val(); var countryID = $("select[name='countryID']").val(); var year = $("select[name='year']").val(); var month = $("select[name='month']").val(); window.location.href = 'https://agent.mpcc.co.uk/invoices/filter/' + companyID + '/' + countryID + '/' + year + '/' + month + '/'; } function invoiceReset() { window.location.href = 'https://agent.mpcc.co.uk/invoices/main/'; } function salesbookFilter() { var countryID = $("select[name='countryID']").val(); var year = $("select[name='year']").val(); var month = $("select[name='month']").val(); window.location.href = 'https://agent.mpcc.co.uk/salesbook/month/' + countryID + '/' + year + '/' + month + '/'; } function salesbookReset() { window.location.href = 'https://agent.mpcc.co.uk/salesbook/main/'; } function exportToExcel(name, elt, type, fn, dl) { var wb = XLSX.utils.table_to_book(elt, { sheet: "sheet1" }); return dl ? XLSX.write(wb, { bookType: type, bookSST: true, type: 'base64' }) : XLSX.writeFile(wb, fn || ('MPCC ' + name + '.' + (type || 'xlsx'))); }