In this cause there are two appeals, taken by the defendant—one from an order denying its motion for judgment notwithstanding the verdict, and the other from the judgment. They were taken separately, but by stipulation and order they have been submitted upon one transcript and a single set of briefs.
*485On its appeal from the order it is urged by appellant that its motion ought to have been granted because plaintiff’s cause of action was barred by the two-year provision of the statute of limitations (Code Civ. Proc., sec. 339, subd. 1) as being one not founded upon an instrument of writing but of the nature of an action for money had and received.
The complaint alleges the employment of defendant by plaintiff for a consideration to render service in a transaction in the nature of an escrow, by which it undertook in writing to examine and report upon the title to certain real property situated on Sixth Street in San Francisco and to pay out money deposited with it by plaintiff in accordance with the terms of a writing, designated as an “agreement of exchange”; that it disbursed said money contrary to and in disregard of those terms; that plaintiff demanded the return of the money ($5,000), and that defendant failed and refused to comply with said demand. Then follows a prayer for judgment in the named sum.
The appellant urges that the cause of action stated is one for money had and received after rescission of the contract; the respondent contends on the other hand that it is at least an attempt to state a cause of action for damages for violation of a written contract and, as such, is governed by the four-year statutory limitation.
“There is in this state but one form of civil action for the enforcement or protection of private rights and the redress or prevention of private wrongs.” (Code Civ. Proc., sec. 307.) “The forms of pleading in civil actions and the rules by which the sufficiency of the pleadings is to be determined are those prescribed in this code.” (Code Civ. Proc., sec. 421.) “In the construction of a pleading, for the purpose of determining its effect, its allegations must be liberally construed with a view to substantial justice between the parties. ’ ’ (Code Civ. Proc., sec. 452.) No error or defect in a pleading is to be regarded unless it affect substantial rights. (Code Civ. Proc., sec. 475.) “Every person who suffers detriment from the unlawful act or omission of another may recover from the person in fault a compensation therefor in money, which is called damages.” (Civ. Code, sec. 3281.) “The rule is sustained in many decisions that a complaint which states the facts showing the plaintiff’s damage in a manner *486sufficient to sustain a judgment, and concludes with a prayer for damages in a named sum, is sufficient though it fails to contain a formal allegation that plaintiff has been damaged in a stated amount. ” (8 Cal. Jur., Damages, sec. 123, p. 883, citing Tucker v. Cooper, 172 Cal. 663 [158 Pac. 181], and other eases.)
No demurrer to the complaint, either special or general, was interposed, and the objection to the sufficiency of the complaint comes after verdict. “It is a general rule that in ease of a general demurrer” (i. e., in the absence of special demurrer) “or in support of a judgment whatever is necessarily implied or reasonably to be inferred from an allegation is to be taken as directly averred” (1 Bancroft’s Code Pleading, sec. 25, p. 59, citing Richter v. Union Land etc. Co., 129 Cal. 367 [62 Pac. 39]; Alexander v. McDow, 108 Cal. 25 [41 Pac. 24], and other cases). “The practice of pleading to the merits, encouraging the opposite party to prepare for trial and then at the trial interposing the objection that the pleading is not sufficient to let in evidence is not favored by the courts; and so where objection to the sufficiency of a pleading is first raised at the trial such pleading will be construed liberally and every reasonable intendment indulged in its favor.” (Id., sec. 76, p. 159.)
The only formal allegation lacking in the complaint here involved to qualify it as one for damages is an averment to the effect that the plaintiff, by the refusal of the defendant to return or repay the $5,000, was damaged in that amount; but the allegations that the defendant in violation of its duty paid out plaintiff’s money and refused upon demand to return the amount are allegations from which a plain inference of monetary damage or injury arises, and this, when followed by a prayer for the amount, it has been held, is sufficient. (Riser v. Walton, 78 Cal. 490 [21 Pac. 362] ; Barr v. Southern California Edison Co., 24 Cal. App. 22, 25 [140 Pac. 47].)
On this same question it appears that at the close of the testimony and when both sides had rested the plaintiff was permitted to amend his complaint to conform to the proof, and that he so amended it by including the formal allegation of the damage suffered. This amendment overcomes the objection we are now considering; but since the *487amendment itself is attacked on various grounds on the appeal from the judgment we have not thought it necessary to resort to it in considering the question of the sufficiency of the pleading.
On the appeal from the order denying defendant’s motion for judgment notwithstanding the verdict the further point is made that the court erred in overruling defendant’s objection made at the commencement of the trial to the introduction of any evidence whatever upon the ground that the complaint failed to state a cause of action, this point being directed to an allegation in paragraph VIII thereof that by certain mentioned deeds the plaintiff did not receive any right, title or interest in and to the real property described, and that there is no allegation in the complaint that the plaintiff never received title to the property.
There is no merit, we think, in this contention since in the very next paragraph of the complaint there is a general allegation that the holder of the title to said property conveyed no right, title or interest therein to plaintiff.
On the appeal from the judgment several points are presented, namely, that the trial was had upon the theory that the cause of action was one for money had and received; that prejudicial error was committed by the trial court in permitting amendment of the complaint after both plaintiff and defendant had rested, because said amendment changed the cause of action from one of money had and received, which was barred by limitation, to an action for damages for breach of contract, and also that there was no evidence of damage to support the amendment of the complaint; further, that there could be no such evidence of damage for the reason that the plaintiff in the transaction involved acted through an agent, one "W. G. Harkins, and ratified all his acts, and finally that there was prejudicial error committed by the court in the forms of verdict submitted to the jury.
We have already seen that the trial court correctly construed the complaint as one founded upon breach of a written contract; and we may add that even if the complaint had been in form one for money had and received the cause of action was not changed by the amendment by which it became in terms one for breach of contract, since the same transaction and the same alleged violation of right were involved. In such a case the facts upon which defend*488ant’s obligation to plaintiff is founded may be pleaded in a different way, and even the relief sought may be changed, without there being involved any change in the cause of action ; and the fact that the cause of action in the manner first pleaded may have been barred by limitation, and may be within the statutory period as set forth in the amended pleading, is no objection: quite the contrary. (Frost v. Witter, 132 Cal. 421 [64 Pac. 705, 84 Am. St. Rep. 53]; Union Lumber Co. v. J. W. Schouten & Co., 25 Cal. App. 80 [142 Pac. 910]; Merchants’ Collection Agency v. Gopcevic, 23 Cal. App. 216 [137 Pac. 609]; Born v. Castle, 22 Cal. App. 282, 286 [134 Pac. 347].)
While the defendant very strenuously contended at the trial that the action was one for money had and received, it is quite apparent from the opening statement of plaintiff’s counsel that he was not proceeding on any such theory. A quotation from such opening statement will clearly demonstrate this: “Now we state that that is a breach of contract by the California Pacific Title and Trust Company; that as a result of their failure to perform their contract they have caused damage to Gallagher in the sum of his deposit with them, $5,000. . . . Now, it is our contention that the Title company breached its contract with Gallagher, and as a result of that caused a loss to Gallagher of $5,000. . . .
‘ ‘ The Court: I will ask a question now to clarify the situation in my mind: Gallagher paid $5,000 into the Title Insurance company and he is suing for the return of that $5,000?
“Mr. Delany: (Plaintiff’s counsel:) For the breach of that contract, for damages.”
As to appellant’s contention that there was no evidence of damage upon which to base the amendment to the complaint to conform to the proof, the fact of defendant’s payment away of plaintiff’s money in violation of the conditions of its deposit was directly testified to; and while the plaintiff after so testifying did not add in so many words “By such wrongful payment I was damaged to the extent of $5,000,” the inference arising from such unauthorized payment was clearly to that effect. Such inference constitutes evidence. (Code Civ. Proc., sec. 1832.) This question was directly decided in Jones v. Title Guaranty etc. Co., 178 Cal. 375, where it is said (p. 380 [173 Pac. (2d) 586]): “If plain*489tiff’s property, deposited with the defendant upon certain conditions, was disposed of without compliance with those conditions, the plaintiff was of course entitled to recover such damages as he may have suffered through defendant’s unwarranted act. The defendant contends that the complaint showed no damage. But this claim is obviously without merit. There is evidence that plaintiff’s check for two thousand dollars was cashed, and the money paid out by the defendant under the amended instructions. Apart from any question of the notes, it needs no argument to show that plaintiff suffered damage by being deprived, without his authority or consent, of the money represented by his check. ’ ’
Coming to appellant’s contention that there was no evidence of damage, and could not be any, for the reason that plaintiff ratified all the acts of his agent, this question involves a further contention, namely, that one W. G. Harkins was the agent of the plaintiff in the transaction involved, with whom the defendant was authorized to deal, and its determination necessitates some reference to the evidence.
The plaintiff Thomas M. Gallagher was a carpenter arid builder, and without much experience in the buying and selling of real estate. The property here involved is a lot on Sixth Street in San Francisco improved with a building used as a hotel. One, Collins, associated with M. J. Hanlon, both real estate brokers, acting for the undisclosed owner, had arranged with the plaintiff for an exchange of properties, by which Gallagher was to give certain lots and in addition the sum of $3,250 for the Sixth Street property, record title to which was to be subject to an existing $14,000 first mortgage and a second mortgage of $4,000. Gallagher was to be furnished with a “preliminary report for a policy of title insurance”, to be made by defendant, showing good and marketable title free and clear of encumbrances with the exceptions mentioned. On March 10, 1928, Gallagher, accompanied by Harkins and Collins, entered the defendant’s office and proceeded to open a transaction in the nature of an escrow with Phil H. Garvey, one of the officers of the company, looking to the consummation of the exchange mentioned, the details of which, so far as Gallagher’s part in the transaction was concerned, had been filled in on a printed blank entitled “agreement of exchange”. Shortly prior to this time Collins, on behalf of the seller of the property, had placed the matter *490with the defendant. Gallagher deposited with Garvey the sum of $500, together with a receipt for $500 which had been given him by Collins upon his making a down payment in that amount, and the so-called agreement of exchange, executed by him only and being in effect an offer to the undisclosed owner to acquire the Sixth Street property on the terms written therein. At this time the defendant was already in business relations with the Realty Funding Corporation, which was expecting within a few days to acquire title to the property through a trustee’s sale under a deed of trust in which the defendant was trustee and the Realty Funding Corporation beneficiary, and the latter had given to Harkins an option on the property together with other lots (contingent upon the corporation being able to acquire it at a given price at such sale) at a lower price than that which Gallagher was offering to pay, and this option or a copy of it was in the possession of the defendant. While there is no direct testimony to that effect, it is apparent that Gallagher’s offer to buy the property on the terms already stated had been obtained on behalf of Harkins, who subsequently consented to a change in those terms by eliminating the $4,000 mortgage and increasing the cash payment required to a total of $6,750. Mr. Garvey read over the “agreement of exchange”, and observing that it called for a report on the Sixth Street property to be made by defendant, stated that his company had shortly before prepared such a report and, according to testimony given by him as a witness at the trial—although in this behalf he was contradicted by the plaintiff—the parties present, including the plaintiff, went over it. The report showed, as indicated in the “agreement of exchange”, a mortgage of $14,000 upon the property, and also showed that an action had been commenced to foreclose such mortgage. Garvey at this time issued the company’s receipt covering the $500 then paid it, the “agreement of exchange” and the receipt given by Collins to Gallagher; and then, according to his testimony (which, too, was denied by Gallagher) asked the latter what instructions he wished to give for the disbursement of the $500, who replied that Harkins would represent him in the transaction. This also the plaintiff as a witness denied, his version of the incident being that he himself asked Garvey to whom he should pay the balance of the money called for by the agreement of exchange, *491and that Garvey replied “You can pay it either here or to Hr. Harkins”. A few weeks thereafter, to wit, on April 6th, Harkins deposited with defendant on behalf of plaintiff $4,500, being part of a sum of $5,750 received by him from the plaintiff. In the meantime the Realty Funding Corporation, having since the inception of the transaction become the record owner of the title, and in fulfillment of its option given to Harkins, deposited with defendant a deed to the property naming Mabel F. Roberts (the nominee of Harkins, whose name was used for convenience only) as the grantee, to be recorded upon payment to the defendant for its account of the sum of $5,000. On April 13th the defendant “issued” its report on title, showing title to be in Realty Funding Corporation subject to certain exceptions, including two, numbered 8 and 9 respectively. No. 8 was the pending suit to foreclose the mortgage of $14,000, and No. 9 referred to a defect consisting of the conveyance of title by a former corporate owner under a name other than that in which it received it and without identifying its new name with the old. On April 23d Harkins called at the office of the defendant and inquired if the transaction had been closed. He was informed that it could not be closed without instructions regarding exceptions 8 and 9 of its report. Harkins then, by his written and signed notation on the instructions previously given by plaintiff and without consulting him, waived these exceptions, and on April 26, 1928, the plaintiff’s money was paid over to or for account of the Realty Funding Corporation. The original instructions of plaintiff required title to be recorded in his name, but by instructions given by Harkins a deed was furnished by the seller in the name of Mabel F. Roberts, but before its recordation the defendant, having pointed out that there was a judgment standing against this person, the named grantee was changed to Eneas Kane, another nominee of Harkins, who also brought to the defendant for recordation, and purporting to complete the transaction, a deed from this nominee to Thomas M. Gallagher, the description in this last deed, however, being of a piece of property on Hayes Street and making no mention of the Sixth Street lot. During this time the defendant had sent to plaintiff no report on title or other communication. Shortly after the closing of the transaction in the manner stated Gallagher learned from the holder of the $14,000 mortgage that it would *492not be renewed and that foreclosure proceedings had in fact been commenced. He thereupon visited the office of the defendant, where he talked with Garvey and demanded the return of his money, but was referred by him to Harkins, nor was he informed that his money had been paid - over. Thereafter, on March 8, 1929, there was filed for record by the defendant a deed from Eneas Kane to the plaintiff of the Sixth Street property, this being done at the instance of the Realty Funding Corporation which was being threatened with suit by the plaintiff for the recovery of the purchase money.
We think this partial review of the evidence is sufficient to show that it supports an implied finding of the jury in aid of its verdict either that Harkins was not appointed by plaintiff to represent him in his dealings with the defendant, or that if so appointed any authority given to him was so limited in scope as not to authorize any change in the quality of title required by the so-called agreement of exchange, but merely extended to conveying to defendant such instructions as might be from time to time indicated by defendant as necessary for the purpose of consummating the transaction as therein outlined. In any event, the defendant had full notice of Harkins’ adverse interest, and accepted at its peril from him any directions which would materially change the terms of said agreement of exchange to his own advantage and to the detriment of plaintiff. “As a general rule every person who undertakes to deal with an alleged agent is by the mere fact of agency put upon inquiry, and must discover at his peril that it is in its nature and extent sufficient to permit the agent to do the proposed act . . . particularly where it is his -first transaction with the agent, or the circumstances connected with the agency are such as to put him upon inquiry, as where it appears from the circumstances of the particular transaction that the interests of the agent and principal are necessarily adverse, or that the authority is of an unusual, improbable or extraordinary nature.” (2 Cor. Jur., Agency, sec. 20, p. 562.)
The fact that an agent is employed to make a contract does not imply the power to vary or cancel it or to waive the rights of his principal under it. (Id., Agency, p. 645; Jones v. Title Guaranty etc. Co., 178 Cal. 375 [173 Pac. 586]; Harbor Construction Co. v. Walters, 101 Cal. App. 470 [281 Pac. 1062].)
*493In this connection we have referred to appellant’s contention that the plaintiff in any event ratified the acts of Harkins in his dealings with it. This contention rests upon evidence of various acts of Gallagher, such as that after the close of the transaction Harkins notified him to take possession of the Sixth Street property, that an agent of the Realty Funding Corporation accompanied him there and delivered possession to him, that he remained in possession for about two months, and that as late as September 5, 1928, he executed a deed of trust and a chattel mortgage on the hotel property and its contents. On the other hand, there is evidence on behalf of the plaintiff that while the transaction was still pending Harkins commenced with him a negotiation by which he was to acquire other property owned or controlled by the same seller, and to which the money placed by him with the defendant would be applied; that he went into possession of the Sixth Street property in anticipation that his deal therefor would be closed and without being informed that his money had in fact been paid over, but that when he learned that the $14,000 mortgage would not be renewed and that a suit was pending to foreclose it he quit the property; and that as to the deed of trust and chattel mortgage, he recognized his signature to those papers but that when he signed them they were incomplete and were part of the new transaction referred to and which was ultimately abandoned. Apparently the jury gave entire credence to the plaintiff’s testimony, and this being so we are unable to say that it is insufficient to support its verdict.
“As a general rule, in order that a ratification of an unauthorized act of an agent may be valid and binding it is essential that the principal have full knowledge at the time of the ratification of all material facts and circumstances relative to the unauthorized act or transaction . . . unless the principal is wilfully ignorant or purposely refrains from seeking information.” (2 Cor. Jur., Agency, sec. 93, p. 476.) “The doctrine of constructive knowledge of material facts or imputation of knowledge of such facts does not generally obtain in the case of ratification, as ordinarily it is what the principal knows, and not what he has mere legal notice of, that is to be considered in determining whether there has been ratification. ... A principal’s failure to use diligence to make such discovery” (i. e., that one is doing unauthorized *494acts in his name) “is not such negligence as will charge him with constructive knowledge of what he might have discovered by such inquiry.” (Id., sec. 97, p. 480.)
It is finally urged by appellant that the trial court erred in submitting to the jury a form of verdict in which the amount to be awarded plaintiff, if it found in his favor, was inserted, namely, the sum of $5,000.
As to this contention we think it sufficient to say that the action was tried on plaintiff’s part as one for damages; that the complaint, as we have seen, was amended by inserting therein a formal allegation of such damages; that plaintiff’s evidence tended to prove damage in the amount named, which was the only evidence of damage in the case. The defendant was not precluded from offering evidence to show that this sum did not truly represent the damage; and if it was surprised by the court’s ruling permitting the amendment.to the complaint, thus placing the nature of the action beyond question, it could have asked and received permission to reopen the case in order to give it a further opportunity to present evidence upon this point. This it did not do, and is therefore not in a position to complain. The result was that if the jury found damages for the plaintiff it could only do so in the amount named.
It follows from what we have said that both the order and judgment appealed from should be affirmed.
The order denying defendant’s motion for judgment notwithstanding the verdict is affirmed.
The judgment is affirmed.