Duncan had stopped drinking since the incident on July 15 in any case, Ms Scally said.
''Alcohol had a significant bearing in that they had run out of money and had committed this offending to purchase more alcohol,'' she said.
Duncan had been drinking with a friend on the day but by 10pm they had run out of alcohol.
The defendant had worked at the Kowhai Farms potato factory in Stirling for four years when he decided to fleece his employer.
Once at the premises, he removed a security bar, climbed through the window and made his way to the office.
After breaking into a metal cabinet, Duncan took $760 from a cash tin.
That was not enough.
He took a key, unlocked the main factory and swiped another $40 from a different cash box.
Within hours, a manager got to work, called police and upon reviewing CCTV footage quickly found Duncan was responsible for the break-in.
When speaking to police, he admitted it was a ''dumb thing to do''.
Judge Turner said the defendant had a different explanation for the offending when he spoke to Probation.
Duncan said he had been trying to get his manager in trouble because their working relationship had deteriorated.
He had a limited criminal history, the judge said. A conviction for theft in 2015 was of prime relevance.
As well as the community detention term, Judge Turner sentenced him to six months' supervision and ordered him to repay the $800 he took.
rob.kidd@odt.co.nz