Steven Burke, 44, received 100 times his weekly wage after Phil Gledall, his boss at Croft Farm Construction, punched in too many digits and put the decimal point in the wrong place when paying him for a week of labour work.
Instead of receiving £446.60, Burke received £44,660.
But rather than declaring the mistake, Burke, from Scarborough, ignored Mr Gledall’s urgent phone calls and decided to spend the cash on a life of luxury.
On January 29, the same night be received the money, Burke spent £12,600 on the Coral betting website.
Prosecutor Shyam Soni told York Crown Court: “He also bought Audi A4 car for £2,000 - but it broke down the same day he bought it.
“It was taken into the garage to be fixed - but the defendant could not afford to pay the bill because he had no money when the car was ready to be picked up.”
Today Burke was spared jail by Judge Thomas Bayliss QC, who instead suspended a four-month sentence for a year.
He ran out of court smiling and laughing as he spoke on his mobile phone.
The judge said: “This was blatant dishonesty - it wasn’t fraudulent but it was very opportunistic.
“When Mr Gledall tried to contact you of course he could not find you, could he?
“And when the bank tried to get the money back from you - they could only retrieve £15K because you had spent a large amount of it, hadn’t you?”
The prosecutor told the court: “On January 12, 2016 the defendant did some labouring work for Croft Farm Construction.
“This was a three weeks project and in the second week Mr Burke presented a cash invoice for £446.60.
“This was paid by one of the bosses, Phil Gledall, at Croft Farm Construction.
“Mr Gledall put the decimal point in the wrong place and paid £44,660.
“On noticing the mistake straight away Mr Gledall tried to contact the defendant but he did not respond or answer any of his calls or emails.”
Speaking about what Burke spent the money on, Mr Soni said: “The money was spent on gambling, a car, drugs, a watch and a gold chain.
“The majority of the money was spent on the first night.
“This was approximately £12,600 on the betting site Coral.”
Barclays Bank tried to retrieve the money on March 10, 2016, but only could get £15,930.44, because Burke had spent the rest.
The defendant turned himself in to police on May 5 after officers tried to find him at a previous address he had given to his agency employer.
The court heard Burke had gambling problems in the past.
Defending Burke, Martin Semper said: “This man is of 44 years of age and has no previous convictions for dishonesty and is willing to do unpaid work.”
The court’s probation officer Patrick Thornber said that Burke would able to undertake unpaid work and was “a fine and fit worker”.
Burke had previously admitted wrongful credit at Scarborough Magistrates Court.
Burke, who sported a dark jumper over a checked shirt, was also ordered to undergo 100 hours of unpaid work within a year.
He declined to comment on the case as he left York Crown Court in a hurry, smiling.
Croft Farm Construction boss Phil Gledall said he was “disappointed” that Burke didn’t receive an immediate custodial sentence.
Speaking about the outcome of Burke’s sentencing hearing, Mr Gledall said: “This is not I wanted to hear - I thought he would have got an immediate jail sentence.”
Burke will face a Proceeds of Crime Hearing at a later date.