mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Workaround for problem with images in PDF on MS Edge
This commit is contained in:
parent
2e0129b279
commit
d534b5595b
@ -31125,7 +31125,7 @@ function GetPdfMake(invoice, javascript, callback) {
|
|||||||
// Add ninja logo to the footer
|
// Add ninja logo to the footer
|
||||||
var dd = JSON.parse(javascript, jsonCallBack);
|
var dd = JSON.parse(javascript, jsonCallBack);
|
||||||
var designId = invoice.invoice_design_id;
|
var designId = invoice.invoice_design_id;
|
||||||
if (!invoice.features.remove_created_by) {
|
if (!invoice.features.remove_created_by && ! isEdge) {
|
||||||
var footer = (typeof dd.footer === 'function') ? dd.footer() : dd.footer;
|
var footer = (typeof dd.footer === 'function') ? dd.footer() : dd.footer;
|
||||||
if (footer) {
|
if (footer) {
|
||||||
if (footer.hasOwnProperty('columns')) {
|
if (footer.hasOwnProperty('columns')) {
|
||||||
@ -31194,14 +31194,14 @@ NINJA.decodeJavascript = function(invoice, javascript)
|
|||||||
// search/replace variables
|
// search/replace variables
|
||||||
var json = {
|
var json = {
|
||||||
'accountName': account.name || ' ',
|
'accountName': account.name || ' ',
|
||||||
'accountLogo': window.accountLogo || blankImage,
|
'accountLogo': ( ! isEdge && window.accountLogo) ? window.accountLogo : blankImage,
|
||||||
'accountDetails': NINJA.accountDetails(invoice),
|
'accountDetails': NINJA.accountDetails(invoice),
|
||||||
'accountAddress': NINJA.accountAddress(invoice),
|
'accountAddress': NINJA.accountAddress(invoice),
|
||||||
'invoiceDetails': NINJA.invoiceDetails(invoice),
|
'invoiceDetails': NINJA.invoiceDetails(invoice),
|
||||||
'invoiceDetailsHeight': (NINJA.invoiceDetails(invoice).length * 16) + 16,
|
'invoiceDetailsHeight': (NINJA.invoiceDetails(invoice).length * 16) + 16,
|
||||||
'invoiceLineItems': NINJA.invoiceLines(invoice),
|
'invoiceLineItems': NINJA.invoiceLines(invoice),
|
||||||
'invoiceLineItemColumns': NINJA.invoiceColumns(invoice),
|
'invoiceLineItemColumns': NINJA.invoiceColumns(invoice),
|
||||||
'invoiceDocuments' : NINJA.invoiceDocuments(invoice),
|
'invoiceDocuments' : isEdge ? [] : NINJA.invoiceDocuments(invoice),
|
||||||
'quantityWidth': NINJA.quantityWidth(invoice),
|
'quantityWidth': NINJA.quantityWidth(invoice),
|
||||||
'taxWidth': NINJA.taxWidth(invoice),
|
'taxWidth': NINJA.taxWidth(invoice),
|
||||||
'clientDetails': NINJA.clientDetails(invoice),
|
'clientDetails': NINJA.clientDetails(invoice),
|
||||||
|
@ -85,7 +85,7 @@ function GetPdfMake(invoice, javascript, callback) {
|
|||||||
// Add ninja logo to the footer
|
// Add ninja logo to the footer
|
||||||
var dd = JSON.parse(javascript, jsonCallBack);
|
var dd = JSON.parse(javascript, jsonCallBack);
|
||||||
var designId = invoice.invoice_design_id;
|
var designId = invoice.invoice_design_id;
|
||||||
if (!invoice.features.remove_created_by) {
|
if (!invoice.features.remove_created_by && ! isEdge) {
|
||||||
var footer = (typeof dd.footer === 'function') ? dd.footer() : dd.footer;
|
var footer = (typeof dd.footer === 'function') ? dd.footer() : dd.footer;
|
||||||
if (footer) {
|
if (footer) {
|
||||||
if (footer.hasOwnProperty('columns')) {
|
if (footer.hasOwnProperty('columns')) {
|
||||||
@ -154,14 +154,14 @@ NINJA.decodeJavascript = function(invoice, javascript)
|
|||||||
// search/replace variables
|
// search/replace variables
|
||||||
var json = {
|
var json = {
|
||||||
'accountName': account.name || ' ',
|
'accountName': account.name || ' ',
|
||||||
'accountLogo': window.accountLogo || blankImage,
|
'accountLogo': ( ! isEdge && window.accountLogo) ? window.accountLogo : blankImage,
|
||||||
'accountDetails': NINJA.accountDetails(invoice),
|
'accountDetails': NINJA.accountDetails(invoice),
|
||||||
'accountAddress': NINJA.accountAddress(invoice),
|
'accountAddress': NINJA.accountAddress(invoice),
|
||||||
'invoiceDetails': NINJA.invoiceDetails(invoice),
|
'invoiceDetails': NINJA.invoiceDetails(invoice),
|
||||||
'invoiceDetailsHeight': (NINJA.invoiceDetails(invoice).length * 16) + 16,
|
'invoiceDetailsHeight': (NINJA.invoiceDetails(invoice).length * 16) + 16,
|
||||||
'invoiceLineItems': NINJA.invoiceLines(invoice),
|
'invoiceLineItems': NINJA.invoiceLines(invoice),
|
||||||
'invoiceLineItemColumns': NINJA.invoiceColumns(invoice),
|
'invoiceLineItemColumns': NINJA.invoiceColumns(invoice),
|
||||||
'invoiceDocuments' : NINJA.invoiceDocuments(invoice),
|
'invoiceDocuments' : isEdge ? [] : NINJA.invoiceDocuments(invoice),
|
||||||
'quantityWidth': NINJA.quantityWidth(invoice),
|
'quantityWidth': NINJA.quantityWidth(invoice),
|
||||||
'taxWidth': NINJA.taxWidth(invoice),
|
'taxWidth': NINJA.taxWidth(invoice),
|
||||||
'clientDetails': NINJA.clientDetails(invoice),
|
'clientDetails': NINJA.clientDetails(invoice),
|
||||||
|
Loading…
Reference in New Issue
Block a user