1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 08:51:34 +02: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) { NINJA.invoiceDocuments = function(invoice) {
if(!invoice.account.invoice_embed_documents)return[]; if (!invoice.account.invoice_embed_documents) {
return [];
}
var stack = []; var stack = [];
var stackItem = null; var stackItem = null;
var j = 0; if (invoice.documents) {
for (var i = 0; i < invoice.documents.length; i++)addDoc(invoice.documents[i]); for (var i = 0; i < invoice.documents.length; i++) {
addDoc(invoice.documents[i]);
}
}
if(invoice.expenses){ if (invoice.expenses) {
for (var i = 0; i < invoice.expenses.length; i++) { for (var i = 0; i < invoice.expenses.length; i++) {
var expense = invoice.expenses[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]);
}
} }
} }