String debitStr = (cashFlow.getToPay(date).toString().equals("0,00")) ? "" : "R$ " + cashFlow.getToPay(date).getFormatedValue();
totalStr = (total.toString().equals("0,00")) ? "" : "R$ " + total.getFormatedValue();
page.addElement(drawGrayRectangle(posX, posY, 535, 20, 3));
if (!withDetail){
page.addElement(insertRightText(date.getFormatedDate(), posX+5, posY+5, 165));
page.addElement(divTitleLine(posX+175));
page.addElement(insertRightText(creditStr, posX+180, posY+5, 165));
page.addElement(divTitleLine(posX+355));
page.addElement(insertRightText(debitStr, posX+360, posY+5, 165));