
127 Cal.App.2d 111 (1954)
EDWARD COMMEFORD et al., Appellants,
v.
HARLEY H. BAKER et al., Respondents.
Civ. No. 20202. 
California Court of Appeals. Second Dist., Div. Three.  
Aug. 12, 1954.
 S. V. O. Prichard and Robert P. Schifferman for Appellants.
 Eugene L. Wolver for Respondents.
 SHINN, P. J.
 In this action plaintiffs Commeford, Huisman, Matlock and Fortin recovered judgment against Harley H. Baker, Charlotte Baker, Aircraft Die Cutters and A.D.C. Plastics, Inc. (hereinafter referred to as defendants), in the sum of $8,823.33. They had sued for $45,359.54; defendants had filed a counterclaim for $80,934.09, upon which recovery was denied. The complaint contained two causes of action. Recovery was allowed on the first cause of action, *113 which sought $9,599.54. As to the second cause of action which sought $35,760.50, a nonsuit was granted and plaintiffs' motion to amend that cause of action to conform to the proof was denied. Plaintiffs appeal from the judgment of nonsuit as to the second cause of action.
 It was alleged in the first cause of action that on or about October 27, 1950, plaintiffs were employed by defendants for an unspecified term at a monthly salary of $500 for each, plus $150 a month, drawing account against commissions, and also 6 per cent of the gross sales to be divided between them after deducting $50,000 sales to Convair, the commissions to be paid semiannually from October 9, 1950, sales expenses of plaintiffs to be deducted from the 6 per cent prior to division. Commeford was employed as plant superintendent,, Huisman for engineering and sales, Matlock for engineering and sales, and Fortin as manager and sales; plaintiffs fully performed all services required of them between October 27, 1950, and August 31, 1951; they secured orders for work in the sum of $896,000, which orders were accepted and retained by defendants as profitable for fulfillment; $300,000 of said orders had been filled and the products delivered up to August 31st. On or about April 1, 1951, defendants accounted for $113,699.10 of filled orders and agreed there was a net total of commissions due of $3,539.36, which sum was paid to plaintiffs. On or about August 31, 1951, defendants, in writing, notified plaintiffs of termination of the employment. It was alleged that 6 per cent of sales of $186,300.90, fully performed and delivered by August 31, 1951, less sales expenses of $1,278.51, had not been paid except for advancements of $300. The second cause of action incorporated by reference the allegations of the first cause of action except those relating to the sales orders which were fully executed by August 31st in the amount of $186,300.90. It was further alleged that on or about August 31, 1951, there were orders, in addition to those that had been fully executed, in the amount of $596,000, which orders were partially and substantially completed, and it was alleged on information and belief that 75 per cent of said orders had been filled by August 31st; also that defendants were continuing to fill said orders and receiving payment therefor. It was alleged that the reasonable value of plaintiffs' services and the benefit thereof to defendants with respect to said orders was 6 per cent of the orders, less expenses and advances, or $35,760. Copy of *114 the written contract of employment was attached to and made a part of the complaint as "Exhibit A."  [fn. 1]
 The court found that plaintiffs were employed as alleged; between October 9, 1950, and August 31, 1951, plaintiffs procured orders of $287,340 which were filled and the products delivered prior to August 31, 1951; that commissions of $3,539.38 had been paid; the employment was terminated August 31, 1951; $8,823.33 of commissions on orders of $287,340 had not been paid. The judgment was for $8,873.40 as the balance of commissions upon orders that were fully executed by August 31st. No findings were made as to the allegations of plaintiffs' second cause of action for the reason "... that the Court at the conclusion of the Plaintiffs' case granted the motion of the Defendants for a non-suit as to said Second Alleged Cause of Action." Findings were against defendants on their counterclaim. *115
 Plaintiffs' case consisted of evidence as to plaintiffs' services, the procuring of the orders, their acceptance and their execution by defendants. Defendants' records and resumes were in evidence showing completion of all orders except those for $71,636 which were in process of execution. At the close of plaintiffs' case defendant made a motion for nonsuit as to the second cause of action. The argument on the motion centered upon the fact that the second cause of action by incorporating allegations of the first cause of action set out the contract and alleged that plaintiffs' services were performed thereunder. It appears clearly from the argument on the motion contained in the reporter's transcript that the court granted the motion upon the ground that plaintiffs had pleaded the contract in the second cause of action. Plaintiffs advanced the theory that the contract was set out merely to show the relationship of the parties and as a foundation for plaintiffs' claim for compensation in the amount of the reasonable value of their services. The court correctly held that plaintiffs would have to recover on the contract or not at all. The clerk entered minutes April 1, 1953, showing the motion was submitted. Plaintiffs made application for leave to file an amended complaint and the minutes show their motion was submitted April 7th and denied April 8, 1953. By order of January 27, 1954, the minutes were corrected to show that the nonsuit was granted April 1, 1953. The motion was therefore made and ruled on while the minutes showed the motion for nonsuit to be under submission.
 The record does not show that plaintiffs tendered a fourth amended complaint but it may be assumed that it was desired to amend to conform to the view the court had expressed, namely, that plaintiffs' action was upon the contract and that there could be no recovery in quantum meruit. Plaintiffs now assert their right of recovery under the rule, "A Sales Agent is Entitled to Recover Commissions on Orders Procured by Him before the Termination of His Employment But Delivered Thereafter." And they cite numerous authorities in support of this proposition, and they also rely upon the rule "A Principal May Not Revoke a Sales Agency, Intending Thereby to Deprive the Agent of His Commissions, Without Compensating the Agent for the Benefit Conferred Upon the Principal," citing the Restatement, Agency and supporting authorities. And they say also that since they pleaded and proved all facts necessary to support a recovery on the contract they should not have been denied a recovery merely *116 because the second cause of action was framed on an erroneous theory.
 In the light of the evidence the motion for nonsuit as to the second cause of action was properly granted. Plaintiffs pleaded the express contract and the performance of their services pursuant thereto. To the extent that the second cause of action proceeded upon an erroneous theory the motion was granted upon the authority of our decision in Thacker v. American Foundry, 78 Cal.App.2d 76 [177 P.2d 322]. This ruling on the motion for nonsuit, however, is not the important question in the case. [1a] The next question is whether it was an abuse of discretion to deny plaintiffs' application for leave to amend. With reservations as to what we shall presently discuss concerning ambiguity of the contract, we are of the opinion that it was an abuse of discretion for the reason that the practical effect of the ruling was to put plaintiffs out of court with respect to the only real controversy in the case. All the facts had been pleaded, the plaintiffs' evidence was in and plaintiffs sought only leave to amend to conform to the proof. Since the court had held that plaintiffs' recovery would have to be on the contract the only amendment necessary to conform to that ruling would have been a change of theory by eliminating the allegation of reasonable value or benefit and demanding the same amount as commissions. The first cause of action was on the contract and defendants were fully aware of the issues they would have to meet. They would not have been prejudiced in any manner by an amendment of the second cause of action so as to seek an additional recovery on the contract. [2] The courts render judgment on the basis of the law as applied to the established facts, and if these warrant a judgment for the plaintiff, relief may not justly be denied for the sole reason that the case was made under an erroneous theory. Aside from the question of ambiguity we cannot see that it would have been necessary to amend the second cause of action in order for it to be sufficient to permit of a recovery on the contract. By granting the nonsuit and denying the motion to amend, the court eliminated from further consideration all question as to plaintiffs' right to recover commissions on orders of more than $500,000 which were executed after plaintiffs' employment was terminated. It will be developed in our discussion that as a result of the court's rulings there has been no decision on the merits as to plaintiffs' claim to commissions of more than $35,000. *117
 Under the contract plaintiffs were entitled to commissions of 6 per cent on gross sales. The contract was ambiguous. (See Willson v. Niagara Duplicator Co., 88 Cal.App.2d 63, 74 [198 P.2d 362].) "Gross sales" might mean all orders which were accepted by defendants. The term might also mean orders procured, accepted and which were fully executed by delivery of the product. The parties may have understood and intended the term to mean either the one thing or the other. As we see it the entire case and the rights of the parties hinged upon the understanding of the term "gross sales" by the parties and their purpose in the use of that term in the contract. What did they understand would be necessary to constitute a "sale." If it was the intention that commissions were to be computed upon the amount of orders accepted by defendants, plaintiffs were entitled to additional commissions, even though the orders in the larger part were not executed until after the termination of plaintiffs' employment. Upon the other hand, if it was the understanding that gross sales would encompass only sales executed by delivery during the term of plaintiffs' employment, additional commissions were not earned by plaintiffs, even though the orders were executed after termination of the employment.
 The ambiguity of the contract was apparent and the question as to the understanding and intentions of the parties in using that term stood out as the controlling factual question in the case. It received scant consideration at the trial. There was no evidence respecting the negotiations between the parties before or at the time plaintiffs were employed. There were, however, significant circumstances in evidence which tended to illustrate the understandings of the parties as to the duties of plaintiffs and the manner in which the business would be conducted and sales would be made. We mention a few: Defendants were operating several plants and they wished to branch out into the plastics and fiber glass field. Mr. Baker was in somewhat delicate health. Mrs. Baker had a large part in running the business. At the time plaintiffs were hired Fortin was in charge of plastic engineering at Lockheed, Huisman was chief plastic engineer at North American Aviation, and Matlock was a structural mechanical engineer employed by Lockheed. Commeford had been in charge of the plastics engineering section at Northrop. Plaintiffs were engineers, were experts in their fields, and were to have and did have heavy responsibilities with defendants. *118 They were not merely salesmen; they were producers and the court found that they had all the duties and responsibilities that would ordinarily attach to their respective positions as "Plant Superintendent," "Engineering and Sales," and "Manager and Sales." There was no evidence and no finding respecting the nature or extent of the duties plaintiffs would be under to execute orders if they had been accepted by defendants. In other words, there was no evidence bearing upon the question whether the parties understood that the services of plaintiffs with respect to the making of a sale would be complete when an order was accepted, or, to make a complete sale, additional services would be required of plaintiffs in the execution of the order.  [fn. 1] In such circumstances it becomes important to determine whether the services of plaintiffs with respect to sales were severable from their engineering, management and other services. (See Zinn v. Ex- Cell-O Corp., 24 Cal.2d 290 [149 P.2d 177].)
 As we shall see, defendants made an attempt to show that the parties defined the ambiguous term by their subsequent conduct, but their main reliance was upon the erroneous theory stated in their brief as follows: "... it is the law of this state that where a contract of employment terminable at any time by either party, is terminated by the employer, the employees' right to the stipulated percentage of the gross sales of the employer's business, ceases as of the date of the termination of the contract." For this statement defendants cited to the trial court and cite here Thacker v. American Foundry, 78 Cal.App.2d 76, supra, as a case exactly in point. Our opinion in the Thacker case does not support the above contention of defendants. In the Thacker case it was held that the plaintiff could not recover as compensation a share of profits earned after his employment had been terminated. There was no question in that case of the existence of a contract which might be construed as entitling Thacker to a share of the profits earned after he had been discharged. There is such a contract in the present case, although it is one which required the court to look beyond the writing itself for an interpretation. [3] Of course, the right of a salesman or any other person to commissions under given circumstances depends upon the terms of his contract for compensation. Commissions may be payable on orders procured by a salesman which are not filled until after he has been discharged. *119 (Brown v. Trophy-Craft Co., 97 Cal.App.2d 594 [218 P.2d 128].)
 Defendants realized that the contract was ambiguous. In the answer as a third and separate defense they alleged: "That pursuant to the provisions of Exhibit 'A' annexed to the Third Amended Complaint, plaintiffs were to receive '6% of gross sales'; that heretofore, and particularly on or about the 1st day of April, 1951, the parties to said Exhibit 'A' interpreted and by their accounting had on said date, indicated that said 'gross sales' applied only to orders theretofore obtained by plaintiffs and fully fulfilled, completed, delivered and upon which the consideration from the vendee had been received in full, less any returns, rejections, credits upon or repayment of such consideration." The court made the following finding, "That the parties to Exhibit 'A' interpreted, by their accounting had on the 1st day of April, 1951, the words 'gross sales' contained in said contract to apply only to orders obtained by the Plaintiffs and fully performed, completed and delivered; except as herein expressly found, the Court finds that the allegations contained in the Defendants' Third Matter of Defense are untrue." [1b] Thus the court recognized that the contract was ambiguous. However, the finding is not, and does not purport to be, a finding as to the understandings or intentions of the parties with respect to the meaning of "gross sales" at the time of the execution of the contract. The allegation of the answer related to the fact that on April 1, 1951, plaintiffs were paid commissions upon the amount of orders that had been executed and paid for up to that date. The answer referred to it as an accounting and alleged that the parties "... by their accounting had on said date, indicated that said 'gross sales' applied only to orders theretofore obtained by plaintiffs" etc. The allegation that the accounting indicated that the term "gross sales" had a particular meaning was no less ambiguous than the agreement itself. Furthermore, there was no evidence whatever that the payment of certain commissions on April 1st had any bearing whatsoever upon the understanding of the parties as to the meaning of "gross sales," and the intentions of the parties in using that term in the contract. At or before the payment was made there was no dispute, and there was no discussion as to the meaning of the term. No one but Mr. Huisman testified concerning the settlement. He testified that Mrs. Baker stated that the business was short of cash and for that reason could not make payment of commissions *120 earned before the money was received in payment of the orders. Plaintiffs did not question her statement. They did not ask for any more money and, in fact, waited a month for their checks. Mrs. Baker did not testify. The allegation of the answer and the so-called finding shed no light whatever upon the understanding of the parties with respect to the ambiguity of the agreement. The finding is a nullity. It impliedly recognizes the ambiguity but leaves the factual question undetermined. We therefore have no finding upon the one issue of fact upon which plaintiffs' right to commissions depends.
 [4] It is a settled rule of appellate procedure that a judgment may not stand in the absence of findings on the material issues which support the judgment. There are situations in which the failure to make a finding is not fatal to the judgment, but the present situation is not one of them.
 If plaintiffs had stood on the second cause of action of their complaint and if the court, after a trial of the issue had found that gross sales meant all orders which were accepted by defendants, all the facts would have been found which were necessary to enable plaintiffs to recover full commissions on the total amount of such orders. The fact that plaintiffs had proved their case under an erroneous theory would not have been a sound reason for denying a recovery. A contrary finding, of course, would have necessitated a judgment for defendants.
 In final analysis the situation is that both parties proceeded upon erroneous theories, plaintiffs on the theory that they could recover on the basis of implied contract, and defendants upon the theory that plaintiffs could in no event recover commissions on orders executed after termination of their employment. As a result the question as to the meaning of the contract was substantially ignored, was not determined by the court, and the merits of the controversy have not been adjudicated.
 The understandings of the parties as to the meaning of the term "gross sales" cannot be determined as a matter of law. The contract is ambiguous in the particulars we have mentioned. Evidence should be received and all facts should be considered which would aid the court in reaching a decision as to the meaning the parties attributed to the term "gross sales." The duty of interpretation is that of the trial court. [5] The question as to the intention of the parties will be one of fact. (Wachs v. Wachs, 11 Cal.2d 322 [79 P.2d 1085]; *121 Walsh v. Walsh, 18 Cal.2d 439 [116 P.2d 62]; MacIntyre v. Angel, 109 Cal.App.2d 425 [240 P.2d 1047]; Universal Sales Corp. v. California etc. Mfg. Co., 20 Cal.2d 751 [128 P.2d 665].) [6] It is a familiar rule that on appeal the interpretation given an ambiguous contract by the trial court where extrinsic evidence has been received will be given the effect of a decision of fact and will not be disturbed if there is evidence to support it. (12 Cal.Jur.2d  119, p. 326.)
 The record does not contain the argument on the motion to amend, nor any statement of the court of a reason for denying the motion, unless it was the view the court took of the partial settlement of April 1, 1951, as stated in the findings. This, as we have seen, was an erroneous conclusion which had no support in the evidence and was wholly indecisive of any issue in the case.
 [1c] The foregoing considerations lead us to the conclusion that there must be a retrial of the action for a decision on the merits. No just decision of the cause is possible without a determination by a trial court, after the receipt of all proper evidence, as to the meaning the parties attributed to the term "gross sales" as used in the contract. Such a finding will determine whether plaintiffs have been awarded all they have earned or still have a substantial amount due them.
 The judgment is reversed as to the second cause of action. Plaintiffs should be permitted to amend the complaint and defendants to amend their answer; the parties to stand their own costs of appeal.
 Wood (Parker), J., and Vallee, J., concurred.
 The following will confirm agreements reached between Harley H. Baker and Charlotte Baker hereinafter referred to as Party A and Edward Commeford, George Huisman, Robert W. Matlock, Chester H. Fortin, hereinafter referred to as Party B.
 I. Party A to incorporate Aircraft Die Cutters as ADC Plastics Corporation, or similar name. Plans for corporate structure to proceed immediately, with exception of the paper diecutting.
 II. Stock Participation Plan--
 Party B may purchase stock in corporation as established in item I. Each member of Party B to be entitled to an equal number of shares of stock. Twenty-four per cent (24%) has been suggested as maximum amount of capital stock that may be purchased by Party B.
 III. Party B salaries to be $500.00/month, plus $150.00/month as a drawing account against commission. (Drawing account may be increased to cover out of town trips.)
 IV. Party B to receive 6% of gross sales of ADC and divided equally, with the following conditions:
 A. $50,000.00 to be deducted from gross sales to Convair, San Diego.
 B. 6% commission for Party B to be effective from October 9, 1950, and to be paid semi-annually.
 C. Sales expense of Party B to be totalled and subtracted from 6% prior to equal division of semi-annually commission among all members of Party B.
 V. Responsibilities:
 General responsibility of members of Party B to be as follows:
 Edward Commeford, Plant Superintendent
 George R. Huisman, Engineering & Sales
 Robert W. Matlock, Engineering & Sales
 Chester H. Fortin, Manager & Sales
 Harley H. Baker
 Charlotte Baker
 Chester H. Fortin
 George R. Huisman
 Robert W. Matlock
 E. Commeford""
NOTES
[fn. 1]  "October 27, 1950
[fn. 1]  1. It may be noted in this connection that the stipulated commissions were not limited to sales procured or made by the plaintiffs.
