1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Fix for client statements #1321

This commit is contained in:
Hillel Coren 2017-02-01 12:39:57 +02:00
parent cc1eee7f4f
commit 4d6c0775f9
3 changed files with 15 additions and 7 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

@ -486,17 +486,25 @@ NINJA.invoiceLines = function(invoice) {
}
NINJA.invoiceDocuments = function(invoice) {
if(!invoice.account.invoice_embed_documents)return[];
if (!invoice.account.invoice_embed_documents) {
return [];
}
var stack = [];
var stackItem = null;
var j = 0;
for (var i = 0; i < invoice.documents.length; i++)addDoc(invoice.documents[i]);
if (invoice.documents) {
for (var i = 0; i < invoice.documents.length; i++) {
addDoc(invoice.documents[i]);
}
}
if (invoice.expenses) {
for (var i = 0; i < invoice.expenses.length; i++) {
var expense = invoice.expenses[i];
for (var j = 0; j < expense.documents.length; j++)addDoc(expense.documents[j]);
for (var j = 0; j < expense.documents.length; j++) {
addDoc(expense.documents[j]);
}
}
}