1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-19 16:01:34 +02:00

Merge bug fixes

This commit is contained in:
Hillel Coren 2018-07-08 14:33:11 +03:00
parent 239f492311
commit ea2d58e30f
3 changed files with 13 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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,9 +409,11 @@ NINJA.decodeJavascript = function(invoice, javascript)
value = formatMoneyInvoice(value, invoice);
}
if (['$pageNumber', '$pageCount'].indexOf(match) == -1) {
javascript = javascript.replace(match, value);
}
}
}
return javascript;
}