Yes the legalities of what they are doing here should be questioned. It’s very unusually behaviour to charge the company a consultancy fee when you are already on a salary to do a job!