diff --git a/public/js/script.js b/public/js/script.js index 560f79fdbc..47c4e16f10 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -956,8 +956,8 @@ function GetReportTemplate1 (invoice,checkMath) var headerRight = 150; var accountTop = 30; var marginLeft = 180; - var rowHeight = 10; - var headerTop = 125; //height of HEADER //should be dynamic ! + var rowHeight = 16; + var headerTop = 120; //height of HEADER //should be dynamic ! var descriptionLeft = 162; @@ -1041,7 +1041,7 @@ function GetReportTemplate1 (invoice,checkMath) //set default style for report doc.setFont('Helvetica',''); - doc.setFontSize(7); + doc.setFontSize(9); //---------------------------------------------------------------------------------------------------- @@ -1082,33 +1082,54 @@ function GetReportTemplate1 (invoice,checkMath) var left = marginLeft; - doc.setFontSize(7); + + + doc.setFontSize(9); + + var MaxLen=0; + + SetPdfColor('LightBlue',doc); if (account.name) { y += rowHeight; doc.text(left, y, account.name); + + + + + test=(doc.getStringUnitWidth(account.name) * doc.internal.getFontSize()); + if (MaxLen3) + if (terms ) + { + + //GlobalY=GlobalY+100; + length=doc.splitTextToSize( terms, 200).length; - FontSize=10; + FontSize=9; var h=length*FontSize; //check do we need to go to next page @@ -1622,20 +1682,24 @@ y2=GlobalY; SetPdfColor('Black',doc); doc.text(40, GlobalY, terms); GlobalY=GlobalY+h; - + GlobalY=GlobalY+20; } + + + if (lengthNotes>3) if (public_notes ) { - //GlobalY=GlobalY+100; + length=doc.splitTextToSize( public_notes, 200).length; - FontSize=10; + FontSize=9; var h=length*FontSize; //check do we need to go to next page MinHeight=700; if (GlobalY+h > MinHeight) { GlobalY=Report1AddNewPage(invoice,account,doc); + GlobalY=GlobalY+20; } SetPdfColor('Black',doc);