BambooInvoice Forums

Description see’s code…

 
Total Posts: 15

Was using an example for a user in their invoice and found the following

entered the path… start > run > \\server\netlogon\file.vbs

The returned text was this

start run \\server
etlogon\file
.vbs 

saw the “\n” as a carriage return

Total Posts: 2339

?

Total Posts: 15

humm…. in the text area I entered this:
entered the path… start > run > \\server\netlogon\file.vbs

When I hit save / apply it removed the \n and placed a carriage return.  “code” box shows the result after hitting apply.

Total Posts: 2339

What page of Bamboo are you talking about, and I’m sorry but I still have no idea what you’re referring to.

Total Posts: 15

Okay…

Creating an invoice…

First line.

qty= 1
Text description area of the charge = Update server… if problem happens again type this mr. customer “\\server\netlogon\logon.vbs” this will fix the issue.
Amount per hour = 100

The text decribing the charge.  I enter the above and when I save the charge on that invoice it get the the above.


Here is the process!
start a new invoice
put what ever qty value you want
in the description of work performed paste this line into it:
Update server… if problem happens again type this mr. customer “\\server\netlogon\logon.vbs” this will fix the issue.
Place what ever $$‘s to it that you like
HIT SAVE Invoice.

This line gets read as code not just a text box:
\\server\netlogon\logon.vbs

and then breaks at the \n as if it were code.  example /n

Total Posts: 2339

Is the forum changing what you are typing? I can add exactly that no problem. test

Total Posts: 41

If you create a invoice item line with a work description that has a string literal ‘\n’ in the text e.g. \\server\new\test this is saved differently.

I assume that the same would happen with a \t embedded as well.

Total Posts: 15

take a second look at your test…

\n caused a carriage return…
What you got

1.00
    

Update server… 
if problem happens again type this mrcustomer "\\server
etlogon\logon.vbs" 
this will
fix the issue
.
    

€100.00 (Not Taxable)
    

€100.00 

What you should have gotten

1.00
    

Update server… 
if problem happens again type this mrcustomer "\\server\netlogon\logon.vbs" this will
fix the issue
.
    

€100.00 (Not Taxable)
    

€100.00 
Total Posts: 15
SteveF - Apr 05, 2009 10:28pm

If you create a invoice item line with a work description that has a string literal ‘\n’ in the text e.g. \\server\new\test this is saved differently.

I assume that the same would happen with a \t embedded as well.

Exactly ... its the regex expressions being accepted in the text / description fields.  I just know it caused this issue for me but other than that its a minor not major bug.  Just have to look closely to see what its actually doing.

the test Derek Did shows the exact same bug for me…

Total Posts: 2339

I see. its from view.php

<td><?php echo auto_typography(str_replace(array('\n''\r'), "\n"$item->work_description));?></td

If you want, you canmake it

<td><?php echo auto_typography($item->work_description);?></td

But there was a specific reason why I had that in there, although it escapes me at the moment. You may need to make the same change in pdf.php