From 3d96f517905812def1e4418fda498489a24aeb97 Mon Sep 17 00:00:00 2001 From: sigitas Date: Mon, 13 Apr 2015 23:45:09 +0300 Subject: [PATCH] notes and terms added --- public/js/built.js | 14 ++++++++++++++ public/js/pdf.pdfmake.js | 14 ++++++++++++++ public/js/templates/clean.js | 10 +++++++++- 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/public/js/built.js b/public/js/built.js index 1bed530c4164..e4d4072b208e 100644 --- a/public/js/built.js +++ b/public/js/built.js @@ -33347,6 +33347,20 @@ function GetPdfMake(invoice, javascript, callback) { return; } +function notesAndTerms(invoice) +{ + var text = []; + if (invoice.public_notes) { + text.push(invoice.public_notes); + } + + if (invoice.terms) { + text.push({text:invoiceLabels.terms, style:'bold'}); + text.push(invoice.terms); + } + + return text; +} function invoiceLines(invoice) { var grid = diff --git a/public/js/pdf.pdfmake.js b/public/js/pdf.pdfmake.js index 0e5510d279f1..c675b1dffd49 100644 --- a/public/js/pdf.pdfmake.js +++ b/public/js/pdf.pdfmake.js @@ -6,6 +6,20 @@ function GetPdfMake(invoice, javascript, callback) { return; } +function notesAndTerms(invoice) +{ + var text = []; + if (invoice.public_notes) { + text.push(invoice.public_notes); + } + + if (invoice.terms) { + text.push({text:invoiceLabels.terms, style:'bold'}); + text.push(invoice.terms); + } + + return text; +} function invoiceLines(invoice) { var grid = diff --git a/public/js/templates/clean.js b/public/js/templates/clean.js index faba9f2d6f24..abb0c75e81f8 100644 --- a/public/js/templates/clean.js +++ b/public/js/templates/clean.js @@ -89,7 +89,15 @@ var dd = { return '#D8D8D8'; } }, - } + }, + { + columns: [ + notesAndTerms(invoice), + { + text: "" + } + ] + }, ], defaultStyle: { font: 'sans'