mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Merge bug fixes
This commit is contained in:
parent
239f492311
commit
ea2d58e30f
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -203,6 +203,9 @@ function GetPdfMake(invoice, javascript, callback) {
|
|||||||
|
|
||||||
if (window.accountBackground) {
|
if (window.accountBackground) {
|
||||||
var origBackground = dd.background;
|
var origBackground = dd.background;
|
||||||
|
if (! origBackground) {
|
||||||
|
origBackground = [{"image": window.accountBackground, "alignment": "center"}];
|
||||||
|
}
|
||||||
dd.background = function(currentPage) {
|
dd.background = function(currentPage) {
|
||||||
var allPages = origBackground.length && origBackground[0].pages == 'all';
|
var allPages = origBackground.length && origBackground[0].pages == 'all';
|
||||||
return currentPage == 1 || allPages ? origBackground : false;
|
return currentPage == 1 || allPages ? origBackground : false;
|
||||||
@ -406,9 +409,11 @@ NINJA.decodeJavascript = function(invoice, javascript)
|
|||||||
value = formatMoneyInvoice(value, invoice);
|
value = formatMoneyInvoice(value, invoice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (['$pageNumber', '$pageCount'].indexOf(match) == -1) {
|
||||||
javascript = javascript.replace(match, value);
|
javascript = javascript.replace(match, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return javascript;
|
return javascript;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user