Plaintiff instituted this action to recover from defendant the sum of $1379.71 paid to said defendant by the state controller of the state of California in distributing the motor vehicle fuel fund collected by the state of California for the year 1929. The defendant interposed a demurrer to the complaint on the ground that the complaint failed to state facts which were sufficient to constitute a cause of action against the defendant. The demurrer was sustained without leave to amend. From the order sustaining the demurrer and dismissing the action plaintiff appeals.
The complaint, which was held to be vulnerable to the attack presented by respondent's general demurrer alleges that in the year 1929 there were certain persons, firms and corporations who were actually residents of the County of *Page 464 Tulare but who, in applying to the motor vehicle department of California for registration of motor vehicles owned by them stated their postoffice addresses to be in the city of Delano, which is located in the adjoining County of Kern; that the state of California, acting through its state controller in distributing the motor vehicle fuel fund for the year 1929, counted and allotted to the County of Kern all of the motor vehicles owned by the aforesaid residents of Tulare County and paid to said County of Kern that portion of said fund which was based on the motor vehicles so owned and registered by actual residents of Tulare County; that the amount of money thus paid to and received by Kern County which should have been paid by the state of California to Tulare County amounted to $1379.71; that the County of Tulare filed with the County of Kern claims upon blanks provided by the County of Kern demanding payment of the sums which aggregated the aforesaid amount and these claims were rejected by the County of Kern and the rejection of the claims thus made was not based upon any defect in form or itemization of said claims. The prayer of the complaint is for judgment against respondent in the sum of $1379.71, together with interest and costs.
[1] It is apparent that the cause of action stated in the complaint is the ordinary cause of action for money had and received. The basis of such a cause of action is that the defendant has received money which belongs to the plaintiff and which in equity and good conscience he ought to pay to the plaintiff (County of Colusa v. County of Glenn, 124 Cal. 499 [57 P. 477]). [2] It was long ago decided that an action for money had and received may be maintained by one county against another in a proper case (Colusa County v. Glenn County,117 Cal. 434 [49 P. 457]).
[3] The single contention advanced by respondent in support of the order from which this appeal is presented is that section 4123 of the Political Code provides the sole method by which money erroneously paid into the treasury of a county may be recovered and by whom the recovery may be had. This section is in the following language:
"Any money other than taxes, erroneously paid in to the county treasurer, may be returned to the person paying it in, upon a warrant drawn by the county auditor on the order *Page 465 of the board of supervisors, based upon such voucher as will show proper evidence of the facts."
Respondent's demurrer admits all properly pleaded material allegations of fact contained in the complaint. For the purpose of this appeal, therefore, it must be taken as admitted that the amount of money stated in the complaint which should have been paid to appellant was paid to respondent. Unless, therefore, the above-mentioned section of the Political Code constitutes a bar to the cause of action stated in the complaint the court's order sustaining the demurrer and dismissing the action is clearly erroneous.
It is our opinion that respondent's contention may not be sustained. [4] It is urged that since the money sought by this action to be recovered was paid into the county treasury of Kern County by the state controller he is the only person authorized by the aforesaid statute to recover it. This is another way of saying that the state controller is the real party in interest and a necessary party to an action of the character here presented. This is obviously not correct. The real party in interest is appellant, who is shown by the allegations of the complaint to be entitled to the money which by mistake was paid into the county treasury of respondent. The outcome of this suit is a matter of utter indifference to the state controller and he is therefore not a necessary party to the action. If respondent's contention should be sustained and a claim were later made upon respondent for the return of the money and it should be returned to the state controller, this official would be duty bound to pay it over to appellant, assuming the allegations of the complaint to be true.
Since the allegations of the complaint clearly show a cause of action in appellant's favor for money had and received the statute relied upon by respondent should not be so construed as to defeat recovery unless it can be said that no other construction is reasonable. Section 4123 of the Political Code is found under article III, chapter V, title II, part IV, of the code. The subject of part IV is "Of the Government of Counties, Cities and Towns." Title II is entitled "The Government of Counties." Chapter V is entitled "Executive Department." Article III is entitled "The Treasurer." The various sections which are found in article III relate particularly to the duties of the treasurer of a *Page 466 county. The section in question must therefore be read with reference to the other sections which are contained in article III and with reference to the title of said article. When it is thus read it is evident that the section prescribes the procedure which is to be followed by the treasurer of a county in dealing with claims for the return of money which has erroneously come into his hands. The section does not purport to establish a rule of substantive law. It is wholly adjective in character. Furthermore, it is to be noted that its language is not mandatory but permissive.
Appellant's right to recover the money here sought to be recovered is not dependent on any statute. It is based upon a fundamental principle of equity that one who has received money which belongs to another is bound in equity and good conscience to pay it over to the owner. No purely procedural statute can affect this right. Such a statute may furnish the procedure which a county treasurer may insist shall be followed in the matter of demands for money which it is claimed he has erroneously received. It cannot avail the county which is unjustly enriched at appellant's expense and serve as a valid ground for a general demurrer under the mistaken theory that it makes the real party in interest in an action of this character an official of the state who obviously has not the slightest interest in the outcome of the action.
The order from which this appeal has been prosecuted is therefore reversed, with instructions to the trial court to overrule respondent's demurrer.
Barnard, P.J., and Marks, J., concurred.
A petition by respondent to have the cause heard in the Supreme Court, after judgment in the District Court of Appeal, was denied by the Supreme Court on August 3, 1933. *Page 467