delivered the opinion of the court.
In the year 1916 the city of Baker enacted a gas franchise ordinance, granting to Montana Petroleum Company, a corporation, a franchise to install and operate within or adjacent to the city a gas plant and to lay and maintain conduits, mains, fixtures and other apparatus for supplying and transmitting natural or artificial gas into the city, and in and through the streets, avenues, alleys or public grounds thereof. The franchise included the ordinаry provisions common to such grants and ordinances. It imposed upon the parties usual conditions. There is no question raised here as to the legality or effect of the franchise in most of its essential parts. There is, therefore, no reason to discuss the provisions of the ordinance at length.
Section 6 of the ordinance provided for the payment by the corporation to the city of a percentage of the gross income received from sales of gas. The amount was to be paid annually and was as follows:
“When the receipts from the sale of such gas shall equal $10,000 and less than $15,000 per annum, 1 per cent, of such receipts.
“When the receipts from the sale of such gas shall equal $15,000 and less than $20,000 per annum, 2 per cent, of such receipts.
“When the receipts from the sale of such gas shall equal $20,000 and less than $25,000 per annum, 3 per cent, of such receipts.
“When the receipts from the sale of such gas shall exceed the sum of $25,000, 5 per cent, of such receipts.”
The defendant accepted the terms of the ordinance and installed a gas distribution system shortly thereafter, and has operated the same as a public utility ever since. The percent *474 ages were paid annually in accordance with the provision for all years up to and including the year 1929. No payments were made for the years 1930 and 1931. The amount claimed by the city for the year 1930 was $726.90, and for the year 1931 was $642.96. It instituted this action for the collection of these amounts. The complaint is in the ordinary form; a copy of the ordinance is attached to it as an exhibit.
Defendant filed answer, admitting the enactment of the ordinance, the acceptance of it after its enactment, that the ordinance went into effect, and was still in full force and effect, except as to the provisions of section 6, which provide for the percentage payments to the city. The answer contains two affirmative defenses. The first one is to the effect that at the time of the enactment of the ordinance, the Public Service Commission Act of the state — sections 3879 et seq., Rev. Codes 1921 — was in full force and effect, and that by virtue of that Act the Public Service Commission had sole and exclusive power and authority of supervising, regulating and controlling public utilities, to the exclusion of jurisdiction, regulation and control thereof by any municipality, town or village; that the Act declared it unlawful for any public utility to grant any rebate, concession or special privilege to any consumer or user of the commodity which directly or indirectly affected a change of the rates, tolls or charges of the public utility; that the city was without power to enact section 6 of the ordinance, and that the same was invalid, unlawful and not binding; that the city was without right to collect the percentages from the company; that the provisions of the section constituted a rebate, concession or special privilege and were therefore unlawful; that no consideration existed for the granting of the ordinance; that the sole purpose and intent of section 6 was to secure the sums therein directed to be paid; that the section is against public policy, unlawful, invalid, and void; and that no amount is due thereunder.
The second affirmative defense pleaded that subsequent to the enactment of the ordinance, and on November 25, 1932, the company applied to the Public Service Commission of the *475 state for an order relieving it from paying any amounts to the city under section 6, and that thereafter the commission did make an order relieving the company from further payments by reason of the provisions of section 6. Copies of the application to the commission, the answer thereto, and the order of the commission were attached to the pleadings as exhibits.
The cause was tried to the court without a jury. Both sides submitted requests for findings of fact and conclusions of law and judgment. The court made findings and conclusions generally favorable to the plaintiff, and caused to be entered judgment in аccordance therewith for the amount demanded in the complaint. The appeal is from the judgment.
Defendant, appellant here, has made and urges fourteen assignments of error, and has grouped these assignments for discussion in its brief. It is not necessary to discuss all of these assignments. As grouped, they tender the following questions:
1. That section 6 of the ordinance imposed a gross proceeds tax and, as such, was invalid and did not constitute a vаlid enforceable contract.
2. Alleged error on account of the admission of a certified copy of an ordinance providing for the calling of the special election, and evidence as to what influenced voters at the election on the franchise ordinance, and that other applications for a franchise had been made to the city.
At the outset defendant contends that section 6 imposed upon it a gross proceeds tax for revenue purposes only. This contention is followed by considerable argument upon the proposition that a city cannot impose a tax upon a business or occupation purely for revenue purposes, citing
Reilly
v.
Hatheway,
If the provisions of the franchise in question did constitute the imposition of a tax as defendant suggests, then undoubtedly the rule contended for and the authorities cited in support thereof wоuld be applicable and controlling. However,
*476
we are unable to agree with defendant’s assertion; that section 6 of the franchise imposed a tax for revenue purposes upon defendant. The relationship between the parties with reference to the franchise and its provision for a gross receipts tax is contractual and is to be distinguished, on that ground, from cases of purely revenue producing ordinances calling fоr license or occupational taxes.
(Hanford Gas & Power Co.
v.
City of Hanford,
The relation created between the city and the company was contractual in character, and the ordinance granting the franchise and providing for the percentage payments should be construed as a contract between the parties.
(State ex rel. City of Billings
v.
Billings Gas Co.,
It is contended that even if this franchise is held to be a contract, there is still a total want of consideration for the conditions imposed upon defendant. The only possible theory upon which this contention can be sustained is that the city had no power or authority to make such a contract or to impose such conditions upon defendant in consideration of the grant of a franchise. As we shall hereinafter point out, the conditions imposed by the franchise ordinance were not absolutely illegal and void. Therefore the position taken by defendant in this respect is not tenable.
*477
The case of
Huffaker
v.
Town of Fairfax,
supra, is almost identical, upon the facts presented, with the ease at bar. In that ease it was urged, just as it is here, that the provisions of the franchise ordinance setting the rate at which electricity shоuld be furnished were illegal, for the reason that the Public Service Act enacted prior thereto vested exclusive jurisdiction of such matters in the Public Service Commission. The Oklahoma supreme court held that such a contention was untenable. It held that the city had the power and authority to make such a contract, although it was subject to the superior jurisdiction of the state, through the Public Service Commission, at any time it saw fit to act in the premises; but that until the state (through the commission) chose to act in the matter, the contract existing between the city and the utility was valid and binding. Again, in the case of
Shaffer Oil & Ref. Co.
v.
Creek County Gas Co.,
The same conclusion was announced by this court in
City of Helena
v.
Helena Light & Ry. Co.,
While our Public Service Act does vest the state with the right and power to regulаte rates, such a power must not be confused with the right of a city to exercise its contractual power to agree with a public service company upon the terms of a franchise.
(Woodburn
v.
Public Service Commission,
In the case of State ex rel. Billings v. Billings Gas Co., supra, this court had occasion to construe a franchise similar in many respects to the one here under consideration. The court said: “The right granted to the company to use the streets for laying its mains is a franchise. * * * The acceptance of the franchise, which contained terms, constituted a contract between the city and the company, if the city had authority to make such contract.” The court then proceeded to a discussion of the right of the city to contract and cited the statutory authority existing in this state supporting the right of the city in that respect. It discussed the authority of the Utilities Commission, particularly with relation to the fixing of rates. In the Billings Case the franchise ordinance was enacted before the passage of the Public Utilities Act. Here the Act was in effect when the franchise contract was entered into. Whereas it was claimed that the Billings franchise contract was rendered illegal by the enactment of the Public Utilities Act, appellant here asserts that the agreement to pay the percentage to the city amounted to a rebate, or a special privilege, and thereby rendered the contract void ah initio, and that because the matter of rates was included in the franchise, the provision was rendered illegal.
In the Billings Case, supra, the court discussed the question of the right to fix rates. It considered subsections 63 and 73 of section 3259, Revised Codes of 1907 (sec. 5039, Rev. Codes 1921), wherein it is provided that the city has the power to make any and all contracts necessary to carry into effect the powers granted by the title and to provide the mаnner of executing the same, and to permit the use of streets for the purpose of laying down water, gas and other mains, etc. The court declared that rate regulation of public utilities is distinctly a legislative function of the state, and discussed the decisions on the point. It pointed out that the cases are not harmonious but in a general way fall into three distinct groups: (1) Those holding that statutes of the character under *479 consideration do nоt confer any rate-making power whatever. (2) Those holding that such statutes by necessary implication confer the power to fix rates under certain circumstances. And (3) the group that holds that statutes of this character do not confer directly any rate-making authority, but they do amount to a sort of tacit recognition by the state of the city’s right to contract for rates, subject, however, to the paramount authority of the state whenevеr it chooses to exercise its sovereign power of rate regulation. The court adopted the third theory and declared that it was not the purpose of the legislature, by the very general language of the paragraphs of the Act, to surrender fully the distinctively governmental function to regulate rates, but rather to permit municipalities to protect themselves and their inhabitants against exorbitant rates until the state itself should act in the рremises. In the discussion of this subject, the court said: “Under this view it cannot be said that the Act of 1913 impairs the obligation of the franchise contract * * * for both parties to that agreement must have entered into it with full knowledge that in the state itself reposed the sovereign power of rate regulation. ’ ’
Here the Utilities Act was in full force and effect when the contract was entered into, and both parties must be held to a full understanding of its import. The rates fixеd in the franchise ordinance could not have been effective or controlling without the acquiescence of the state through the commission. While the record does not disclose the fact, the law required that the schedule of rates should be filed with the commission, and we must assume that the provisions of the law were observed. (State ex rel. City of Billings v. Billings Gas Co., supra.) Indeed, section 6 of the franchise in legal effect did no more than tender to the commission for its consideration and adoption a schedule of rates agreeable to both the city and the company. There was nothing illegal about that. WTien those rates were approved by and filed with the commission, they became the legal rates and were such until changed in *480 the manner provided by the Public Service Act. (State ex rel. City of Billings v. Billings Gas Co., supra.)
In the case of
Billings Utility Co.
v.
Public Service Commission,
The rate structure is primarily based upon the value of the property involved, the expenses of operation, and the theory of a fair return on invested capital. If there is something erroneous included, in the rate structure, it, of necessity, will be reflected in the rates; but that fact does not render these rates as applied to the general public or as they affect the franchise schedule as applied to the city fraudulent and void. The rate was legal, not because it was agreed upon between the city and the company, but essentially because it was approved by the commission, and so legal until changed. To express it in another way, the rate here was subject to direct attack in a proceeding before the commission, but was not vulnerable to collateral attack as attempted in this action.
We are of the opinion that the franchise provision did not violate the provisions of the Public Utilities Act, for the very reason that the matter now the subject of complaint and the issue in this case was included in a legal rate schedule adopted by the commission. (See
Billings Utility Co.
v.
Public Service Commission,
In so far as the right of the city to contract in the circumstances is concerned, we are impressed with the fact that the company is not in a position to repudiate the contract at this late date. It is not without significance that the company, accepted and acceded to the terms of the ordinance and thаt it proceeded to act in accordance with it and its terms over a period of several years, and that finally when it did seeb to avoid the provisions of section 6, it applied to the commission for relief. It is not in a good position to assert the invalidity of the contract after the lapse of so long a time.
The United States Circuit Court of Appeals for the Seventh District employed very pertinent language in a situation somewhat similаr to this, wherein it discussed the powers and authority of a city. It was there said: “When a municipal corporation has the power to grant or refuse in its discretion permission to a public service company to occupy the streets with its structures, it may grant such permission subject to such conditions as it may see fit to impose, provided they are not against public policy or in derogation of any right which the company may have under its franchisе from the state. The municipality, by means of such conditions, may impose obligations upon the company' which it would have no power or authority to impose under its general charter powers, and, if the company accepts the grant, it is bound by the conditions, *482 and is estopped to question their validity.” (Todd v. Citizens’ Gas Co., (C. C. A.) 46 Fed. (2d) 855, 866, and authorities therein cited.)
It has been quite generally held, in cases such as this, that where the utility company has accepted a municipal franchise, performed the terms exacted by the city in consideration for the franchise for a long period of time, and enjoyed the benefits for which it agreed to pay the amount prescribed, it is estopped from attacking a single provision of the franchise as
ultra vires
on the part of the city. (See
City of Jamestown v. Pennsylvania Gas Co.,
(C. C. A.) 1 Fed. (2d) 871, P. U. R. 1925C, 97;
Hartford
v.
Connecticut Co.,
The fact that the commission by its order in November, 1932, eliminated the charge imposed upon defendant by section 6 of the franchise, does not aid defendant in this ease, because plaintiff is seeking only to recover for a period (1930 and 1931) prior to the time when the order was made. The order eliminating the charge was not retroactive. It was manifestly and necessarily prospective only.
Having found that the contract was not illegal and void from the date of its inception, it follows that until the state acted in the premises, the obligation was a continuing one which thе city is entitled to have discharged. (City of Helena v. Helena Light & Ry. Co., supra.) Certainly, under the authorities to which we have already adverted, it would not be contended that an order of the commission changing the rates to be charged should operate retroactively. As we have pointed out, the charge in question was presumably one of the expense items upon which the rates were based. Hence there is no more reason for holding that an order eliminating thаt charge *483 should operate retroactively than there is for holding that an order changing the rates should have retroactive effect.
Defendant relies, in the matter of alleged discrimination, upon the case of City of Billings v. Public Service Commission, supra; but in that ease the ordinance under consideration provided that the city was granted free gas. Here there is no such provision. Here the ordinance does not provide that the city shall be given any prefеrence in the matter of rates or free service.
It is urged that the city was interested as a user of gas, and that therefore there was discrimination in its favor as such; but the fact is that while the city is a user, it paid for its gas at the same rate as any other user. This fact distinguishes the ease from the City of Billings Case, just cited.
The company complains because the court admitted in evidence the preliminary ordinance having to do with the matter of the submission of the question of the granting of the ordinance to the voters of the city. It also complains because the court received testimony as to the representations made by it to the city relative to the advantages that would accrue to the city and its inhabitants by the enactment of the ordinance and the acceptance of the proposition of the company as it was later embodied in the franchise ordinance. None of thesе matters seem to us of any importance. As we view the case, it makes no particular difference what the reasons- for the adoption of the ordinance were. It is immaterial whether the city or the company was most anxious to enter into the contract. Neither is it of any great consequence that the question of the payment of a certain percentage of the income derived from the sale of gas should havе been an inducement to the voters in voting for the ordinance. These matters are obviously unimportant here, in view of the fact that neither party is attacking the franchise ordinance in any particular, except as to the percentage payment provisions of section 6. The defendant does not question the franchise feature, but very apparently wishes to uphold it and is continuing to do business under it. The questioned evidence might havе been im *484 portant if this action involved an attempt to set the ordinance aside as a whole, but we fail to see where or how defendant could have been prejudiced in this action.
After carefully considering all the assignments of error, we are of the opinion that there was no reversible error in the ease. The judgment was properly entered and it is affirmed.
