
297 N.W.2d 776 (1980)
Vic WILHELM, Plaintiff and Appellee,
v.
Lucas BERGER, Defendant and Appellant.
Civ. No. 9768.
Supreme Court of North Dakota.
October 6, 1980.
*777 Gordon O. Hoberg, Napoleon, for plaintiff and appellee.
Thomas W. Robb, Bismarck, argued, and Brian W. Nelson, Fargo, for defendant and appellant.
SAND, Justice.
This is an appeal by the defendant, Lucas Berger, from a district court judgment in the amount of $25,452.29 for the plaintiff, Vic Wilhelm. We affirm.
The action involved two main areas of dispute between Berger and Wilhelm. The first area of dispute involved the number of hours and rate of compensation for work done by Wilhelm at a truck stop owned by Berger. Wilhelm and Berger presented conflicting testimony at trial on the rate of compensation. According to Wilhelm's testimony, the rate of compensation was $15.00 per hour for 126 hours of work. According to Berger's testimony, there was no promise by him to pay Wilhelm for the work, and Wilhelm was working for his room, board, and storage of a tractor at Berger's truck stop. Berger also testified that Wilhelm worked for "probably 20 hours" at Berger's truck stop.
The second area of dispute involved several advances made by Wilhelm to Berger during the time that the parties were negotiating the sale of the Silver Dollar Bar in Mandan, North Dakota. The advancements were to be applied towards the purchase price if Wilhelm purchased the bar. The sale of the Silver Dollar Bar to Wilhelm was never completed, and the major area of *778 disagreement between Wilhelm and Berger was whether or not Wilhelm was to get back the advancements. Wilhelm testified that Berger was to pay back the advancements if the sale was not completed. Berger testified that if the sale was not completed the advancements would not be repaid.
The parties met to reach a settlement when negotiations for the sale of the Silver Dollar Bar fell through. It is undisputed that Berger executed a promissory note as part of the settlement agreement. It is also undisputed that the note was for $9,500.00, with monthly payments of $100.00 and that $1,600.00 was paid on the note by Berger. Berger testified that the promissory note was intended to be a complete settlement between the parties. Wilhelm testified that the promissory note, plus a mobile home and the land on which the mobile home was located, was the agreed-upon settlement between the parties. Wilhelm further testified that Berger was to make monthly payments on the mobile home until Berger's debt against the mobile home was cleared. Berger did not make the payments and the mobile home was repossessed after Wilhelm lived in it for approximately twelve months.
The district court found that Wilhelm worked 126 hours at the rate of $12.50 per hour at Berger's truck stop, and granted him $1,575.00, plus interest, for a total of $1,893.11 for his work. The district court also found that Wilhelm gave to Berger, or on Berger's behalf, the following advances:


10 Jan 1976, check for money on the purchase
of the Bar                                      $    500.00
10 Feb 1976, check                                10,000.00
2 Feb 1976, check to "Shilla & Sons"[1] for
liquor for the Bar                                   448.93
14 Dec 1976, check                                 7,000.00
2 Feb 1976, check                                  1,400.00
13 Mar 1976, check for liquor                      3,703.73
                                                 ------------
Total paid by Wilhelm to Berger or on his
behalf                                           $23,052.66

The district court denied recovery by Wilhelm of the $500.00 earnest money payment but allowed recovery on the other advancements in the sum of $22,552.66, plus interest, for a total of $27,559.18. Thus, Wilhelm was granted $29,452.29 for the work and advancements. The district court allowed Berger to offset the sum of $1,600.00 paid under the promissory note and the sum of $2,400.00 for reasonable rental value of the mobile home during the twelve months Wilhelm lived in it resulting in a judgment for Wilhelm, after offsets, in the amount of $25,452.29. Berger appealed from that judgment to this court.
The first issue Berger raised on appeal is whether or not the district court erred in rejecting the affirmative defense of the statute of frauds.
Berger's attorney objected to testimony concerning conversations in the negotiations for the sale of the Silver Dollar Bar because there was no writing to satisfy the statute of frauds. In order to raise the affirmative defense of the statute of frauds, Rule 8(c), North Dakota Rules of Civil Procedure, requires that the defense be pleaded. Berger's answer does not contain the statute of frauds defense, but it does appear that Berger's attorney made a motion at the beginning of the trial to amend his pleadings to contain the defense. However, several other preliminary matters were also before the court, and the trial judge apparently overlooked the motion and did not specifically rule on it. Despite this oversight and because Berger raised the statute of frauds issue again during the trial without an objection by Wilhelm, we believe that the matter was impliedly tried by the parties and can be considered on this appeal.
The district court judge allowed testimony on the negotiations for the sale of the Silver Dollar Bar because, as he stated:

*779 "The Court feels that nowhere in the complaint has the Plaintiff asserted that he bought the Silver Dollar Bar. He asserted only that there was discussions concerning it. He doesn't state whether there was or was not even any final contract or entire real contract entered into by the parties. The Court feels that under the pleadings that the Plaintiff has a perfect right to testify concerning the negotiations if such there were to purchase and the amounts of money that he advanced the Defendant during this period of time."
The purpose and intent of the statute of frauds is to prevent fraud and perjury, and the statute should not be used as a defense where the effect would be to accomplish a fraud or to enable a party to enrich himself unjustly at the expense of another. Nelson v. TMH, Inc., 292 N.W.2d 580 (N.D.1980); Farmers Cooperative Association of Churchs Ferry v. Cole, 239 N.W.2d 808 (N.D.1976). See 73 Am.Jur.2d, Statute of Frauds, § 563-564. Furthermore, we believe that it is implicit from case law that whether or not the statute of frauds shall be allowed as a defense depends on the facts and circumstances of the individual case. See Nelson v. TMH, Inc., supra.
From the facts developed, both parties stood in similar positions regarding the statute of frauds. Both Wilhelm and Berger agreed that the sale of the Silver Dollar Bar was never completed. The evidence was indefinite and uncertain as to the details of the proposed sale of the Silver Dollar Bar. It was undisputed that several advances were made, and it is apparent from the parties' conduct that there was an agreement of some kind concerning the advances. Both parties agreed that the advances provided by Wilhelm would go toward payment for the Bar if the deal went through. However, Wilhelm and Berger disagreed on what would happen to the advances if the sale was not completed. Wilhelm testified that the advances were to be repaid, and Berger testified that the advances were not to be repaid. Based on the facts[2] and circumstances of this particular case, we believe that both parties would necessarily need to present evidence concerning what would happen to the advances if the sale was not completed. If Berger was allowed to assert the statute of frauds defense to Wilhelm's evidence, it would indirectly accomplish a fraud and unjustly enrich Berger. Accordingly, we believe that the trial court did not commit error in allowing evidence relating to negotiations for the sale of the Silver Dollar Bar.
The second issue Berger raised on appeal is whether or not the evidence was sufficient to support the trial court's findings.
The scope of review of the trial court's findings on an appeal to this Court from a case tried without a jury is limited by Rule 52(a), NDRCivP, which provides, in part:
"Findings of fact shall not be set aside unless clearly erroneous, and due regard shall be given to the opportunity of the trial court to judge of the credibility of the witnesses."
A trial court's findings of fact are "clearly erroneous" when, although there is some evidence to support it, the reviewing court on the entire evidence is left with a definite and firm conviction that a mistake has been made. Keidel v. Rask, 290 N.W.2d 255 (N.D.1980); Cofell's Plumbing & Heating, Inc. v. Stumpf, 290 N.W.2d 230 (N.D.1980). The mere fact that the appellate court might have viewed the facts differently if it had been the initial trier of the case does not entitle it to reverse the lower court. In re Estate of Elmer, 210 N.W.2d 815 (N.D. 1973). Furthermore, "a choice between two permissible views of the weight of the evidence is not clearly erroneous." In re Estate of Elmer, supra at 820, citing United States v. Yellow Cab Co., 338 U.S. 338, 70 S.Ct. 177, 94 L.Ed. 150 (1949).
*780 Berger concedes in his brief and at oral arguments that the case was essentially a matter of "one man's word against another's." In cases like this we must keep in mind the admonition of Rule 52(a) that "due regard shall be given to the opportunity of the trial court to judge of the credibility of the witnesses." With this in mind, we conclude that the trial court could reasonably have weighed the conflicting evidence in Wilhelm's favor, and, accordingly, the trial court's findings are not clearly erroneous.
The judgment of the trial court is therefore affirmed.
ERICKSTAD, C. J., and PAULSON, PEDERSON and VANDE WALLE, JJ., concur.
NOTES
[1]  Plaintiff's exhibit 3 contains photocopies of two checks. One check is payable to "McQuade Dist." for the amount of $326.00. The second check is for the amount of $448.93 and was identified by both Wilhelm and Berger as being payable to "Ed Phillips & Sons". The payee in the photocopy is not fully legible and because of the testimony of Wilhelm and Berger we believe the "Shilla & Sons" referred to in finding of fact II should be "Ed Phillips & Sons".
[2]  No evidence was introduced that Wilhelm ever took possession of the Bar or that Wilhelm participated in the profits of the Bar, or that a partial performance was accomplished in any manner.
