1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

report fixes

This commit is contained in:
alltheworld 2014-03-05 18:40:10 +02:00
parent 41cdbea7f7
commit 03031710d7

View File

@ -1215,11 +1215,8 @@ y2=GlobalY;
Msg='Balance Due';
var TmpMsgX = MsgRightAlign-(doc.getStringUnitWidth(Msg) * doc.internal.getFontSize());
doc.text(TmpMsgX, x, Msg);
SetPdfColor('LightBlue',doc);
AmountText = formatMoney(balance , currencyId);
headerLeft=headerRight+400;
@ -1227,7 +1224,38 @@ y2=GlobalY;
doc.text(AmountX, x, AmountText);
GlobalY=GlobalY+100;
length=doc.splitTextToSize( terms, 200).length;
FontSize=10;
var h=length*FontSize;
//check do we need to go to next page
MinHeight=700;
if (GlobalY+h > MinHeight) {
GlobalY=Report1AddNewPage(invoice,account,doc);
}
SetPdfColor('Black',doc);
doc.text(40, GlobalY, terms);
GlobalY=GlobalY+h;
//GlobalY=GlobalY+100;
length=doc.splitTextToSize( public_notes, 200).length;
FontSize=10;
var h=length*FontSize;
//check do we need to go to next page
MinHeight=700;
if (GlobalY+h > MinHeight) {
GlobalY=Report1AddNewPage(invoice,account,doc);
}
SetPdfColor('Black',doc);
doc.text(40, GlobalY, public_notes);
GlobalY=GlobalY+h;