Invoice downloading - Naming difference #2014

This commit is contained in:
Hillel Coren 2018-04-15 15:13:40 +03:00
parent 748c1d38fb
commit a0ad0b2681
2 changed files with 2 additions and 2 deletions

View File

@ -1268,7 +1268,7 @@
if (!design) return;
var doc = generatePDF(invoice, design, true);
var type = invoice.is_quote ? {!! json_encode(trans('texts.'.ENTITY_QUOTE)) !!} : {!! json_encode(trans('texts.'.ENTITY_INVOICE)) !!};
doc.save(type + '-' + $('#invoice_number').val() + '.pdf');
doc.save(type + '_' + $('#invoice_number').val() + '.pdf');
}
function onRecurrClick() {

View File

@ -324,7 +324,7 @@
try {
var doc = generatePDF(invoice, invoice.invoice_design.javascript, true);
var fileName = invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice;
doc.save(fileName + '-' + invoice.invoice_number + '.pdf');
doc.save(fileName + '_' + invoice.invoice_number + '.pdf');
} catch (exception) {
if (location.href.indexOf('/view/') > 0) {
location.href = location.href.replace('/view/', '/download/');