Companies are generally hierarchical systems. By developing the solution on your own initiative, you bypassed that. You should never expect a good reaction from a social system when you break its rules, even if for its own benefit.
More than once, not only did he ask for the money before the date, as upon being denied, he went around in coffeeshops and bars defaming them, telling people they'd stolen from him, etc.
If even individuals can be this inconsistent, we shouldn't be surprised that companies - composed of multiple private interests, as many as their employees and board members - exhibit similar behaviors.