mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +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) {
|
||||
var origBackground = dd.background;
|
||||
if (! origBackground) {
|
||||
origBackground = [{"image": window.accountBackground, "alignment": "center"}];
|
||||
}
|
||||
dd.background = function(currentPage) {
|
||||
var allPages = origBackground.length && origBackground[0].pages == 'all';
|
||||
return currentPage == 1 || allPages ? origBackground : false;
|
||||
@ -406,7 +409,9 @@ NINJA.decodeJavascript = function(invoice, javascript)
|
||||
value = formatMoneyInvoice(value, invoice);
|
||||
}
|
||||
|
||||
javascript = javascript.replace(match, value);
|
||||
if (['$pageNumber', '$pageCount'].indexOf(match) == -1) {
|
||||
javascript = javascript.replace(match, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user