How can find the code that fire when bulk sales invoice for next status in its workflow

You can define these functions in your custom file by overriding them.
https://frappeframework.com/docs/user/en/basics/doctypes/controllers