
344 N.W.2d 699 (1984)
FARMERS FEED & SEED, INC., a South Dakota corporation, Plaintiff and Appellee,
v.
MAGNUM ENTERPRISES, INC., a South Dakota corporation; and John Broek, John Olfert, Forrest D. Hubers, Milton B. Procter, Leslie J. Broek, Individually and in their capacity as directors of Magnum Enterprises, Inc., Defendants and Appellants.
No. 14224.
Supreme Court of South Dakota.
Argued January 16, 1984.
Decided February 29, 1984.
*700 John T. Hughes of Morman, Smit, Shepard, Hughes & Wolsky, Sturgis, for plaintiff and appellee.
Thomas P. Tonner of Maynes, Tonner, Maynes & Tobin, Aberdeen, for defendants and appellants.
DUNN, Justice.
This is an appeal from a summary judgment granted to the plaintiff, Farmer's Feed & Seed, Inc. (Feed & Seed), in an action to recover on a contract. We reverse and remand.
Feed & Seed is a South Dakota corporation engaged in the processing of grain and the selling of feed in Sturgis and Rapid City, South Dakota. Magnum Enterprises, Inc. (Magnum), is a South Dakota corporation engaged in the production and marketing of agricultural products.
On July 6, 1981, Magnum offered to purchase, for a sum of $1,423,000, all of the real property, equipment, inventory, and shares of Feed & Seed. The offer was subject to seven written contingencies, the fifth of which was a certified audit of Feed & Seed. The offer specifically stated: "(5) Subject to acceptance by the buyers of a certified audit. This contingency will be removed by written acceptance of the said audit with (sic) 5 working days after delivery." Feed & Seed accepted the offer on July 7, 1981. Pursuant to the agreement, the directors of Magnum executed a note in the amount of $60,000 to serve as an earnest money payment.
Feed & Seed had an audit of their business prepared, as required by the agreement, and it was delivered to Magnum. However, Magnum did not make written acceptance of the audit, claiming that the results of the audit did not meet its expectations. Despite the fact that there was no written acceptance of the audit, the president of Feed & Seed and the realtor involved in the transaction stated that Magnum's *701 directors led them to believe the deal was still on and the money would be paid.
When Magnum paid neither the $60,000 note nor the balance of the purchase price, Feed & Seed filed suit against Magnum and its directors, seeking relief in the form of the earnest money payment, punitive damages, and other miscellaneous damages. Feed & Seed also moved for summary judgment. In granting the motion, the trial court found that Magnum waived the fifth contingency in the contract and should be estopped from asserting it due to the alleged representations by Magnum's directors that the deal was still on. The trial court also found that because of undercapitalization, failure to observe corporate formalities, and the use of the corporation to promote injustice, it would disregard Magnum's corporate entity and enter judgment against both the corporation and Magnum's directors as individuals. Magnum and its directors (appellants) appeal the judgment.
Appellants raise four issues on appeal, the first of which is whether the trial court erred by granting summary judgment to Feed & Seed. Appellants claim that summary judgment is improper because there are genuine issues of material fact to be determined in this case. We agree.
SDCL 15-6-56(c) states that summary judgment shall be rendered if the pleadings, depositions, answers to interrogatories, and admissions, together with any affidavits, show that there is no genuine issue as to any material fact and that the moving party is entitled to judgment as a matter of law. The guiding principles as to the use of summary judgment are: 1) the evidence must be viewed most favorably to the nonmoving party; 2) the burden of proof is on the moving party to show clearly that there is no genuine issue of material fact; 3) summary judgment is not intended to be a substitute for trial where any genuine issue of material fact exists; 4) a surmise that a party will not prevail at trial is not sufficient basis to grant the motion on issues which are not shown to be sham, frivolous, or so unsubstantial that it is obvious it would be futile to try them; 5) summary judgment is an extreme remedy and should be awarded only when the truth is clear, and reasonable doubts touching the existence of a genuine issue as to material fact should be resolved against the moving party; 6) however, the court may expose sham claims and defenses by the nonmoving party. Bourk v. Iseman Mobile Homes, Etc., 316 N.W.2d 343 (S.D.1982); Wilson v. Great Northern Railway Company, 83 S.D. 207, 157 N.W.2d 19 (1968).
With these principles in mind, we have carefully examined the record. The evidence reveals genuine issues of material fact which make this case an improper subject for summary judgment. First, appellants have raised a valid contract defense: failure of a contingency. Feed & Seed admits there never was written acceptance of the audit by Magnum as required under the contract. This is critical because it is a general principle of contract law that failure of a condition precedent such as this bars enforcement of the contract. 5 Williston on Contracts § 663 (1961); 5A Corbin on Contracts § 1175 (1964). Whether the contingency was waived becomes a material question of fact in light of testimony by a director of Magnum to the effect that Magnum demanded of Feed & Seed that the contingencies be met. Such testimony is certainly not an admission by appellants that they waived the contingencies. Therefore, summary judgment was improper, and a trial is necessary to determine whether appellants did in fact waive any of the contract contingencies.
Second, it is correct that a court may pierce the corporate veil when retention of the corporate fiction would produce injustices and inequitable consequences. Mobridge Community Industries v. Toure, Ltd., 273 N.W.2d 128 (S.D.1978). Factors allowing a court to pierce the corporate veil are: 1) fraudulent representations by corporation directors; 2) undercapitalization; 3) failure to observe corporate formalities; 4) absence of corporate records; 5) payment by the corporation of individual obligations; or 6) use of the corporation to promote fraud, injustice, or illegality. Curtis v. Vlotho, 313 N.W.2d 469 (S.D.1981); Mobridge Community Industries, supra.
*702 In the present case, even though there is considerable evidence of undercapitalization, there is also evidence that Magnum's directors were willing to infuse more funds into the corporation and that loans could be obtained to cover Magnum's obligations. There is also evidence that Magnum did keep proper records of many of its activities and observed many of the corporate formalities. Therefore, appellants have, at the very least, raised fact issues as to whether Magnum is undercapitalized, whether proper records were kept, etc. We hold that a court should pierce the corporate veil only upon the strongest evidence of the factors outlined in Vlotho and Mobridge Community Industries; piercing the veil by summary judgment is inappropriate when there is any conflicting evidence on this issue. As we stated in Mobridge Community Industries, a corporation must be looked upon as a separate legal entity until there is sufficient reason to the contrary. 273 N.W.2d at 132.
Because of our holding on the issue of summary judgment, we need not deal with appellants' other contentions. The judgment is reversed and the case remanded for trial.
All the Justices concur.
