You should include the following command at the beginning of your "*.controller.js" (the file which calls the formatter function):
jQuery.sap.require("yourapp.util.Formatter");
You should include the following command at the beginning of your "*.controller.js" (the file which calls the formatter function):
jQuery.sap.require("yourapp.util.Formatter");