delivered the opinion of the court:
Robert E. Burke, the appellee, filed his bill in .this case in the superior court of Cook county against the city of Chicago and its comptroller and treasurer, the appellants, praying for an injunction restraining appellants from using or appropriating, or commingling with other funds of the city, the sum of $'30,000 deposited by complainant as security for any shortage that might appear in his accounts as oil inspector of the city, consisting of any indebtedness that might be found due from him to the city, but alleging that he was not indebted to the city in any amount, and praying that defendants should be decreed to deliver up to complainant the sum of money so deposited. A preliminary injunction was granted and the bill was answered. A shortage exceeding the amount of the deposit was admitted by complainant, but he contended that all the fees of the office legally belonged to him and not to the city, and that was the question in dispute. The superior court dismissed the bill for want of equity, but continued the injunction in force pending an appeal to the Appellate Court for the First District. The appeal was heard in the branch of .that court and the decree was reversed and the cause was remanded, with directions to the superior court to enter a decree in accordance with the views expressed in the opinion then filed. The views so expressed were to the effect that the money delivered by the complainant to the comptroller of the city belonged to the complainant by virtue of chapter 104 of the Revised Statutes of 1874, concerning oil inspection; that the ordinance under which complainant was appointed oil inspector of the city is valid so far as to confer upon complainant title to the office of oil inspector under said statute and to fix the amount to be paid by persons requiring his services, but is void so far as it provides for a monthly salary of the oil inspector and that the fees collected shall be paid to the city, and in other respects in which it conflicts with the statute; that the ordinance and the acceptance of the office by complainant created an implied agreement that complainant would perform the duties of the office for the compensation prescribed by the ordinance, which contract was illegal, as opposed to public policy, and that inasmuch as the transaction remained ex-ecutory, relief should be granted to the complainant in disaffirmance of his contract on grounds of public policy. There was therefore nothing to b.e done by the superior court but to enter a decree in accordance with the prayer of the bill, and an appeal being allowed by law in such cases, this appeal was prosecuted.
The following facts were agreed upon by stipulation: The city of Chicago was incorporated about April 25, 1875, under the general act of 1872 for the incorporation of cities and villages. I11 1881 the laws and ordinances of the city were codified and revised, and by sections 874 to 882, inclusive, of article 1, chapter 13, the office of oil inspector of the city was created. The ordinance provided that the oil inspector should be appointed by the mayor, with the consent of the city council, biennially, on the first Monday of May or soon thereafter, for a term of two years. He was required to give a bond in the sum of $10,000, with security approved by the city council, and the ordinance contained provisions for apparatus, tests, branding and charges for inspection, covering the whole subject of oil inspection. A revised code was adopted in April, 1897, by which all ordinances inconsistent therewith were repealed. So far as oil inspection is concerned this revised code remains in force. By sections 1353 to 1364, inclusive, of chapter 45 of that code the office of inspector of oils is created, and his term is fixed at two years and until his successor is appointed and qualified. He is to receive as salary, in full compensation of all the duties of the office and in lieu of all fees and' emoluments pertain-' ing thereto, the sum of $300 per month. He is authorized, with the approval of the mayor, to appoint not exceeding three deputies, at salaries of $150, $80 and $75 per month, Respectively, and all salaries are payable at the end of each month, in the same manner as salaries of other city officers. The inspector is to be appointed by the mayor, with the consent of the city council, on the first Monday of May and biennially thereafter, and he is required to give a bond to the city in the sum of $10,000, with sureties to be approved by the city council, for the faithful discharge of the-duties of his office. He must require payment in cash for his services at the rate of six cents for each package, cask or barrel inspected, from the party requiring his services, and keep in a book for that purpose a full, true and minute account, in detail, of all fees, charges and emoluments of his office. His office expenses, other than salaries and maintenance of instruments and apparatus, are to be paid by the comptroller monthly, upon statements verified and showing the actual amount in detail. The inspector is required to make to the comptroller, on or before the 10th day of each month, a report in writing, verified by his affidavit, showing in detail all the fees and charges collected by him by virtue of his office during the preceding month, and at the same time to pay into the city treasury the full amount of such fees and charges collected. A failure to make such report and pay over such amount within that time is to be construed as a resignation of the office, and the mayor may declare the office vacant and appoint a successor. The ordinance contains further provisions relating to storage, tests, etc., of articles subject to inspection, accounts to be furnished to the party for whom an inspection is made, entries in a book kept for the purpose of all oils inspected, and provides penalties for violations of the provisions of the ordinance. The ordinance, in terms, creates an office and constitutes a complete code regulating the inspection of oils within the city.
The complainant, Robert E. Burke, was appointed oil inspector under and by virtue of that ordinance in April, 1897, and was re-appointed May 1, 1899, and April 29, 1901. The appointments were made by the mayor, with the advice and consent of the city council, for the term, of two years, and complainant qualified by giving the bond required by the ordinance and gave no other bond. From the time of his first appointment until October 10, 1901, he held, exercised and performed the duties of the office of oil inspector of the city of Chicago under said appointments, claiming to hold the office under and by virtue of the ordinance. O11 or before the 10th day of each month he presented to the city comptroller a report in writing, verified by his affidavit, purporting to show in detail all the fees and charges collected by him by virtue of his office during the preceding month, and at or about the time of making each report he paid into the city treasury the amount of the fees and charges shown as collected by the report, representing to the city that the amount so paid was the full amount of all the fees and charges collected by him during the month mentioned in the report. During the entire period he furnished monthly to the comptroller pay-rolls, verified by his affidavit, showing the amount of his salary as $300 per month, the salary of his chief deputy at $150 and the other deputies at $80 and $75, respectively, and stating that the labor for which the payroll was a voucher was performed for the benefit and account of the city of Chicago. He also delivered to the city comptroller monthly bills purporting to show the actual amount, in detail, per month, of the necessary expenses of his office and the cost of maintenance per month of the necessary instruments and apparatus. The salaries and expenses of the office and the cost of maintenance of the necessary instruments and apparatus were paid monthly by the city and were received by complainant. The reports so made were forty-seven. in number, and the pay-rolls and statements, verified by the complainant’s affidavits, exceeded fifty in number. The reports of fees collected, so made and verified by the complainant, were- many of them false, and were so made for the purpose of withholding from the city a large part of the fees and charges collected by complainant by virtue of his office, and he never made a report of the whole amount of fees actually collected. The city and its officers had no means at hand of learning that the reports were false. From January i to September 30, 1901, inclusive, complainant collected from the Standard Oil Company more than $3600, and from other oil companies considerable sums, and did not turn over the same. He collected fees and charges under the ordinance which he failed to account for or pay over, far in excess of the sum of $30,000. The moneys collected by him were earned by and were due him only by virtue of his position as oil inspector of the city. During all the time that he occupied the office he never denied the validity of the ordinance under which he was appointed. He never qualified in accordance with the provisions of chapter 104 of the Revised Statutes, and never complied with the provisions of that statute as to keeping a book open to examination, showing inspections. Up to October 7, 1901, he never claimed the right to withhold any fees collected, and neither the city nor any officer had any notice that he did not intend to comply with the ordinance or the conditions under which he held the office.
The proof showed that in the first days of October, 1901, the complainant learned from the daily papers that his office was under investigation by the grand jury of Cook county, which was considering evidence against him that his reports were false and that he had failed to turn over fees collected. On October 5 he sent a message to Lawrence McCann, the city comptroller, asking him to come to Dejonghe’s restaurant, and McCann went to the restaurant and had an interview with the complainant. In reply to an inquiry, McCann stated that he had been before the grand jury with the books and papers of his office. Complainant denied that there was any shortage in his accounts, but said that if there was any shortage he would put up a check to cover it or to secure it.
There s some difference between McGann and complainant as to the words used, but there is no difference as to the essential substance of the transaction. Complainant understood that the shortage was alleged to be $16,000, and he gave McGann a check for $20,000 to secure the city against any shortage that might appear, and to be applied, so far as necessary, to cover the same. Later in the day complainant called McGann by telephone and said that there was another alleged shortage of about $7000, and he would send over a check for $10,000 to secure any claim that might be made against him in that direction. He sent the check, and both checks were cashed and deposited with the city treasurer. The city comptroller in his report made the entry, “Robert E. Burke, special account, $30,000,” and in another place, under the head of “Trust Fund,” was the entry, “R. E-Burke, account, $30,000.” The treasurer made the following entries: “R. E. Burke, oil inspector, amount deposited with city treasurer,, $30,000.” In another place: “R. E. Burke, special account, $30,000,” and under the heading of “Trust Fund,” “Trust fund, $30,000.” The money has been kept as a special fund and not appropriated to any other account. The complainant served demand upon the treasurer and comptroller for the return of the money and filed the bill in this case. In bringing about the interview with Mc-Gann at Dejonghe’s restaurant complainant took the initiative and gave to McGann one check and sent him the other of his own free will, without threat, compulsion or duress of any kind. He does not claim that McGann influenced him in the slightest degree, and the checks were made and delivered solely on account of what complainant conceived to be his own best interests.
The questions involved have been elaborately and exhaustively argued by the learned counsel for the respective parties from every point of view which could throw light upon such questions. The positions of the counsel for complainant are practically those which were adopted by the Appellate Court. He contends that the ordinance is invalid because in conflict with the act entitled “An act to revise the law in relation to oil inspection,” in force July I, 1874, and constituting chapter 104 of the Revised Statutes, (Hurd’s Stat. 1905, p. 1420,) so far as it provides for a monthly salary for the complainant and his deputies and in the other respects in which it conflicts with the statute, but that it is valid and enforceable so far that the appointment of complainant under it conferred upon him title to the office of oil inspector under the statute and fixed the compensation to be paid by persons requiring his services. In that view of the ordinance he insists that the acceptance of the office constituted an illegal contract by defendant to accept less than the compensation fixed by the statute, and that such contract was void because of public policy.
We are unable to see how these positions can be maintained. The statute upon which counsel relies provides that the judge of the county court of any county for townships outside of incorporated cities, towns and villages, the mayor of any city, with the approval of the city council, and the board of trustees of any village or town, may, and on the petition of any five inhabitants thereof shall, appoint one or more inspectors for the inspection of coal oil, etc., and fix their compensation, to be paid by the parties requiring their services. Every such inspector is to hold his office for one year, and is authorized to appoint deputies, for whom he shall be responsible, and who shall take the same oath and be liable to the same penalties as the inspector. He is required, before entering upon the duties of the office, to take and subscribe the oath contained in the act, and to execute a bond, payable to the people of the State, in such sum as shall be required by the county judge, city council or board of trustees, with sureties to be approved by such judge or the mayor or president of the board of trustees, conditioned for the faithful discharge of the duties of his office. This bond is to secure any person aggrieved by his misconduct, and he is required, within twenty-four hours after making an inspection, to make a full and fair entry in the record book required to be kept for .that purpose, to be open to all persons wishing to examine the same. He is required to provide himself, at his own expense, with instruments for making tests, and the whole subject of inspection under the act is regulated by it. The ordinance does not purport to be the execution of any power under the statute or to deal with the office created by it, but it purports to create another office,—that of oil inspector of the city. If acting under the statute, the city council would have been required to fix the amount of a bond payable to the people of the State and the mayor to approve the sureties; 'but the ordinance makes no provision for such a bond or the amount of it, and provides for a different bond to be executed to the city and for the security of the city. The bond payable to the people is to secure any person aggrieved by the misconduct or neglect of the inspector. The provision in respect to compensation is in direct conflict with the statute by substituting salaries for the -inspector and his deputies; also the provisions for the payment o.f the deputies and the expenses of the office, and the fixing of the term at two years while the term of office under the statute is one year. There are numerous other points in which the ordinance and statute conflict, and they do not harmonize in any of their provisions.
It is beyond question that there was no intention on the part of the city council or mayor to act in pursuance of the statute, but the'intention was to provide for the appointment by the mayor, with the approval of the city council, of an oil inspector under section 2 of article 6 of the charter, and to provide for the inspection of oil as an article of merchandise under paragraph 54 of section 1, article 5, of such charter. To hold that a part of the ordinance is valid and a part void would require the elimination of every substantial provision contained in it, except that persons requiring the inspection should pay six cents for each package, cask or barrel inspected. To eliminate practically everything that the city council intended to accomplish by the ordinance and which formed the only inducement for its passage would be to produce a result never contemplated by the council or mayor, and in our opinion would be wholly unjustifiable. The provisions of the ordinance are inter-dependent, and if the city had no right to legislate on the question, as it attempted to do, the whole ordinance is void and no part can be sustained. Mathews v. People, 202 Ill. 389.
Complainant is not an officer de jure under the statute. He was not appointed under that statute. The city council did not fix the amount of any bond to be given under it and he did not' qualify under it. Neither can he bring himself under any definition of an officer de facto. Where there is an existing legal office, one who assumes to fill the office and acquires the reputation of being the officer he assumes to be will be an officer de facto, although there may be some irregularities in his appointment, election or qualification which would be fatal to his title in a direct proceeding. (Barlow v. Stanford, 82 Ill. 298; Leach v. People, 122 id. 420; Samuels v. Drainage Comrs. 125 id. 536.) The administrative acts of such an officer are held to be valid and binding, so far as the public and third persons are concerned, so long as he retains the office and performs its duties. Mere irregularities in complainant’s appointment or in taking the oath or giving a bond, or the fact that the appointment was for a longer term than one year, would not deprive him of the character of an officer de facto if the other necessary conditions had existed; but a person to be an officer de facto must assume to act as an officer, and there must be facts, circumstances or conditions which would reasonably lead persons having relations or business with the office to recognize and treat him as the lawful incumbent, and he must have the reputation of being the officer he assumes to be. (8 Am. & Eng. Ency. of Law,—2d ed.—783.) There was no attempt to appoint complainant to the office of oil inspector under the statute and he was not so appointed. He did not act or assume to act as such an officer and did not have the reputation of being an oil inspector under the statute. There was nothing which would lead any person to recognize or treat him as an incumbent of the office created by the statute, but, on the contrary, his reputation was that of being oil inspector under the ordinance of the city. At no time during his incumbency of the office, until a few days after the money had been paid over, did he have the slightest suspicion that he was or had been an oil inspector under the statute or that he was exercising the duties of such an office, and he never assumed to exercise them.
The subject of oil inspection is under the control of the legislature, and they may direct such inspection or delegate the power to municipalities. If the legislature delegate the power they may resume it and in that way deprive municipalities of the right to exercise it. (City of Chicago v. Phoenix Ins. Co. 126 Ill. 276; Wilkie v. City of Chicago, 188 id. 444.) Whatever power was given to cities by the general Incorporation act for the inspection of oil was taken away when the legislature resumed control of the subject by the act of 1874. The city of Chicago therefore had no authority to legislate on the subject. But we do not. know of any rule of law under which the complainant can reclaim the money deposited on the ground that the ordinance was void. Surely he cannot escape his liability to the city by impeaching his own title to the office and attempting -to show that, in fact, there was no legal office of oil inspector. That is the only valid reason he can give for reclaiming the money, and if that is true, the exactions from persons requiring his services were illegal. Of course, he could not recover the money on the ground that it belongs to the people who paid it to him. By his bill he asserts his own title to the money, and if the money equitably belongs to other per-sous he would not be authorized to recover it for his own use. He can only recover on his own title. But, as a matter of law, the money does not belong to the people who paid it without reservation or protest. ( Yates v. Royal Ins. Co. 200 Ill. 202.) Complainant acted as an officer of the city, and in consideration of hjs monthly salary and the payment of his deputies and office expenses he collected the money for the city. We do not see how he can dispute the title of the city to the money which he collected by virtue of the ordinance. It is true, as stated by his counsel, that there is no estoppel against learning the law and obeying it; but there is an estoppel, enforced by courts of equity, against assuming a position to the prejudice of another, inconsistent with a previous course of conduct. To permit complainant to repudiate his acts as an officer of the city and his obligations under the ordinance would be to accomplish a fraud. While complainant was acting as oil inspector he collected the fees upon the assumption that he was clothed by the ordinance with power to collect them, and he cannot now deny the obligations imposed by the ordinance or dispute the title of the city. That was the principle upon which the case of Prick v. Trustees of Schools, 99 Ill. 167, was decided. Frick had acted as secretary and treasurer of the board of trustees and entered into a contract with it. He was estopped to deny the validity of the acts of the board, and the court said: “It would be inequitable to allow him to hold office under the board and to hold it out to the public as a legally constituted body, contract with.it, and then, when sued on a contract thus made, set up that the board had no legal existence.” Perhaps the fact that he made the contract would have es-topped him, but he was held to be estopped by having held office under the board. The same principle, in a different manner, was applied in Lombard v. Chicago Sinai Congregation, 64 Ill. 477, and Roby v. Trust Co. 166 id. 336.
While there is, as before noted, some difference in the versions of the agreement given by the city comptroller and the complainant, there is no dispute as to the actual understanding. There was no payment, since the shortage was not admitted, but the money was deposited to secure payment in case a shortage in the accounts should appear. There was to be no further proceeding or foreclosure, or any other act, except to apply it to the shortage in the account. A shortage far in .excess of the amount deposited is admitted, and although the application had not been made when the bill was filed, the right to appropriate the money to the payment of the shortage, as far as it would reach, was perfect.
The statute fixed no compensation for the services of the oil inspector, but left such compensation to be fixed by the local authorities. The ordinance does not purport to fix compensation under that statute, and the purpose of the ordinance is quite different. The manifest intention of the statute is to require inspection for the protection of the public and to have the compensation fixed by the local authorities at such a sum as would be fair and reasonable pay for the services, and not to require dealers in oil to pay tribute to an inspector or .the local municipality. The ordinance has the double 'purpose of requiring inspection and to compel parties requiring inspection to contribute to the revenues of the city. It was stipulated that during all the time that complainant held the office it was matter of common knowledge that the fees for oil inspection in Chicago amounted to more than $15,000 a year. The compensation provided for by the statute was not included in the ordinance by terms or by the intention of the city council.
We conclude that the judgment of the Appellate Court was wrong and the decree of the superior court was right, although, perhaps, for quite different reasons from those given by .that court.
The judgment of the Appellate Court is reversed and the decree of the superior court is affirmed.
Judgment reversed.