
359 S.E.2d 481 (1987)
NEW BERN ASSOCIATES, Plaintiff,
v.
The CELOTEX CORPORATION, Defendant and Third-Party Plaintiff,
v.
R.M. SAFFRAN, Individually and Trading as R.M. Saffran Architect and Associates; Ferdinand A. Hepperle, Individually and Trading as Ferdinand A. Hepperle Architect and Planner; and T.A. Loving Company, a Corporation, Third-Party Defendants.
No. 868SC1322.
Court of Appeals of North Carolina.
September 1, 1987.
*482 Stith and Stith, P.A. by F. Blackwell Stith and Susan H. McIntyre, New Bern, for defendant and third-party plaintiff, Celotex Corp.
Warren, Kerr, Walston & Hollowell by John H. Kerr, III, Goldsboro, for third-party defendant, T.A. Loving Co.
GREENE, Judge.
Plaintiff New Bern Associates ("New Bern"), filed a complaint against defendant Celotex Corporation ("Celotex"), alleging breach of warranties in regard to a building owned by New Bern and roofed with material manufactured by Celotex. New Bern alleged the roof on its building was not watertight and leaked a great deal. Celotex filed a third-party complaint against R.M. Saffran and Ferdinand A. Hepperle, the architects who designed plaintiff's building, alleging their negligence in designing the building, and against T.A. Loving Company, the general contractor for the building, alleging its negligence in constructing the building. Celotex alleged the third-parties' negligent acts as the primary causes of any injury to plaintiff and asked for indemnification from third-party defendants or, in the alternative, for contribution.
Before trial, third-party defendant T.A. Loving filed a motion to dismiss Celotex's third-party complaint for failure to state a claim upon which relief could be granted. N.C.G.S. Sec. 1A-1, Rule 12(b)(6) (1983). T.A. Loving based its motion on the allegation that Celotex had failed to bring its third-party complaint within six years from the date of completion of construction as required by the applicable statute of repose, N.C.G.S. Sec. 1-50(5). Celotex's written ten-year warranty issued to New Bern states the building's completion date was 18 March 1975. Celotex filed its third-party complaint against T.A. Loving on 28 April 1986. The court considered the pleadings, Celotex's written warranty, and correspondence between the parties, found there to be no genuine issue of material fact and granted summary judgment for T.A. Loving pursuant to N.C.G.S. Sec. 1A-1, Rules 12(b) and 56, on the basis that the statute of repose, Section 1-50(5), barred Celotex's third-party complaint. Celotex excepted and appealed.
The issues before us are: 1) whether the judgment is immediately appealable, 2) whether summary judgment was error because the statute of repose, N.C.G.S. Sec. 1-50(5), does not bar actions for contribution and indemnification, and 3) whether summary judgment was error because there existed genuine issues of material fact.

I
The correct procedure for determining whether a given case is appealable *483 was set out by this Court in Equitable Leasing Corp. v. Myers, 46 N.C.App. 162, 265 S.E.2d 240, appeal dismissed, 301 N.C. 92 (1980). There is a three-step analysis: 1) A judgment which is final to all claims and parties is immediately appealable. 2) If a judgment is not final as to all parties and claims, it is appealable if it is final to a party or issue and has been certified for appeal by the trial court under N.C.G.S. Sec. 1A-1, Rule 54(b). 3) If it is neither final to all claims and parties, nor final to a party or issue and certified for appeal, a judgment is immediately appealable if it affects a substantial right of the parties. Equitable Leasing Corp., 46 N.C.App. at 168-69, 265 S.E.2d at 245.
The judgment from which Celotex appeals is not final to all parties and claims. Although it is final to T.A. Loving and the question of its liability, the trial court did not certify it for appeal under Rule 54(b). It does, however, affect a substantial right and, on that basis, is appealable.
A "substantial right" is one "which will clearly be lost or irremediably adversely affected if the order is not reviewable before final judgment." Blackwelder v. Dept. of Human Resources, 60 N.C.App. 331, 335, 299 S.E.2d 777, 780 (1983). A judgment which creates the possibility of inconsistent verdicts on the same issue in different trials affects a substantial right. Bernick v. Jurden, 306 N.C. 435, 439, 293 S.E.2d 405, 408 (1982); Green v. Duke Power Co., 305 N.C. 603, 606, 290 S.E.2d 593, 595 (1982).
Here, the trial court's order granting summary judgment for T.A. Loving creates the possibility of inconsistent verdicts on the issue of T.A. Loving's negligence if it is not immediately appealed. Celotex's written warranty warrants against the roofing contractor's errors or mistakes in workmanship. In this suit, Celotex, as third-party plaintiff, may be held liable under its warranty for negligent work done by T.A. Loving; in a second trial against T.A. Loving, the jury may find T.A. Loving was not negligent. Thus, Celotex's right to have one jury decide the alleged negligence of T.A. Loving is a substantial right. The trial court's order granting T.A. Loving summary judgment is immediately appealable.

II
Celotex first argues the statute of repose does not bar an action for contribution or indemnification. This argument is without merit.
N.C.G.S. Sec. 1-50(5) governs actions to recover damages for any injury arising out of defective or unsafe improvements to real property. At the time the roof began to leak, this statute (hereinafter "the 1963 statute") provided that it also governed "any action for contribution or indemnity for damages sustained on account of such injury...." N.C.G.S. Sec. 1-50(5) (1969). This statute was amended in 1981 and currently provides:
b. For purposes of this subdivision, an action based upon or arising out of the defective or unsafe condition of an improvement to real property includes:
* * * * * *
6. Actions for contribution or indemnification for damages sustained on account of an action described in this subdivision;
N.C.G.S. Sec. 1-50(5)(b), (6) (1983) (hereinafter, "the 1981 statute").
New Bern's action against Celotex rises out of a defective improvement to real property. Thus, since New Bern's action against Celotex would normally be governed by Section 1-50(5), Celotex's claim for contribution or indemnification based on T.A. Loving's negligence, is governed by Section 1-50(5).

III
Summary judgment is appropriate if there is no genuine issue of material fact and any party is entitled to judgment as a matter of law. Johnson v. Insurance Co., 300 N.C. 247, 252, 266 S.E.2d 610, 615 (1980). Celotex next argues summary judgment was inappropriate for two reasons.


*484 A
Celotex first argues that its cause of action is not barred by the statute of repose because its action is based on wanton and willful negligence and the 1981 statute does not bar such claims. N.C.G.S. Sec. 1-50(5)(3) (1983). The 1981 amendments to Section 1-50(5) became effective 1 October 1981. New Bern's building was built before 1981, in 1974 and 1975. Evidence at the hearing for summary judgment was that the roof began to leak sometime in 1975. New Bern brought suit after 1981 on 15 March 1985. Celotex filed its third-party complaint on 28 April 1986. T.A. Loving contends that the 1963 statute, which, unlike the 1983 statute, bars actions on wanton and willful negligence, governs the actions in Celotex's third-party complaint. We hold that the determination of which statute governs Celotex's third-party complaint depends upon when plaintiff New Bern's cause of action accrued.
For actions between original plaintiffs and defendants, we have held the applicable version of Section 1-50(5) to be that statute in effect when plaintiff's cause of action accrued. Olympic Products Co. v. Roof Systems, Inc., 79 N.C.App. 436, 339 S.E.2d 432, disc. rev. denied, 316 N.C 553, 344 S.E.2d 8 (1986); Starkey v. Cimarron Apartments, Inc., 70 N.C.App. 772, 321 S.E.2d 229 (1984), disc. rev. denied, 312 N.C. 798, 325 S.E.2d 633 (1985).
As explained in II above, the statute applies equally to actions for contribution or indemnification in addition to the original action from which they arise. Celotex contends its cause of action for contribution or indemnification accrued on the date New Bern filed its complaint, 18 March 1985, and the 1981 version governs its cause of action.
The function of a statute of repose is to give a defendant a vested right not to be sued if the plaintiff fails to file within the prescribed period. Colony Hill Condominium I Assoc. v. Colony Co., 70 N.C. App. 390, 394, 320 S.E.2d 273, 276 (1984), disc. rev. denied, 312 N.C. 796, 325 S.E.2d 485 (1985). Section 1-50(5), on its face, gives that right to third-party defendants as well as defendants to an original action. We think it would undermine the function of the statute of repose if a defendant who had a vested right not to be sued by the original plaintiff lost that right in an action for indemnification or contribution by operation of different accrual dates and, thus, different versions of the statute. Therefore, we hold that the accrual date of the original plaintiff's claim determines which version of the statute of repose is applicable to the defendant's claim for indemnification or contribution against a third-party. Thus, if New Bern's cause of action accrued before 1 October 1981, the effective date of the 1981 version, Celotex's third-party complaint is governed by the 1963 version of Section 1-50(5).
A cause of action for physical damage to property accrues when the physical damage becomes "apparent or ought reasonably to have become apparent to the claimant, whichever event first occurs." N.C. G.S. Sec. 1-52(16). New Bern's cause of action comes under this statute. See N.C. G.S. Sec. 1-50(5)(f); Condominium Assoc. v. Donald J. Scholz Co., 47 N.C.App. 518, 527, 268 S.E.2d 12, 18, disc. rev. denied, 301 N.C. 527, 273 S.E.2d 454 (1980). Therefore, the date the damage to its building was apparent or ought to have been reasonably apparent is the date New Bern's cause of action accrued.
Evidence that New Bern's roof began leaking in 1975 was uncontradicted at the hearing for summary judgment. Thus, its cause of action for injuries arising from the alleged defects accrued in 1975. That being the case, the version of Section 1-50(5) applicable to Celotex's third-party complaint against T.A. Loving is the 1963 version. Since the 1963 version did not exclude willful and wanton negligence, we do not need to determine whether Celotex alleged willful and wanton negligence.

B
Celotex next contends that the trial court erred by granting T.A. Loving's motion for summary judgment because a genuine issue existed as to when the statute of repose began to run against its claim. *485 N.C.G.S. Sec. 1-50(5) runs not from the date the cause of action accrued but, in the 1963 statute, from the first day "after the performance or furnishing of ... services or construction." This language, which clearly refers to a defendant's last act or omission, has also been interpreted to mean the date construction was completed. Condominium Assoc. v. Donald J. Scholz Co., 47 N.C.App. 518, 527, 268 S.E.2d 12, 18, disc. rev. denied, 301 N.C. 527, 273 S.E.2d 454 (1980). We think it means nothing different from the language of the 1981 version in which the statute runs "from the later of the specific last act or omission of the defendant giving rise to the cause of action or substantial completion of the improvement." N.C.G.S. Sec. 1-50(5)(a) (1983).
T.A. Loving contends that Celotex's written warranty verifies the building was completed on 18 March 1975 and that it committed no act or omission after that date which gave rise to New Bern's injuries, or if it did, its last act or omission was more than six years before 28 April 1986, the date Celotex filed its third-party complaint. Celotex contends T.A. Loving's last act or omission giving rise to New Bern's injuries was within six years before 28 April 1986, in other words, after 28 April 1980.
Both parties argue from evidence submitted to the trial court at the hearing for summary judgment to support their contentions. The evidence tends to show that T.A. Loving was actively involved in the attempts to repair New Bern's roof through an employee or agent, Cecil Baker, until at least 18 May 1979. The evidence further tends to show that Cecil Baker continued to be actively involved in some manner with the repairs beyond 28 April 1980. However, it does not conclusively show an employee/employer relationship between Baker and T.A. Loving after 18 May 1979. Baker's correspondence concerning the roof is written, up to 18 May 1979, on stationery under the letterhead "T.A. Loving Company." His correspondence after that date is solely on stationery which carries the letterhead "Baker Enterprises." While Celotex did not produce evidence that would conclusively prove Baker was T.A. Loving's agent after 1 April 1980, the burden of proof to show no genuine issue of material fact rests on the movant, T.A. Loving, Foster v. Winston-Salem Joint Venture, 303 N.C. 636, 641, 281 S.E.2d 36, 40 (1981), and it has not carried that burden. There is a genuine dispute as to whether Baker was acting as T.A. Loving's agent after 28 April 1980.
Since there is a genuine issue of fact as to whether T.A. Loving's last act or omission alleged to give rise to plaintiff's injury occurred within six years of the date Celotex filed its third-party complaint, we cannot determine whether it is barred by the statute of repose. Therefore, summary judgment was inappropriate.
Reversed and remanded.
PHILLIPS and COZORT, JJ., concur.
