
596 So.2d 1134 (1992)
CAPITAL BANK, Appellant,
v.
Robert NEEDLE and Mona Reis, f/k/a Mona Needle and Lake Worth Properties, Inc., Appellees.
No. 91-1722.
District Court of Appeal of Florida, Fourth District.
March 18, 1992.
Rehearing Denied May 11, 1992.
*1135 Keith F. Backer of Becker and Poliakoff, P.A., West Palm Beach, for appellant.
Louis M. Silber and Larry Klein of Klein and Walsh, P.A., West Palm Beach, for appellees.
ANSTEAD, Judge.
Capital Bank appeals from a summary judgment entered in favor of appellees, Robert Needle and Mona Reis, f/k/a/ Mona Needle, and Lake Worth Properties, Inc., in an action brought by Capital Bank for the balance owing on a promissory note. We reverse.

FACTS
On February 14, 1985, Robert Needle and Mona Reis, then married ("the Needles"), executed and delivered a promissory note in the principal amount of $200,000.00 to Capital Bank, using a mortgage on property they owned as security for the note. The note was renewed, the mortgage modified, and the payment terms extended several times thereafter. Lake Worth Properties, Inc. was a guarantor of the obligation.
The Needles subsequently defaulted on their obligation to pay the note. Capital Bank sued for foreclosure of the mortgage and also prayed for a deficiency judgment should the proceeds of the sale of the property be insufficient to satisfy the debt. Capital Bank's mortgage on the property was inferior to that of Suburban Bank, and during the pendency of the foreclosure proceedings, Suburban Bank arranged a sale of the subject property. The terms of the sale required that Capital Bank release its mortgage on the property and dismiss its foreclosure action, in exchange for a $50,000.00 payment to Capital Bank from the sale proceeds.
A voluntary dismissal with prejudice was executed by the attorney who represented Capital Bank in the foreclosure action, and was delivered to the attorney for Suburban Bank to be held in escrow. Among the conditions required by Capital Bank for the release and filing of the voluntary dismissal was the execution by the Needles of a letter agreement acknowledging that the $50,000.00 was only a partial payment on the debt. The Needles signed the letter agreement, the property was sold, and Capital Bank was paid the $50,000.00. The voluntary dismissal with prejudice was released from escrow and filed almost two months after the letter was signed.
The provisions of the parties' letter agreement directly relating to the issue on appeal provide:
In furtherance of Suburban's efforts to sell Kevin's Lounge to its present tenant and occupant, and apply the sale proceeds as partial payment of the loan amounts owed to Suburban and Capital Bank, Capital Bank has agreed to voluntarily dismiss the pending mortgage foreclosure and provide a partial release of their mortgage on the property in consideration of their receipt of $50,000.00 out of such sales proceeds.
The condition imposed upon my law firm, as escrow agent, for release of the documents referred to above and in our possession, is that Robert Needle and Mona Needle, as borrowers, as well as Lake Worth Properties, Inc., as guarantor, acknowledge that Capital Bank's receipt of the portion of the sales proceeds represents a partial payment of the indebtedness owed. It is therefore understood and acknowledged between the borrowers, guarantors and Capital Bank, as lender, that acceptance of such payment and release of the documents held by us in escrow, does not constitute a waiver of any rights held by all parties to such loan transactions regarding the collection of the remaining loan balance owed to Capital Bank subsequent to application of the sales proceeds from this transaction.

*1136 This acknowledgement of the partial payment contemplated to be made to Capital Bank and non-waiver of lender's, borrowers' and guarantor's rights relative to the remaining indebtedness owed to Capital Bank is being required in lieu of the proposed reaffirmation of debt agreement which was previously found to be unacceptable by you and Robert Needle.
After the Needles failed to make any further payments, Capital Bank sued for the balance due on the note. The Needles sought and received a summary judgment on the grounds that the dismissal with prejudice of the mortgage foreclosure action constituted a bar to the new suit.

LAW
Capital Bank's primary argument is that the March 21, 1990 letter agreement executed by the Needles precluded entry of summary judgment in their favor. Capital Bank asserts that the letter contractually prevents the Needles from claiming that the voluntary dismissal bars the present action on the balance due on the note. The Needles counter that the letter is irrelevant because as a matter of law the voluntary dismissal with prejudice constituted a bar to the second suit.

RES JUDICATA
Neither party has provided us legal authority involving facts similar to those involved herein. As a general rule, a voluntary dismissal with prejudice operates as an adjudication on the merits, barring a subsequent action on the same claim. McKibbin v. Fujarek, 385 So.2d 724 (Fla. 4th DCA 1980); Drady v. Hillsborough County Aviation Authority, 193 So.2d 201 (Fla. 2d DCA 1966), cert. denied, 210 So.2d 223 (Fla. 1968); Lomelo v. American Oil Co., 256 So.2d 9 (Fla. 4th DCA 1971). Similarly, case law seems to suggest that where a party seeks a foreclosure and a deficiency judgment for failure to pay on a promissory note, and there is an actual adjudication on the merits of the claim for deficiency, that party cannot proceed on a new action based on the same promissory note. Cragin v. Ocean & Lake Realty Co., 133 So. 569 (Fla. 1931), aff'd., 101 Fla. 1324, 135 So. 795 (Fla. 1931), app. dism., 286 U.S. 523, 52 S.Ct. 494, 76 L.Ed. 1267 (U.S. 1932); Provost v. Swinson, 109 Fla. 42, 146 So. 641 (Fla. 1933); Belle Mead Development Corporation v. Reed, 114 Fla. 300, 153 So. 843 (Fla. 1934); Coffrin v. Sayles, 128 Fla. 622, 175 So. 236 (Fla. 1937).
For example, in Scheneman v. Barnett, 53 So.2d 641 (Fla. 1951), the supreme court, upon reviewing an order denying a deficiency, observed that once the jurisdiction of the equity court is invoked to seek a deficiency, the matter becomes res judicata:
While the decree of the court below comes to us with a presumption of validity, the equitable considerations justifying a refusal to grant any portion of the deficiency should be made clearly to appear in the record for the reason that, once the jurisdiction of the equity court is invoked to determine this question, its decision thereon is final (but subject, of course to review on appeal), and the matter then becomes res adjudicata. Coffrin v. Sayles, 128 Fla. 622, 175 So. 236; Reid v. Miami Studio Properties, 139 Fla. 246, 190 So. 505; [(1939)] Atlantic Shores Corp. v. Zetterlund, 103 Fla. 761, 138 So. 50, 54 [(1931)].
Id. at 641-642. At the least, this appears to mean that a trial court's actual decision on a claim for deficiency will bar the relitigation of that issue in any subsequent action at law.
Capital Bank argues that the prevailing law is set out in earlier decisions such as Reid v. Miami Studio Properties, 139 Fla. 246, 190 So. 505 (Fla. 1939). There, although the plaintiff requested a deficiency decree in his prayer for relief in the mortgage foreclosure action, the court did not even consider the issue. The supreme court allowed a later suit at law, declaring:
In fine, we understand Section 5751, Compiled General Laws of 1927, to mean that if a deficiency decree is asked for in a foreclosure and granted, that settles the question of what forum may be sought for relief but if not asked for or if asked for and overlooked or not considered, *1137 the right of the claimant is not affected. He may sue at law and recover such portion as he may prove himself entitled to.
Id. at 506. Similarly, in Gober v. Braddock, 100 Fla. 1406, 131 So. 407 (Fla. 1930), a second suit at law for a deficiency was permitted even though a request for a deficiency had been denied in an earlier foreclosure action.
These holdings appear to be based upon the same statutory provisions now contained in section 702.06, Florida Statutes (1989), which provide:
In all suits for the foreclosure of mortgages heretofore or hereafter executed the entry of a deficiency decree for any portion of a deficiency, should one exist, shall be within the sound judicial discretion of the court, but the complainant shall also have the right to sue at common law to recover such deficiency, provided no suit at law to recover such deficiency shall be maintained against the original mortgagor in cases where the mortgage is for the purchase price of the property involved and where the original mortgagee becomes the purchaser thereof at foreclosure sale and also is granted a deficiency decree against the original mortgagor.
For example, in Cragin the supreme court stated:
Thus the mortgage holder was given an election of remedies in this respect. He could submit the matter to the court of equity in his foreclosure proceeding, or, under the statute, he also had the right to sue at common law to recover such deficiency. If he had desired to stand on his rights in a suit at law to recover in full any deficiency that might have existed after the application to the mortgage debt of the proceeds of the foreclosure sale in equity, he could have done so; but, if he desired to do this, he should in his foreclosure proceeding have refrained from submitting the adjudication of that question to the equity court. Without the amendment of 1929, by which the legislative intent to the contrary is shown, we doubt if he could have submitted the same question to both courts. But the statute of 1927 as amended by the statute of 1929, chapter 13625, above quoted, clearly shows that the Legislature contemplated that, while a court of equity, in its sound judicial discretion, should be empowered-not required-to enter a deficiency decree for any portion of such deficiency, should one exist, its decision on this question, whether it granted a decree for any portion of such deficiency, or denied it altogether, as in the case of Gober v. Braddock, supra, would not bar the complainant from also suing at common law to recover any balance remaining due on the mortgage debt, after crediting the proceeds of the sale and any portion of the deficiency which might have been allowed, except in cases falling within the proviso set forth in the statute, which reads: "provided no suit at law to recover such deficiency shall be maintained against the original mortgagor or mortgagors in cases where the mortgage is for the purchase price of the property involved and where the original mortgagee becomes the purchaser thereof at foreclosure sale and also is granted a deficiency decree against the original mortgagor, or mortgagors."
It has been several times held by this court that the office of a proviso is, as a general rule, to restrain the enacting clause; to except something which would otherwise be within it. See cases cited in volume 3, Florida Digest, p. 183. So the legislature evidently contemplated that the first clause in the statute of 1927, as amended by chapter 13625, was broad enough to authorize a suit at law to recover a deficiency in the purchase price secured by mortgage, as against the original mortgagor, even where a deficiency decree had been granted in the foreclosure proceedings for some portion of the deficiency, and that in order to prevent such an operative effect of the statute, it was necessary to expressly restrain the enacting clause by putting in this proviso. It is the duty of the courts to give effect to the legislative intention as thus shown, even *1138 though it infringes to some extent upon the doctrine of res judicata.
Cragin, 133 So. at 573 (emphasis supplied).
Capital Bank also claims that Sorensen/Fletcher Const. Co. v. Grasso, 319 So.2d 194 (Fla. 4th DCA), cert. dismissed, 324 So.2d 90 (Fla. 4th 1975), is analogous to the instant case. In that case, the plaintiff sought to foreclose a mechanic's lien. Because the plaintiff failed to comply with the statutory lien law requirements, his complaint was dismissed with prejudice. On appeal the court held that res judicata did not bar his subsequent suit for damages on theories of breach of contract and unjust enrichment. The distinction claimed by appellees is that Capital Bank did not merely seek a foreclosure in the earlier suit. Rather, it sought a deficiency money judgment in the event the proceeds from a foreclosure sale would be insufficient to satisfy the underlying debt.
Our reading of the case law set out above leads us to conclude that a final adjudication in a foreclosure action that also prays for a deficiency judgment on the underlying debt may, but does not necessarily, bar a subsequent action on the debt. For instance, if the plaintiff in a foreclosure action goes to trial and loses on the merits, we do not believe such plaintiff would be barred from filing a subsequent foreclosure action based upon a subsequent default. The adjudication merely bars a second action relitigating the same alleged default. A dismissal with prejudice of the foreclosure action is tantamount to a judgment against the mortgagee. That judgment means that the mortgagee is not entitled to foreclose the mortgagee. Such a ruling moots any prayer for a deficiency, since a necessary predicate for a deficiency is an adjudication of foreclosure. There was no separate count in the Capital Bank complaint seeking a separate recovery on the promissory note alone.
Accordingly, we do not believe the dismissal of the foreclosure action in this case barred the subsequent action on the balance due on the note.

WAIVER AND ESTOPPEL
Capital Bank claims that regardless of the outcome of the res judicata issue, the appellees waived their right to assert such a defense here. A party may, by agreement, elect not to avail itself of certain rights that it may otherwise have. In Miami Dolphins, Ltd. v. Genden & Bach, P.A., 545 So.2d 294 (Fla. 3d DCA 1989), the court held that a party may waive any rights including those that it has by virtue of any law, statute or constitutional provision. The elements of waiver are: existence at the time of the waiver of a right; a privilege or advantage or benefit which may be waived; actual or constructive knowledge of the right; and the intent to relinquish the right. Taylor v. Kenco Chemical & Mfg. Corp., 465 So.2d 581 (Fla. 1st DCA 1985).
It appears that the parties had experienced some difficulty in agreeing on the effect of the sale on their post-sale rights. Ultimately, however, the letter agreement was executed. Further, and notwithstanding the fact that the letter agreement provides that the parties are waiving no rights, it expressly provides that the voluntary dismissal would be released and filed, only upon the Needles' acknowledgment that the bank retained its right to seek the balance due on the note after application of the $50,000 payment.
It may be that both parties were gambling when they entered into the letter agreement. The Needles may have been hoping that the dismissal would bar any further claims, and the letter agreement would not be sufficient to avoid that bar. On the other hand, Capital Bank took a chance that terms of the letter agreement were sufficiently explicit to protect its claim for the balance due on the note, despite its release and filing of the dismissal. Our ruling here, based upon the plain meaning of the language used in the letter agreement, is that Capital Bank won the gamble. We hold that by the unambiguous terms of the letter agreement, the Needles waived any right to claim that the filing of the dismissal would relieve them of responsibility for the remaining debt to Capital *1139 Bank, just as Capital Bank gave up its right to pursue foreclosure of the mortgaged property.
Accordingly, we reverse and remand for further proceedings consistent herewith.
LETTS, J., and FRANK, RICHARD H., Associate Judge, concur.
