A cleaner who claimed he was owed money by a Watford restaurant owner broke in when he was drunk and stole £100.
Simon Alcott, 44, kicked his way in through the back door of the shop at 40 Market Street and raided the till.
Prosecutor Duncan O'Donnell told St Albans crown court on Wednesday that the owner had finished refurbishing the restaurant three days earlier and had hired contract cleaners.
Alcott was recognised from the restaurant's CCTV system and voluntarily went to Watford police station. He told the officers he was drunk and took only £76 to pay his bills. He said he had bought himself a breakfast with the money after the break-in.
He told the police he was owed money for the cleaning work he had done - something which the prosecutor said was disputed.
Alcott of Vicarage Road, Watford, pleaded guilty to burgling the restaurant on May 11 this year. He had 29 convictions for 47 offences, including armed robbery and supplying heroin.
Defence barrister Jodie-Jane Hitchcock said: "It was an impulsive offence with little planning or sophistication. It was foolish and committed in drink. He said he had not been paid for the work he had done and misguidedly took it into his own hands."
Ms Hitchcock said he had moved to new accommodation away from associates and was tackling his drug taking. She said he was on Job Seekers' Allowance, but wanted to work.
Recorder Nerys Jefford QC told him: "You are 44 years old and have been in trouble since you were 16 or 17. You have taken steps to combat your drug use, which has been the cause of your criminal behaviour."
She said the only appropriate sentence was to send him immediately to jail for 16 weeks.
As he was led away to the cells, Alcott said: "You try to work and you get stuffed by people who don't pay you."