
102 So.2d 848 (1958)
COAST CITIES COACHES, Inc., a Florida corporation; George L. Morris and Stanley L. Green, Appellants,
v.
Nelson L. WHYTE and Fred L. Hickling, Appellees.
No. 57-402.
District Court of Appeal of Florida. Third District.
May 8, 1958.
Rehearing Denied June 12, 1958.
*850 Shutts, Bowen, Simmons, Prevatt & Julian, and Milton M. Ferrell, Miami, for appellants.
Jeptha P. Marchant and Joseph A. Perkins, and S. Grover Morrow, Miami, for appellees.
DREW, E. HARRIS, Associate Judge.
This is an appeal from a final decree rendered in the Circuit Court for Dade County. The suit was one for declaratory decree concerning a contract under which the appellees Whyte and Hickling had sold the corporate stock of their transportation company, Coast Cities Coaches, Inc., to the appellants Morris and Green.
In the contract in question, in paragraph one, it was acknowledged that the corporation was indebted to Whyte for $145,422.96 and to Hickling for $9,000 aggregating $154,422.96. It was provided that such indebtednesses would be evidenced by a new note of the corporation, and would be repaid "out of the net earnings" of the corporation in accordance with paragraph three of the agreement.
In paragraph two it was agreed that the purchasers would pay $80,000 to Whyte for his 80 shares of the common stock of the corporation, and would pay $40,000 to Hickling for his 40 shares, and that these sums also would be paid only "out of the net earnings" of the corporation in the manner set forth in paragraph three.
Paragraph three of the contract provided as follows:
"(3) It is understood that payment to the stockholders of the indebtedness set forth in paragraphs 1 and 2 above will be paid by applying on said indebtedness one-half (1/2) of the net earnings of the company computed annually at the end of each calendar year. The net earnings shall be determined in accordance with standard accounting practices and shall be arrived at after the payment of all federal income and other taxes due. The application of the said one-half (1/2) of the earnings to the indebtednesses referred to shall be made in proportion to the respective amounts thereof; that is, one-half (1/2) of the net earnings annually shall be applied to each of said indebtednesses in the percentage that such indebtedness bears to the sum total of all the indebtednesses amounting to two hundred seventy-four thousand four hundred twenty-two & 96/100 ($274,422.96) dollars."
For the several years which intervened between the time of such sale and the filing of the suit, the corporation showed an annual net operating income of between ten and twenty thousand dollars. In those years there was included in the annual statement an item of interest expense (the origin and nature of which is not explained on the record) in amounts ranging from fourteen to twenty thousand dollars, and enough to offset the net operating income figure and to indicate an overall net loss for the year.
One of the sellers, the appellee Whyte, filed the suit for declaratory decree against the above named appellants, and joined the other seller Hickling as a defendant. By his amended complaint Whyte elaborated on the facts above referred to, alleged that he had received no payments and sought a ruling that the contract provision *851 for payment of the obligations to him and Hickling out of the "net earnings" of the corporation entitled them to be paid out of the "net operating income" without deduction of the said "interest expense," and to recover amounts payable on that basis.
Defendants Morris and Green filed a motion to have the court eliminate the defendant Hickling from the case. Denial of the motion was assigned as error. That assignment was without merit, because the suit was for the construction and enforcement of a contract to which Hickling was a party, and where his rights, which were the same as those of the plaintiff Whyte, necessarily would be affected. If Hickling was not a necessary party he was a proper one.
The defendants Morris and Green filed motions to dismiss and to transfer the cause to the law side of the court, which motions were denied. Answers were filed in which said defendants contended there were no provisions of the contract requiring construction by the court and denied that there was any dispute as to the meaning of the contract. However, the defendants insisted on the benefit of the contract as they had construed it.
Refusal to transfer the cause to the law side was not harmful, or prejudicial error. The suit was filed under Chapter 87, Fla. Stat., F.S.A., relating to declaratory decrees and judgments. It was within the purview of that act, because the parties were in real doubt and disagreement regarding the construction to be placed upon a contract affecting them. See May v. Holley, Fla. 1952, 59 So.2d 636, 639; Modernage Furniture Corp. v. Miami Rug Company, Fla. 1955, 84 So.2d 916, 918. In City of Miami v. Miami Transit Company, Fla.App. 1957, 96 So.2d 799, it was pointed out that a suit for declaratory decree may be filed either in equity or at law, and that the choice should depend upon the subject matter in determining whether it is cognizable in equity or at law.
Appellants argue that the refusal of the court to transfer the cause to the law side deprived them of a jury trial. That would not be so in a proceeding for declaratory decree under Chapter 87. Actions thereunder styled on the law side do not contemplate jury trial, though provision is made for submission of issues of fact in such cases for determination by a jury. See Section 87.08, Fla. Stat., F.S.A.
This record does not disclose any rejected request to assign an appropriate factual issue in the case for decision by a jury. Moreover, the main question was one of construction of the contract which, though it involved some evidence, was primarily a question of law to be ruled on by the court.
The trial before the court was concerned primarily with the matter of construing the contract on this issue relating to interest. The chancellor made a decree in which he held, in favor of the sellers, that the contract called for payment of the indebtednesses in question by application annually of one-half of the earnings consisting of the net operating income after taxes; thus holding that the corporation was not entitled to offset such income by charging against it the interest on corporate obligations, and the decree included money judgments accordingly, in favor of Whyte and Hickling, with provisions to secure and enforce the judgments, and for costs.
We turn now to appellants' third point, based on assignments of error challenging the disregard of interest on corporate obligations in determining the corporation's net earnings, and which point is stated in appellants' brief as follows:
"Where an agreement provides that certain debts owed by a corporation and certain other debts owed by its stockholders for purchase of their stock are all to be paid only out of the corporation's net earnings `determined in accordance with standard accounting practices and * * * arrived *852 at after the payment of all federal income and other taxes due', such net earnings must be determined after deducting interest on current corporate debts."
Having held that this suit was properly brought under the declaratory judgment act (Chapter 87, Fla. Stat., F.S.A.), we are necessarily required to examine the contract in question for the purpose of determining the intention of the parties at the time the contract was entered into. Clark v. Clark, Fla. 1955, 79 So.2d 426. It should also be observed that every contract is made in view of the law in force and applicable thereto. Grand Lodge, etc. v. Williams, 122 Fla. 147, 165 So. 688.
If we were dealing with the abstract proposition of what constituted net income under standard accounting practices, we might be able to agree to the conclusions reached by the chancellor in the trial court that interest on corporate debt may not be deducted. That, however, is not the real question with which we are confronted. The plaintiffs in bringing the suit under the declaratory judgment act necessarily accepted the premise that doubts and uncertainties existed with reference to the contract which they were entitled to have resolved. We are, therefore, not dealing with an abstract or theoretical proposition; the prime subject of our inquiry is what the parties intended to accomplish by the contract itself. This requires a careful consideration of not only the words used in the contract but the obvious purpose intended to be accomplished by it.
It should be emphasized that no question of fraud, bad faith or mismanagement is involved in this case. The basic issue is the technical one involving the fund from which these indebtednesses should be paid.
We think the answer to this whole proposition is found in the simple observation that during all of the years under question this corporation could not have legally paid any dividend to any of its stockholders.
The questioned language, "net earnings * * * in accordance with standard accounting practices" is used in connection with the provision for the repayments not only of the corporation's indebtednesses to Whyte and Hickling but also in connection with the indebtedness for the purchase of the 120 shares of stock of Whyte and Hickling. Obviously corporate funds other than those lawfully allocable to dividends could not be used to pay for the purchase of the stock from Whyte and Hickling. To put it another way, any funds of the corporation used to pay for the stock of Whyte and Hickling would have to be charged to the dividend account of the corporation and would be income to the sole stockholder of the company (the assignee of Whyte and Hickling of the 120 shares). It is conceivable, however, that the indebtedness of the company to Whyte and Hickling could be paid out of other assets of the company. Therefore, we must assume that in using the same language with reference to both accounts it was intended that only those assets of the corporation which could lawfully be used in the payments of dividends could be used in the discharge of either of the indebtednesses.
The statutes of this state provide that dividends may be paid to stockholders from net earnings or from any surplus of assets over liabilities including capital of the corporation but not otherwise. See Section 608.52, Fla. Stat., F.S.A. The law is abundantly clear that in determining the question of net earnings for the purpose of paying dividends, interest charges must be deducted. 13 Am.Jur. 661, sec. 668. See also the annotation appearing in 55 A.L.R., beginning at page 27.
We, therefore, conclude that the intention of the parties was that interest on the corporate indebtedness would have to be deducted in determining the fund out of which the questioned accounts were to *853 be paid. Such conclusion results in a lawful contract as to both items  the opposite conclusion necessarily results in rendering the provision for the payment for the stock illegal. James v. Gulf Life Insurance Co., Fla. 1953, 66 So.2d 62, 7 Fla.Jur., Contracts, §§ 86-88.
This question is not one which can be determined on the theory that there was substantial evidence to support the findings and ruling of the chancellor. The question of what the parties intended by the use of the questioned words resolved itself into a mixed question of law and fact. We hold that the trial judge was in error in his conclusions of law and misconstrued the legal effect of the evidence, and that the decree should be, and it hereby is reversed, with directions to enter a decree in accordance with these views.
Reversed.
CARROLL, CHAS., C.J., and HORTON, J., concur.
