Fixed issues with JavaScript handling iwhen trying to create new Line Item