Detective who pretended to work from home sacked