Hello,
To have / to house the devil in one's purse:
To be penniless.
To have no more money.
We can guess that this expression is not from today, as it has been a long time since people put money in a purse.
It is probably necessary to bring it closer to the old expression of the same meaning, “to have neither cross nor pile,” to understand why, the fact of having an empty purse allows this little rascal of a Devil to come and lodge in it.
In the past, coins featured a cross on one side, the other side being the tail (remember the coin-toss readings). Now, if you have at least one coin with a cross in your purse, it necessarily prevents the devil from entering, as is well known! However, if you are penniless, if you “have neither cross nor tail,” the devil takes a malicious pleasure in moving in there.
This expression was popularized by Jean de la Fontaine in the fable "The Treasure and the Two Men" ().
Marylena