delivered the Opinion of the Court.
In 1824, Lampton declared against Jones in two counts, one for money had and received, for inoney lent, for money laid out and expended; the other upon an undertaking to collect various debts, due by notes and replevin bonds, and accounts put into the defendant’s hands to collect and account for, with an averment that he had collected part, and by negligence rendered himself responsible for those not collected, and laying an assumpsit, in consideration thereof, to pay the amount of said accounts and debts.
The defendant pleaded non-assumpsit, and that the action did not accrue within five years, upon which issues were joined to the country.
Upon the trial the plaintiff gave in evidence the defendants receipts, dated in April, 1818, and in July, 1818, for various notes, accounts and executions, according to the lists in said receipts, acknowledging the receipt thereof from the plaintiff, to collect and account for agreeably to law, as constable of Clarke county, and proved that at the time of said receipts the defendant acted as constable.
The defendant then gave in evidence a record of a former suit instituted by the plaintiff against the defendant in 1821, in case, with various counts for county levies, revenue taxes and sums of money of various descriptions, “according to the annexed lists,” entrusted to the defendant in 1818, to collect *236anil account for according to law, within six months; and also for money had and received, and money laid out and expended to the use of the defendant. In this suit the plaintiff accepted a judgment by confession, for eighty four dollars, with interest thereon from the 1st May, 1818, till paid. The judgment whs entered at October term, 1821.
Parol evidence to shew the casrs different. Instructions of the court that the two different causes of abtion were the same. Evidence of a former recovery is properly admissible under tho plea of non assumpsit. Identity of the causes of action in the declaration of general counts, and that decided on in a former action, relied on ia bar, as a former decision, shall be determined by parol evidence.*236The plaintiff introduced a witness, and proved that the claim set up by plaintiff in the present action, and receipts, was not adj usted, or intended to have been adjusted in the former suit; that the parties met, and agreed upon the amount due, in the former suit, for fee hills, taxes and county levies, without taking any other accounts between them into consideration, and not including the demand arising on the receipts now sued on, as the witness had heard both parties several times acknowledge.
Upon motion, the court instructed the jury, that the former suit, and recovery thereon, was an effectual bar to this, and that the testimony adduced by plaintiff to show the demand in the former suit, was not the same now sued on, was inadmissible: to which instructions the plaintiff excepted; the jury-found for the defendant; the plaintiff moved for a new trial, which was overruled; the plaintiff stated the whole evidence, and excepted to that opinion also.
The evidence offered touching a former recovery, was properly admitted under the general issue. (Burrows vs. Jemino, 2 Stran. 733; Young vs. Black, 7 Cran. 567.)
If the record given in evidence had proved upon inspection, that the former recovery was for the same cause of action, or indeed, that the demand then set up and litigated, and now sued for, was the same, then the instruction would have been correct. But from the former record it cannot! be ascertained whether the demand then sued for and recovered, was or was not the same as that now sued for; nor whether the demand then declared for and adjusted, was the same now declared for and given in evidence. This question is therefore to be detér*237mined only by evidence dehors the record; and the parol evidence was proper, (2 Marshall 304, Robinson vs. Sutton.) This consequence of resorting to parol evidence to ascertain what was or was not demanded, given in evidence, or adjusted between the parties and included in the settlement or agreement upon which the former judgment was rendered, grows out of the generality of the declaration and pleadings in actions of assumpsit and such like. The instruction of the court was therefore incorrect; and if this was the only obstacle presented to the action as sued, and asserted by the»evidence of the plaintiff, this court would reverse the j udgment rendered for the defendant.
Action a-' gainst a consta ble for moneys collected, on notes accounts and executions, for which he gave a receipt, promising to collect and account according to law, must be covenant, not assumpsit. ¡Simpson, for plaintiff; Hanson, for defendant.But the evidence offered by plaintiff was such as upon demurrer, or upon motion for instruction as in case of a non suit, the court would be bound to declare illegal and inadmissible. The plaintiff has mistaken his action. If he has cause of action upon the writing given in evidence, it was for breach of covenant, and not in case. The writing is a direct stipulation for the performance of a duty or undertaking; and the statute which gives to unsealed writings the force and effect as if sealed, destroys .the action on the case founded thereon. The judgment for the defendant is right, although for a wrong instruction given. The writ of error is to the judgment, not to the reasons by which it was produced. This court cannot reverse a judgment,, when upon the same evidence, the same judgment would be directed, although for a different reason.
It is therefore considered by the Court, that the judgment be affirmed, wits costs.