BURKE, Chief Justice.
In late May of 1980, Alaska Protection Services [APS], doing business as Fairbanks Security Service, entered into a contract with Frontier Colorcable [Frontier] to install various sizes of underground television cable in order to service several communities in Fairbanks, Alaska. This contract provided for the installation of three types of cable: trunk cable, distribution cable and drop-in cable. The trunk cable, the backbone of the system, is joined to the distribution cable, which distributes the TV signal to "pedestals" from which three or more houses are serviced. The drop-in cable joins the pedestal to the individual houses. The contract specified that the distribution cable was to be placed at a depth of twelve to eighteen inches.
APS commenced installation in May, 1980. Frontier employed an inspector who signed daily report sheets verifying the length of cable laid each day. On August 30, 1980, this inspector began signing the daily work sheets with qualifying language indicating concern over the depth of the distribution line. APS nevertheless continued to install the cable until completion in October, 1980, when the cable was energized and put into operation.
After the cable was installed and operating, Frontier encountered twenty-eight instances in which cable TV reception was interrupted due to cuts in the distribution cable (e.g. rototillers or bulldozers had sliced the cable). Indicating dissatisfaction with the depth of the distribution cable, Frontier refused to pay for the trunk, distribution and drop-in cable installed after August 30, 1980. The balance due for those installations was $89,390.07. When subsequent negotiations broke down, APS brought suit to recover the $89,390.07. The trial court, sitting without a jury, found that APS had failed to substantially perform the contract and thus denied any recovery. This appeal followed.
At the outset, we are confronted with Frontier's contention on cross-appeal that APS should never have been allowed to bring suit since it was not properly registered as a construction contractor, pursuant to AS 08.18.011 — AS 08.18.171. Frontier first raised this issue before the trial court in a motion to dismiss. Judge Warren W. Taylor summarily denied the motion. By way of cross-appeal, Frontier now renews its claim that AS 08.18.151 serves as an absolute bar to this action. We reject this contention.
AS 08.18.151 provides:
A certificate of registration is issued by the Department of Commerce and Economic Development when an application, together with evidence of bond and insurance coverage,
APS contracted in the name of Fairbanks Security Service to perform the cable installation. At the time of contracting, that name was not registered. Instead APS was registered under another trade name — Goldstream Electric. By contracting under the unregistered trade name of Fairbanks Security Service, APS violated AS 08.18.051, which states in part:
APS admits it has violated this section of the statute. But it argues that the penalty for violating section 051 is contained in AS 08.18.141, which makes it a misdemeanor to violate any provision of the chapter. In APS's view, section 151 should only be applied to bar an action when the contractor has not registered at all at the time of contracting. We agree.
Section 151 imposes a harsh penalty on contractors and thus has not been given a broad or liberal construction. Industrial Power v. Western Modular Corp., 623 P.2d 291, 294 (Alaska 1981). In Industrial Power, we cited with approval California cases interpreting a provision similar to AS 08.18.151 to require "substantial compliance" rather than strict compliance with the registration provisions of the statute.
Substantial compliance requires that the contractor be registered and have bonding and insurance coverage, since these are the primary means by which the statute seeks to protect parties dealing with contractors. When a registered contractor violates section 051 by acting under an unregistered name, the proper penalty is not to bar the contractor access to the courts but instead to subject the contractor to misdemeanor prosecution under AS 08.18.141. Hence to determine whether APS is entitled to maintain this action, our inquiry will focus on whether APS was a registered contractor with bonding and insurance coverage at the time of contracting.
APS submitted evidence to the trial court which clearly indicated that in May, 1980, the time of contracting, Alaska Protection Service, Inc. was registered under AS 08.18.
The second issue on appeal centers on the adequacy of Frontier's pleadings. APS contends that Frontier failed to adequately raise the issue of substantial performance in its pleadings and in its pretrial memorandum. The trial court found that Frontier's pleadings adequately raised the issue of substantial performance. It further found that APS had not proven substantial performance due to the shallowness of the cable. Therefore, judgment was rendered for Frontier on APS's claim.
APS then moved to reopen its case in chief and to permit further discovery, arguing that "[b]ecause Defendant never properly raised the issue of substantial performance prior to the trial, Plaintiff was not prepared to meet Defendant's evidence on that point." APS also argued that it should be entitled to present evidence under a quantum meruit theory. The trial court denied the motion. APS appeals.
APS's complaint alleged that it fully performed its obligations under the contract. It did not seek alternative recovery under quantum meruit. Frontier's answer stated, "Defendant denies that plaintiff fully performed its obligations according to the terms of the agreement." Frontier also filed a counterclaim with its answer, seeking damages attributable to plaintiff's failure to "perform the work in conformance with the requirements of the contract."
Both parties recognized that the depth of the cable was the primary issue. However, APS viewed this issue solely in the context of whether Frontier was entitled to damages to offset the amount due under the contract. At trial, however, it became apparent that Frontier viewed the issue as whether APS had substantially performed under the contract.
APS contends the pleadings did not adequately set forth the defense of lack of substantial performance. APS points to Alaska R.Civ.P. 8(c), which requires the defense of failure of consideration
In regard to the Civil Rule 8(c) challenge, Frontier's answer does not allege a failure of performance under the caption "affirmative defense." "The defense of failure of consideration ... [is] not put in issue by denials ... but must be pleaded affirmatively." Pacific Indemnity Co. v. Wyrembek, 183 F.Supp. 252, 254-5 (E.D. Wis. 1960). Nor does the answer set out what aspect of the performance was insufficient, as required by Civil Rule 9(c). Finally, the denial is in effect a "negative pregnant,"
Moreover, Frontier's counterclaim was solely in the nature of a setoff against APS's claim. Frontier sought damages for lack of full performance in the counterclaim — it did not seek to avoid its obligation altogether. Thus, Frontier cannot point to the counterclaim as adequately raising the
Nor can Frontier point to its pretrial memorandum as establishing a failure of consideration defense.
Frontier did not assert in its pleadings that due to depth problems it sought to avoid payment to APS altogether.
Yet the fact that failure of consideration was not put in issue did not necessarily preclude the trial judge from relying on the theory to deny recovery to APS. In State v. First National Bank of Anchorage, 660 P.2d 406, 422 (Alaska 1982), we recognized that the trial court has "inherent discretionary authority" to decide a case on a legal theory not presented in the pleadings.
660 P.2d at 423.
We found in First National Bank that the trial court was authorized to entertain a new theory, but erred "in failing to give the parties notice that it would do so along with an opportunity to adjust their cases accordingly." Id. The case was therefore remanded to give the parties an opportunity to present evidence relevant to the new theory and thus eliminate any possibility of prejudice which would otherwise result from the court's reliance on that theory.
A similar analysis is appropriate here. We find no error in the trial court's use of the theory of failure of consideration. But APS was undoubtedly prejudiced by the introduction of this theory. In its case in chief, APS had proceeded on the assumption that its substantial performance of the contract was not contested by Frontier. Thus, its presentation was limited to one brief witness who testified as to the contract's existence, performance, and the lack of payment by Frontier. It justifiably read the pleadings as focusing the trial on what amount of recovery, if any, Frontier was entitled to on its counterclaim as an offset. Once the court decided to allow Frontier to develop the issue of substantial performance, the trial court should have taken steps to insure that APS was provided with an opportunity to fairly meet Frontier's evidence and to develop a quantum meruit theory for recovery. This opportunity could have been provided by reopening the case in chief and allowing further discovery. We find that the trial court abused its discretion by refusing such relief to APS.
For the foregoing reasons, the order of the superior court denying the motion to reopen the case in chief and permit further discovery is VACATED and the case is REMANDED for further proceedings consistent with this opinion.