From ceebb51b54195ec07d42591ec642e5cdb2d1c8ab Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 25 Feb 2014 16:04:00 +0200 Subject: [PATCH] bug fixes --- public/js/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/script.js b/public/js/script.js index e7bd0a6be234..92d5941c8e05 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -762,7 +762,7 @@ function GetReportTemplate2 (invoice,checkMath) } if (account.country) { y += rowHeight; - doc.text(left, y, account.country.name); + doc.text(left, y, account.country ? account.country.name : ''); } //-----------------------------Publish Client Details block-------------------------------------------- @@ -1316,7 +1316,7 @@ function GetReportTemplate1 (invoice,checkMath) doc.setFontType("normal"); - var LineTwo= account.address1+' '+account.address2+account.city+' '+account.country.name; + var LineTwo= account.address1+' '+account.address2+account.city+' '+(account.country ? account.country.name : ''); var AlignLine = MaxWidth-30- (doc.getStringUnitWidth(LineTwo) * doc.internal.getFontSize()); y += rowHeight;