A woman has admitted she embezzled more than £100,000 from a care home company which led to up to five people losing their jobs.
Sarah McGartland, 51, transferred £102,398 of Harveys Healthcare cash into both her own and her husband's accounts over 11 months.
But she was caught when a director of the firm carried out an audit.
As well as the job losses the company has downsized as a result of McGartland's crime.
She pleaded guilty to embezzling the money between January and November 2015 from the company, which was based in Ibrox, Glasgow.
The court heard she was jailed for six months in 2010 for forgery and uttering.
Harveys Healthcare is a care home company who look after elderly residents, mostly for Dumfries and Galloway Council, and at the time had around 40 residents.
Gambling addict McGartland, of Ibrox, Glasgow, was an accounts clerk for them for 13 months, including most of 2015.
Part of her duties were filling out invoices to ensure any money owed was paid, which was then authorised by one of the directors, Bijay Kumar.
He carried out an audit in November 2015 after noticing anomalies with the company account.
Procurator fiscal depute Pat Callender said: "He compared the known bank details on the HMRC request for payment and found that the usual sort code and account numbers for HMRC had been altered.
"And, in fact matched the details of the bank account where the accused's wages were paid into."
He investigated further into the company accounts and noticed four particular account numbers reappearing although the payee names were different.
These four accounts were McGartland's.
The bank later confirmed details of each of the four payments made in to the accounts.
Mr Kumar realised that when he authorised payments he was only checking the payee name and not the verified bank account or sort code information.
When confronted, McGartland admitted putting the money in to her accounts.
She was detained and interviewed by police and said she had four accounts including two of her husband's that he didn't check.
She said she was in charge of online bill payments and changed the details to her own but kept the payee details the same so as not to rouse suspicion.
Miss Callender added: "The embezzlement affected the company's working capital with the effect that that they could not maintain improvements, leading to resident numbers dropping from 40 or 41 to 29 and to four or five staff losing their jobs."
Defence lawyer Alan Gravelle told the court that his client has a gambling addiction and had lost £88,827 as a result.
He said her marriage has broken down and she is living with her daughter and has a number of health issues including depression.
Sheriff Andrew Cubie deferred sentence and remanded her in custody.