Your error clearly states that it did happen in TRA_BrokenSalesPROCV2
How you think providing the TRA_BrokenSalesPROCV6 noodles will help to identify the problem, it does not use the SUBSTRING function itself?
Please provide text of TRA_BrokenSalesPROCV2.
This error is due to the negative number is passed as third (length) parameter to this function.