When a party claims quantum meruit, he is suing for a reasonable sum for work done by him even though there is no subsisting oral or written contract.
A claim in quantum meruit lies in restitution or in quasi-contract. It arises whenever one party supplies goods or services to another in expectation of payment but no enforceable contract for payment has been entered into. In the absence of such a contract, the court enforces the implied promise of the recipient of the goods or services to pay a reasonable sum or orders restitution to prevent his unjust enrichment. But the existence of a valid contract for payment is a bar to the remedy. If there is no contract at all, or if there is a contract which is void for a reason other than illegality, a claim in quantum meruit will lie. But if there is a contract which is void for illegality, it will not.