The case was presented to the trial court in the view, it seems, that plaintiff by his petition was asking to be indemnified in damages for refusal of the corporation to transfer on the books ten shares of stock to him, or, if damages may not be recovered, then, in the alternative, to compel the corporation to transfer on the books the stock to him as owner and to issue to him certificates for the same. Reviewing the pleading, it is concluded there is clearly and fully alleged a cause of action for damages, and such issue was, under the pleading, before the court for trial on the merits. But the right of the plaintiff to maintain in the alternative the action to compel the transfer of stock depends upon whether or not the petition alleges, as a matter of law, a cause of action in that respect. The petition may not be said, it is believed, to be sufficient to predicate the remedy of mandamus to compel the corporation to transfer the stock; for it fails to allege any duty or obligation on the part of either Brewer or the corporation itself to perform the act sought to be enforced. It is quite well settled that, in order to be entitled to the writ of mandamus, the allegations of the petition must show the existence of an official or legal duty on the part of the defendant to perform the act sought to be enforced, and that the duty of performance rests on such defendant. The petition, to be sufficient as against a demurrer, must not only show a right in the plaintiff to have the transfer made, but also a corresponding obligation on the part of the *Page 51 officer or the private corporation itself. Greater certainty of pleading is required in a petition for mandamus than in ordinary cases. Arberry v. Beavers, 6 Tex. 457, 55 Am.Dec. 791.
Article 1168, Vernon's Sayles' Statutes, provides:
"The stock of any corporation created under this title shall be deemed personal estate, and shall be transferable only on the books of the corporation in such manner as the by-laws may prescribe."
And by article 1160 it is made the duty of directors of the private corporation "to cause a record to be kept of all stock subscribed and transferred." Under the statute the officers of the corporation may only lawfully make transfer on the books of stock as the corporation's "by-laws may prescribe." The petition does not allege, nor is there any evidence showing, what the by-laws of the corporation prescribe respecting the transfers on its book of stock, nor whose duty it was to make such transfers. The failure of the petition to allege a cause of action for mandamus is fundamental error, and must be noticed by the appellate court.
Therefore, according to the pleading of plaintiff, the only issue before the trial court was that of damages. And, properly construing defendant's answer, it "specially pleads" a lien upon and the right to hold the ten shares of stock for a debt due by Monaghan, as a defense to plaintiff's suit, and not, we think, by way of cross-action authorizing affirmative relief. Therefore we conclude that the court was not authorized by any pleading to grant appellee company any affirmative relief, and to do so was erroneous both in respect to decreeing a lien and a decree of foreclosure and sale of the stock.
The court was not in this case authorized to bar appellant of any right to the stock upon failure to pay the debt of Monaghan within 60 days; for there is no statute of the state nor is there any by-law of the mercantile company in evidence providing that no transfer of stock shall be valid or made so long as the owner or holder of such stock shall be liable for any debt due and unpaid to the corporation. Therefore such owner or holder would have the legal right to sell and transfer the stock subject to the corporation's lien thereon, and such transferee would have the same right to have transfer on the books made to him.
As the court was authorized under the pleadings and evidence in this case to render the judgment respecting the action for damages, the judgment in that respect in favor of defendants must be affirmed. But all the other portions of the court's judgment, being fundamentally erroneous, must be reversed and set aside. The setting aside of the judgment respecting foreclosure of lien and order of sale of the shares is under appellant's thirteenth assignment of error. The setting aside of all other parts of the judgment is done by the court as a fundamental error appearing on the record. The costs of appeal will be taxed against appellee mercantile company, and all the costs of the trial court will be paid by the appellant.
*Page 243Affirmed in part, and reversed and rendered in part.