Special characters in Custom Fields -> Invoice Charges -> Field Label

I ran into a strange problem. I am unsure if this is a bug and if so then it may or may not have been fixed. I’m running an older version of Invoice Ninja. I can reproduce it.

If the following two are true then Invoice Ninja will crash:

  • Enter a front slash character into the FIELD LABEL field under INVOICE CHARGES (for example… “FEDEX / SHIPPING CHARGE” and;
  • Select an item from the PRODUCT LIBRARY where the quantity is 1 but the cost is zero dollars ($0.00).

The crash as soon as the item is added to the invoice. Changing the cost of the item in the product library to 0.01 will allow the line item to be entered. Changing the item cost to 0.00 after the invoice is populated may, or may not, allow the invoice to be saved/sent.

Just thought this was strange so i’m sharing in case someone else has a similar issue.

Thanks for letting us know!

I’ll see if I can replicate the problem.

I’m not able to reproduce the problem, it’s possible it’s been fixed.

Which version are you running?

Yeah. If I was sure the problem could be reproduced then I probably would have filed a Github issue. I just wanted to post it in the forums in case someone else came across this weird combination of events leading to a non-responsive browser.

I’m on Kubuntu running Chrome version 56.0.2924.87 (64-bit).
InvoiceNinja.com - v2.5.0.3 | White labeled
PHP 5.6.29 (cli) (built: Dec 10 2016 13:02:08)
CentOS release 6.8 (Final)

I wouldn’t put it past a bug in the non-standard version of PHP we’re running (5.6 isn’t released on CentOS 6.8 as an official package) or maybe some invisible character / markup in the Custom Field.

Have you considered upgrading, I’m happy to help.

It’s pretty easy and you can rollback if there are any problems.

We’ve added a lot of features since then: https://trello.com/b/63BbiVVe/invoice-ninja

We would love to upgrade but honestly we have customized the mess out of Invoice Ninja. We’re a telecommunication’s provider so we have all kinds of hooks into the call routing system, customer management system, customer support system, Authorize.Net eCheck payments and several payment processors not supported by Invoice Ninja like Payza and Payoneer. Upgrading Invoice Ninja would be easy. Fixing the aftermath and staff training would be ugly.

Understood.