
83 Cal.App.2d 445 (1948)
CITY AND COUNTY OF SAN FRANCISCO, Appellant,
v.
HARRY J. BOSS, Respondent.
Civ. No. 13519. 
California Court of Appeals. First Dist., Div. One.  
Feb. 2, 1948.
 John J. O'Toole, City Attorney, and Walter A. Dold, Deputy City Attorney, for Appellant.
 Tobriner & Lazarus and Mathew O. Tobriner for Respondent.
 BRAY, J.
 Plaintiff brought suit against defendant, a painting contractor engaged in business in San Francisco, for unpaid license taxes for the fiscal years 1943-1944, 1944-1945, and 1945-1946. The question presented here is the validity of that portion of ordinance No. 1.075 of plaintiff city and county, requiring contractor's licenses. The lower court found it to be invalid and sustained defendant's demurrer to the complaint, without leave to amend. Plaintiff appeals from the judgment entered thereon. *446
 [1] The portion of the ordinance primarily involved here comprises section 76 and sections 200 to 207, inclusive. (For brevity, it will be referred to as "the ordinance.") Section 200 defines the term "contractor," and, admittedly, is broad enough to include defendant and his business as a painting contractor. Section 201 requires every contractor, before engaging or offering to engage in work in San Francisco, to obtain a "certificate to the effect that he is registered as a licensed contractor in the said Bureau of Licenses" of the plaintiff. Section 202(a) provides the procedure for registration and requires an application in writing, setting forth certain data. Section 202(b) provides that no contractor shall be entitled to receive a certificate unless he is registered as a contractor with the State of California as provided by law. A fee of $10 accompanying the application is required by section 202(c). Section 202(d) provides that the Bureau of Licenses shall investigate any application "and if the facts set forth in said application are found to be true" the certificate shall be granted to remain in force only until the end of the fiscal year, "thereafter the said certificate shall be renewed each fiscal year by the filing of a request to renew the same and the payment of the sum of Ten ($10.00) Dollars to said Bureau of Licenses." Section 202(e) provides: "Revocation of Certificate, Grounds for. Any certificate of registration may be revoked for any act of the person so registered showing said person to be dishonest or guilty of the violation of any rule or regulation, either state or municipal, regulating or governing contractors." (Emphasis added.) Section 202(f) provides an appeal to the Board of Permit Appeals for failure of the Bureau of Licenses to issue, or on the revocation of, a license. Section 203 provides that the bureau shall keep a register of contractors which shall be open to the public. Section 204 provides that all amounts received from the issuance of these certificates shall be paid daily into the city and county treasury "and shall be used to defray the cost of making the investigations and reports and furnishing the information mentioned in Section 205 of this Article." Section 205 provides that any contractor may apply to the superintendent of the Bureau of Building Inspection or to the city engineer for "all information necessary to enable said contractor to prepare for the execution of any contract for construction, alteration or improvement of any building, structure, street, road or way" and that such information *447 shall be made available "in order to enable said contractor to prepare for the execution or performance of such contract; all without charge, and when in order to obtain said information, an inspection or investigation of the site on which said contract is to be performed is necessary, said inspection and investigation shall be made." Section 206 provides that contracts of the city and county of San Francisco shall be awarded only to contractors whose names appear on the Register of Contractors and who have complied with the terms of the ordinance, with certain exceptions not important here. Section 207 provides that no permits shall be issued by the Central Permit Bureau for the doing of any kind of work on which a contractor is to perform labor, furnish materials, or render service, unless the contractor for such work holds a certificate of registration.
 Section 76 of the ordinance applies to licenses generally, and makes it unlawful to carry on any business for which a license is required, without having such license. It provides certain percentage penalties in the event of nonpayment of the tax on time and also makes the nonpaying licensee subject to arrest and prosecution.
 The state also has enacted legislation in the field of licensing contractors in the State Contractors' Law (Stats. 1929, ch. 791, now found in Bus. & Prof. Code,  7000 et seq.) Since the primary question herein is whether the state has occupied this field to the exclusion of municipal regulation thereon in a form other than for revenue only, it may be well to note similarities between the ordinance in question and the state act. Section 7000 provides for a state license board. Section 7026 defines a contractor in practically the identical language used in section 200 of the ordinance. Section 7028 prohibits any person from engaging in the business of contractor without first having obtained a state license permitting him to do so and is similar to section 201 of the ordinance. Section 7065 provides for the investigation, classification and examination of applicants under rules adopted by the board. Section 7067 provides that the application shall state the general nature of the applicant's contracting business, the classification under which he desires to be qualified, and the names and addresses of persons in the business; and section 7068 requires a showing of experience; both are similar to section 202(a) of the ordinance. Section 7137 provides for an original fee of $10 and $5.00 for each annual renewal. Section *448 7090 provides for the investigation and suspension or revocation of a license, and sections 7097 et seq., provide for rehearings and appeal. Section 7027 which provides that subcontractors are included and materialmen excluded is almost identical to the last clause of section 200 of the ordinance.
 Horwith v. City of Fresno, 74 Cal.App.2d 443 [168 P.2d 767], in which the city attorney and the deputy city attorney appearing on this appeal filed briefs amicus curiae, and in which the Supreme Court denied a hearing, is practically determinative of the questions raised here. There, the city of Fresno enacted an ordinance requiring electrical contractors to obtain and pay for a business license before engaging in business. Plaintiff applied for such license, but it was refused because he had neglected to pass an examination before the city electrical board of examiners as required by the ordinance. The same contentions were made in that case as here. "Plaintiff contends that the state has provided a comprehensive system for the examination and licensing of all contractors; that the state law has occupied the entire field so that no municipality may provide for any further examination of a contractor licensed under state authority as a prerequisite to his engaging in business within its limits. No question is presented of the right of a city to impose a license fee on such contractor for doing business in such municipality. We understand that right is conceded by the plaintiff."
 "On the other hand defendants maintain that the licensing of contractors doing business in the city is a municipal affair solely within the regulatory power of the municipality; that requiring a contractor to pass an examination given by a local board is a proper prerequisite to the issuance of a business license under the police powers of the city. It is also argued that 'the ordinance does not, as a matter of fact, conflict with the State Contractors' Law.' " (P. 445.)
 The court, after stating that the precise question presented is one of first impression in California, and after pointing out the similarity between the provisions of the Fresno ordinance and the State Contractors' Law, states the rules for determining what is strictly a municipal affair, and then says (pp. 446-7): "The generally approved rule on the question seems to be that if the subject matter affected by the state legislation is of statewide concern and deals with matters beyond the exclusive control of the municipality, it is not a municipal affair subject to local control. [Citing cases.] *449"
 "It is apparent that the state has adopted a broad and comprehensive plan for licensing contractors throughout the entire state, for examination as to their qualifications and fitness to engage in their various activities, for licensing only those who prove themselves qualified by satisfactorily passing examinations, and for punishing those who prove themselves incompetent or unfaithful to the trust imposed in them. This is a matter of statewide concern and is not one that can be safely entrusted to regulation by each chartered city. Residents of the smaller municipalities and of rural districts are as much concerned with the safety of their citizens and the property within their limits as those in the larger cities that may operate under charters."
 "As the licensing of contractors throughout the state is a matter of general and statewide concern we must conclude that it is not a municipal affair that concerns only the inhabitants of a chartered city and which is subject to local regulation such as that attempted to be imposed by the city of Fresno."
 The case then disposes of another contention similar to one of those made here, namely, that the Fresno ordinance does not, as a matter of fact, conflict with the State Contractors' Law and is a reasonable police regulation passed under the general police powers of the city. The court stated (p. 448): "We may concede that the examination and licensing of electricians comes under the general police powers as an endeavor to protect property and promote the safety of citizens. ... However, we regard this matter as unimportant as 'the ordinance is invalid if it attempts to impose additional requirements in a field which is fully occupied by the statute.' (Pipoly v. Benson, supra [20 Cal.2d 366 (125 P.2d 482, 147 A.L.R. 515)].)" (To the same effect, City of Sonora v. Curtin, 137 Cal. 583 [70 P. 674].)
 The Horwith case further holds (pp. 448-9): "The state license implies permission to the licensee to conduct his business at any place within the state. This permission should not be circumscribed by local authorities. This does not limit the right of local governmental agencies to protect property and life through the enforcement of local regulations as to the quality and character of the installations. The right to enforce local ordinances is still in the hands of municipalities through the power of inspections and permits." *450
 The ordinance in question here does not attempt to come within the category just mentioned. It attempts in no way to provide the quality and character of the installations, nor for inspection of the work done. The plaintiff does not attempt to support the ordinance on that ground, but on the ground that it is revenue producing, and that under the "home rule" amendment (Const., art. XI,  6), which home rule is adopted by section 2 of San Francisco's charter, the plaintiff is entitled to license for revenue, even though the state has occupied the field.
 But an examination of the ordinance shows that its purpose is not revenue, but regulation. As said in In re Dees, 46 Cal.App. 656 [189 P. 1050], in determining the type of ordinance in question it is the duty of the courts to look at its substance and not merely its form. There the court held the ordinance to be a regulatory one rather than a revenue raising one. "In considering the particular enactment the fact that it purports to be a revenue measure is not conclusive." (P. 660.)
 In Davis v. City of San Diego, 33 Cal.App.2d 190 [91 P.2d 640], it was held that whether the actual purpose of an ordinance was regulation or revenue was a question of fact. By section 204, the receipts are to be used to defray the costs of making the investigation and reports which are available to the contractor. Where the city receives any revenue from this does not appear. "If revenue is the primary purpose and regulation is merely incidental the imposition is a tax; while if regulation is the primary purpose the mere fact that incidentally a revenue is also obtained does not make the imposition a tax ..." (Cooley on Taxation, (4th ed.), vol. 4,  1784, p. 3513.) (To the same effect, Lamere v. City of Chicago, 391 Ill. 552 [63 N.E.2d 863]; Hunt v. Douglas Lumber Co., 41 Ariz. 276 [17 P.2d 815]; 33 Am.Jur. 340.) See, also, John Rapp & Son v. Kiel, 159 Cal. 702 [115 P. 651], where the court held that an ordinance imposing a license fee of $150 per annum, for a license to sell liquor not to be drunk on the premises, was held to be for regulation rather than for revenue producing. "In general, therefore, where the fee is imposed for the purpose of regulation, and the statute requires compliance with certain conditions in addition to the payment of the prescribed sum, such sum is a license proper, imposed by virtue of the police power; but where it is exacted solely for revenue purposes and its payment gives the right *451 to carry on the business without any further conditions, it is a tax." (33 Am.Jur. p. 340.)
 In Best Foods v. Christensen, 75 Utah 392 [285 P. 1001], the Legislature of the State of Utah passed an act requiring persons who sell oleomargarine to obtain a license from the city, town or county and pay a $5.00 fee therefor. "All such license fees shall be credited to the general fund of the city, town or county collecting the same." It was held that as the "expenses of the municipality in enforcing the act may equal or exceed the revenues derived from the fees collected," (p. 1004 [285 P.]) the fees so collected were not a tax but "compensation for services rendered to the state by the municipality issuing the permit and assisting the state in the enforcement of the act." (Pp. 1004-5 [285 P.].)
 Applying these tests, it appears clearly that the ordinance is not exacted solely for revenue purposes. The revenue received is used solely for the purposes of the ordinance. In spite of the state law which authorizes a contractor holding a state license to contract anywhere in the state, this ordinance limits his right to contract in San Francisco--unless he also obtains a San Francisco license, which shall only be given him if the facts set forth in his application are found to be true by the city authorities. The license may be revoked for any act of the holder showing him to be dishonest, or for a violation of any rule or regulation, either state or municipal, regulating contractors. Thus, even though the state may decline to take away his state license for any such act or violation, the city may do so and prevent him from contracting within its limits, in spite of his state license.
 Plaintiff takes the position that it has the power to impose license taxes either for regulation or for revenue, or for both, citing among others In re Bruce, 54 Cal.App. 280 [201 P. 789]; McKay Jewelers, Inc. v. Bowron, 19 Cal.2d 595 [122 P.2d 543, 139 A.L.R. 1188]; West Coast Adver. Co. v. San Francisco, 14 Cal.2d 516 [95 P.2d 138]. While this is true, it is limited by the rule set forth in the Horwith case, supra, where it is held that in matters of statewide concern where the state has occupied the field, the municipality cannot regulate, subject, however, to the right of the municipality even then to regulate in matters purely local. For example, there is the right to provide "local regulations as to the quality and character of the installations." (P. 449.) Here no attempt is made to do this, but the ordinance attempts *452 to provide a means by which a contractor with a state license may be denied the right to contract or work in San Francisco.
 As said in Pipoly v. Benson, 20 Cal.2d 366, at page 370 [125 P.2d 482, 147 A.L.R. 515]: "This general rule permitting the adoption of additional local regulations supplementary to the state statutes is subject to an exception, however, which is important in the present case. Regardless of whether there is any actual grammatical conflict between an ordinance and a statute, the ordinance is invalid if it attempts to impose additional requirements in a field which is fully occupied by the statute. Thus, it has been held from an early date that an ordinance which is substantially identical with a state statute is invalid because it is an attempt to duplicate the prohibition of the statute. ... Paradoxical as it may seem, it is apparent that an ordinance and a statute may be identical under this rule and yet the ordinance is invalid because within the constitutional provision it is in conflict with the statute. (Ex parte Daniels, supra, p. 645 [183 Cal. 636 (192 P. 442, 21 A.L.R. 1172)].) The invalidity arises, not from a conflict of language, but from the inevitable conflict of jurisdiction which would result from dual regulations covering the same ground. Only by such a broad definition of 'conflict' is it possible to confine local legislation to its proper field of supplementary regulation."
 Plaintiff contends that the regulatory part of the ordinance may be disregarded and the licensing part considered valid as for revenue purposes only, citing cases to the effect that if part of an ordinance is invalid, the other parts, if not dependent for their validity upon the invalid part, will remain undisturbed. However, this contention overlooks the fact that the licensing part of the ordinance is not for revenue, but, like the other parts, is for regulation and hence must fall.
 In support of its contention that the ordinance is either "a revenue measure, or, at worst, a combination of both regulation and revenue licensing," plaintiff cites three cases. Payne v. De Vaughn, 77 Cal.App. 399 [246 P. 1069], held that ordinances requiring payment of a license and procurement of a certificate to perform the services of contractor and builder, attorney, and certain others, is not to be construed as a revenue law alone, but as a police measure. This case was decided in 1926, prior to the enactment of the State Contractors' Law, and hence does not consider the question involved here. *453
 Sivertsen v. City of Menlo Park, 17 Cal.2d 197 [109 P.2d 928], upheld an ordinance imposing a license fee on painting contractors already licensed by the state. There, the ordinance apparently was one for revenue only. The question involved here was not discussed. The only question considered was whether the city could legally charge painting contractors having no fixed place of business without the city an annual license fee of $20 while those having such a place within the city were only required to pay $10.
 Matter of Application of Prentice, 24 Cal.App. 345 [141 P. 220], also decided prior to the enactment of the State Contractors' Law, held valid an ordinance of the city of Stockton requiring master plumbers to take out a city license and pay a license fee of $10 per year in order to engage in business in Stockton. Just what requirements there were other than making application for the license and paying the fee do not appear, except that apparently the examination which the state law required an applicant to take before the city board of health was by the ordinance required to be taken before the city clerk. In holding that the ordinance did not conflict with the state law granting city boards of health the power to regulate the plumbing and drainage of buildings and to provide for the regulation of plumbing, the court did not discuss the regulatory features of the ordinance, if any. It treated the ordinance purely as one for revenue only. It said (p. 347): "Where the power to impose a license-tax for revenue is conferred upon a municipality, the power becomes a municipal affair within the meaning of those words in the constitution (Ex parte Braun, 141 Cal. 204 [74 P. 780]); and ordinances passed for the purposes of revenue are valid exercise of power if the municipality by its charter has been given such power. (Ex parte Helm, 143 Cal. 553, [77 P. 453]; Ex parte Lemon, 143 Cal. 558, [65 L.R.A. 946, 77 P. 455].)"
 The judgment appealed from is affirmed.
 Peters, P. J., and Ward, J., concurred.
