This commit is contained in:
alltheworld 2014-03-09 03:23:05 +02:00
parent a035387d86
commit c17b8ed40f

View File

@ -1082,33 +1082,54 @@ function GetReportTemplate1 (invoice,checkMath)
var left = marginLeft; var left = marginLeft;
doc.setFontSize(7);
doc.setFontSize(9);
var MaxLen=0;
SetPdfColor('LightBlue',doc); SetPdfColor('LightBlue',doc);
if (account.name) { if (account.name) {
y += rowHeight; y += rowHeight;
doc.text(left, y, account.name); doc.text(left, y, account.name);
test=(doc.getStringUnitWidth(account.name) * doc.internal.getFontSize());
if (MaxLen<test)MaxLen=test;
} }
SetPdfColor('GrayText',doc); SetPdfColor('GrayText',doc);
doc.setFontSize(7); //doc.setFontSize(9);
if (account.work_email) { if (account.work_email) {
y += rowHeight; y += rowHeight;
doc.text(left, y, account.work_email); doc.text(left, y, account.work_email);
test=(doc.getStringUnitWidth(account.work_email) * doc.internal.getFontSize());
if (MaxLen<test)MaxLen=test;
} }
if (account.work_phone) { if (account.work_phone) {
y += rowHeight; y += rowHeight;
doc.text(left, y, account.work_phone); doc.text(left, y, account.work_phone);
test=(doc.getStringUnitWidth(account.work_phone) * doc.internal.getFontSize());
if (MaxLen<test)MaxLen=test;
} }
var HeaderMarginThirdColumn=90;//should be dynamic and dependent on 1st image and 2nd column width var HeaderMarginThirdColumn=MaxLen+30;//should be dynamic and dependent on 1st image and 2nd column width
var y = accountTop; var y = accountTop;
var left = marginLeft+HeaderMarginThirdColumn; var left = marginLeft+HeaderMarginThirdColumn;