A former personal assistant to the novelist JK Rowling has been ordered to repay nearly £19,000 after fraudulently misusing the money to buy herself lavish gifts and meals.

Using her married name Joanne Murray, the Harry Potter author sued her former assistant Amanda Donaldson for damages for using Rowling’s business credit cards and petty cash without approval over three years.

That included an “extraordinary” £3,629 spent on toiletries from Molton Brown, a Dualit espresso machine from John Lewis, £823 on cakes and baked goods from two luxury cake shops, £2,139 on cards and stationery from Paper Tiger and 120 transactions at Starbucks and Costa worth £1,636.

Donaldson insisted in court that her spending was agreed by Rowling but Sheriff Derek O’Carroll ruled she took the money through fraudulent misrepresentation, knowing she was spending it without authority.

O’Carroll said Donaldson would put untruthful notes on Rowling’s business credit card statement in an attempt to persuade the author’s accountant that her purchases were approved or for Rowling’s use.

Overall, she spent £9,832 on “a very large number of unauthorised purchases” from shops; withdrew £1,160 in cash without approval; and took £7,742 worth of foreign currency with the pretence these were business expenses for overseas trips.

“In total, during her employment, the defender obtained from the pursuer by means of her fraudulent misrepresentation a total of £18,734,” the sheriff ruled. Donaldson is also liable to pay 8% interest on that money until it is repaid.

Amanda Donaldson. Photograph: Andrew Milligan/PA

As it was a civil action against her, the sheriff’s verdict is based on a balance of probabilities, rather than the beyond reasonable doubt needed in criminal cases. Even so, O’Carroll said she had “shown herself capable of acting utterly dishonestly”. He added: “Some of the defender’s evidence was inherently implausible or occasionally quite bizarre.”

The court in Airdrie heard that suspicions about the unusual transactions began to emerge more than a year after Donaldson had started working for Rowling in 2014; they began to escalate sharply “to a point where it was almost out of control”.

Donaldson had often spent on gifts for herself at shops where she had been before at Rowling’s request, the court heard, but then began acting as if she had an account at that shop.

In many cases, Rowling would never have wanted the things being bought. She disliked toiletries from Molton Brown because they were over-perfumed and her husband, Dr Neil Murray, was allergic to strong perfumes. She had no memory of asking Donaldson to buy a full set of Harry Potter books from Waterstones, nor any food from Sainsbury’s or Marks & Spencer.

One Christmas, Donaldson gave her employer a Liberty notebook as a present. That item turned up on Rowling’s credit card bill. On another occasion, Donaldson produced a fake email purporting to confirm she had paid a £400 deposit for a Christmas lunch at a Michelin-starred restaurant in Edinburgh, Castle Terrace.

The investigation into Donaldson’s spending began in February 2017 after she was seen loading several Paper Tiger shopping bags into her car. She insisted in court and to Rowling’s accountant and husband the spending was authorised and solely to support Rowling and the office’s use.

Donaldson said she had made mistakes with incorrect credit card statement entries because she was busy and it was her job to buy gifts for Rowling’s family, staff, friends and PR people. She had spent more than £1,000 on incense reed diffusers for the office, toilets and corridors, she said, while the £1,636 spent at Starbucks and Costa went on muffin and coffees for Rowling’s monthly PR meetings.

O’Carroll said that in Rowling’s opinion, “the figures show a clear and escalating pattern of fraudulent behaviour, which she would classify as brazen. It was darkly comical to suggest that the things the defender bought were what she would want or need. She was staggered that the defender thought she would not be caught.”