Topic: Print Journal Entries: coping with multline comments

THe current journal entries report (rep702.php), and possible a few other reports, don't cope with multiline comments in your transactions.
As a quick fix, you can do this kind of modification which will split out the comment lines on the report so you can see them all:

Around line 99 of rep702.php, modifiy the code so it looks like the following:

            $memo = get_comments_string($myrow['type'], $myrow['type_no']);
            // Pete: multline journal display.
            $replines = array();
            if ($memo != '')
            {
                if ($coms == "")
                    $coms = $memo;
                else
                    $coms .= " / ".$memo;
                // turn memo text into multiline array for printing
                $replines = explode("\n",$coms);
            }
            // Print each line of comment separately, rather than a single line
            foreach ($replines as $repline) {
                $rep->TextCol(3,6,$repline);
                $rep->NewLine();
            }

This is a very quick fix, I can't vouch for the quality of it as PDF report modification can be hard, but it should get you going if you desperately need it.

Pete

Re: Print Journal Entries: coping with multline comments

Thanx Pete.

I will have a look at this and incorporate it in core.

Joe

Re: Print Journal Entries: coping with multline comments

Hello again,

it is not necessary to do all the lines that Pete suggested. You can just change line 107 and 108 from

            $rep->TextCol(3, 6, $coms);
            $rep->NewLine(2);

to

            $rep->TextColLines(3, 6, $coms);
            $rep->NewLine();

That will do it.

Is changed in HG repository to go to next minor.

/Joe