
276 Cal.App.2d 264 (1969)
81 Cal. Rptr. 216
BERNARD SAMUELS, Petitioner,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY, Respondent; MELVIN HOFFMAN et al., Real Parties in Interest.
Docket No. 34134.
Court of Appeals of California, Second District, Division Five.
September 19, 1969.
*265 Michael W. Samuels for Petitioner.
No appearance for Respondent.
Denenberg & Friedman, Raymond S. Denenberg and Bruce A. Friedman for Real Parties in Interest.
AISO, J.
Mandamus. Petitioner Bernard Samuels is one of two named defendants in an action pending in the superior court (Melvin M. Hoffman and Christine L. Hoffman vs. Bernard Samuels, Marshall Samuels, et al., Los Angeles Superior *266 Court No. 921236). He petitions for a writ of mandamus to direct the court below to vacate its order of December 3, 1968, denying his motion to discharge[1] a writ of attachment theretofore levied, and its order of December 30, 1968, denying his motion to strike nine of eleven counts of plaintiffs' complaint as amended by permission of the court obtained on November 22, 1968, prior to the hearing of either motion. This court granted an alternative writ directed to the order of December 3, 1968 (re attachment) only, the petition thereby being summarily denied as to the portion pertaining to the order of December 30, 1968 (motion to strike). (Townsend v. Angellotti (1900) 129 Cal. 466, 468 [62 P. 59]; cf. Bartold v. Bartold (1957) 155 Cal. App.2d 251, 253 [318 P.2d 69].)
Petitioner contends that "attachment is unauthorized in an equitable action which is not based on a contract or quasi-contractual obligation." In substance, his argument is that the complaint fails to disclose an ex contractu cause of action which will qualify as "an action upon a contract, express or implied, for the direct payment of money" (Code Civ. Proc., § 537, subd. 1).
The declaration of the attorney for plaintiffs (real parties in interest) in support of the writ of attachment stated that petitioner and his codefendants were indebted to the real parties in interest on an "[i]mplied agreement of defendants to pay plaintiffs' [sic] rents collected from tenants at apartment building, subject matter of this lawsuit, from and after May 16, 1967."
[1a] The first issue before us is whether the declaration and the complaint, as amended, set forth an implied contract for the payment of money within the meaning of section 537, subdivision 1, of the Code of Civil Procedure. (Stotland v. Mobile Homes Engineering Corp. (1961) 197 Cal. App.2d 815, 818 [17 Cal. Rptr. 591].) The court in Stowe v. Matson (1949) 94 Cal. App.2d 678 [211 P.2d 591], cited by petitioner, stated *267 at page 682: "The legality of the attachment must be determined from the pleadings, proceedings and entire record in the attachment suit to ascertain therefrom what, in fact, the real grievance is for which relief is sought. As the Supreme Court said in the Abraham case: [San Francisco Iron & Metal Co. v. Abraham (1931) 211 Cal. 552 (296 P. 82)]: `The question is not what the plaintiff has pleaded but what in truth and in fact is its grievance.' (Italics added.)"
In McCall v. Superior Court (1934) supra, 1 Cal.2d 527, 532, 533, the court held that: a contract implied in law was within the meaning of "implied contract" as used in section 537, subdivision 1, of the Code of Civil Procedure, attachment would therefore lie to recover the consideration paid in the case of a rescission in pais,[2] and the fact that the equitable issues in a complaint invoking both the legal and equitable powers of the court "might well ... predominate" was not a bar to an attachment. (See pp. 532, 533, 537-538.) (See also General Ins. Co. v. Howard Hampton, Inc. (1960) 185 Cal. App.2d 426, 430-431 [8 Cal. Rptr. 353]; Landry v. Marshall (1966) 243 Cal. App.2d 170, 176 [52 Cal. Rptr. 119].)
[2] Joinder of the contract count with other counts claiming damages which are unliquidated or which sound in tort does not militate against a party's right to an attachment upon a contract count within the attachment statute. (Stotland v. Mobile Homes Engineering Corp. (1961) supra, 197 Cal. App.2d 815, 819; Landry v. Marshall (1966) supra, 243 Cal. App.2d 170, 178.)
[3] A contract implied in law, qualifying as a basis for attachment, is not confined to instances where one seeks to get back what he has paid out under circumstances permitting a rescission, but also includes instances wherein the defendant is in possession of funds collected by him from third persons for which he is under a legal duty to account to the plaintiff. In Arcturus Mfg. Corp. v. Rork (1961) 198 Cal. App.2d 208, 210 [17 Cal. Rptr. 758], the court affirmed an order denying a motion to dissolve an attachment where the gist of the complaint was to recover secret profits and kickbacks received by plaintiff's agent. In Oil Well Core Drilling Co. v. Barnhart (1937) 20 Cal. App.2d 677, 680 [67 P.2d 696], the gravamen of the action was to compel an agent to account *268 for monies, which included monies collected as rentals of equipment.
[4] It is immaterial that one may have to establish a tort in order to arrive at the contract implied in law upon which the attachment is based. (Klein v. Benaron (1967) 247 Cal. App.2d 607, 609 [56 Cal. Rptr. 5].) [5] One wrongfully occupying real property is also under a quasi-contractual obligation to pay the reasonable value of its use. (Samuels v. Singer (1934) 1 Cal. App.2d 545, 554 [36 P.2d 1098, 37 P.2d 1050].)
The complaint is labelled, "COMPLAINT TO QUIET TITLE TO REAL PROPERTY; SPECIFIC PERFORMANCE OF CONTRACT; DAMAGES FOR BREACH OF CONTRACT; RESCISSION OF DEED; CANCELLATION OF DEED; FRAUD; ABUSE OF PROCESS; DECLARATION OF CONSTRUCTIVE TRUST." As amended, it purports to set forth 11 separate "causes of action":[3] (I) quiet title to improved real property; (II) specific performance of agreement to reconvey *269 subject property upon repayment of a loan to petitioner; (III) damages for breach of the agreement to reconvey; (IV) rescission of a deed absolute intended as a mortgage, on the ground of fraud; (V) (allegations that the deed delivered was defective for want of plaintiff Christine L. Hoffman's signature); (VI) breach of fiduciary relationship (?) (allegations that plaintiff Melvin Hoffman and defendant Marshall Samuels intended to operate the apartment house as partners, Marshall Samuels conspired with his father, defendant Bernard Samuels, to get plaintiffs' interest in the property, and that defendant Marshall Samuels ran a small claims court action for rent against the plaintiffs); (VII) repleads certain allegations from III and IV adding allegations for punitive damages; (VIII) abuse of process; (IX) constructive trust); (X) judicial declaration of rescission; and (XI) money had and received in amount of $10,329.25.
[1b] If it be adjudged at trial that plaintiffs (real parties in interest) are the rightful owners of the property and that petitioner and his codefendants were wrongfully occupying the real property and collecting rents from tenants which rightfully belonged to plaintiffs, then an implied-in-law contract in the sum of $10,329.25 for monies belonging to plaintiffs, as alleged in the declaration in support of the writ of attachment, would be made out.
The fact that the prayer asks for equitable relief, as well as damages, "has no bearing upon the issuance of an attachment in a proper case." (McCall v. Superior Court (1934) supra, 1 Cal.2d 527, 533.)
[6a] Before concluding our review of the trial court's order refusing to either "quash" or "to discharge" the garnishment (attachment), we must further inquire whether the funds upon which the writ of attachment was levied (through garnishment) were of such a legal character as to lend them subject to garnishment. The rental monies garnished represented rentals payable to petitioner, but which plaintiffs (real parties in interest) claimed were payable to them as the real owners in equity of the real property involved. Are we then confronted with a situation where the plaintiffs (real parties in interest) have caused a garnishment of their own property, which may not be done (Kerr v. Kennedy (1903) 119 Iowa 239, 242-243 [93 N.W. 353, 355]; 38 C.J.S., Garnishment, § 71, p. 268; cf. John Deere Plow Co. of St. Louis v. L.D. Jennings (1943) 203 S.C. 426, 429-430 [27 S.E.2d 571, 573]; 6 Am.Jur. *270 2d, Attachment and Garnishment, § 92, p. 628)? We reopened the case for further supplemental briefings by counsel, inter alia, upon this point and for further oral argument hereon.[4]
While we have been unable to find any authorities controlling the question posed in the context presented by this case, it is stated as a general rule that if the defendant's right to the fund garnished is such that he could have instituted an action for debt or for indebitatus assumpsit at common law against the holder of the fund, that fund or indebtedness is subject to garnishment. (Steineck v. Haas-Baruch Co. (1930) 106 Cal. App. 228, 231-232 [288 P. 1104].) [7] "It is a cardinal principle of the law of garnishment that a right of action at law must exist between the principal debtor and the person contemplated as a garnishee before garnishment can become efficient." (Walker v. Doak (1930) 210 Cal. 30, 36 [290 P. 290].) [6b] Applying the foregoing test, there is no question but that petitioner herein could have brought an action at law against the tenants for the rentals garnished, prior to their garnishment. We, therefore, conclude that the rentals representing an indebtedness payable at law to the petitioner were of a character subject to garnishment, notwithstanding plaintiffs' making a claim thereto through their equitable causes of action.[5]
The more appropriate procedure for impounding the rentals pendente lite to assure their application in conformity with any final judgment to be rendered would have been through a receiver. Much fruitless labor of counsel and unnecessary consumption of judicial time, at both trial court and appellate levels, could have been avoided had plaintiffs used the receivership procedure.
The peremptory writ is denied; the alternative writ heretofore issued is discharged.
Stephens, Acting P.J., and Reppy, J., concurred.
A petition for a rehearing was denied October 2, 1969, and petitioner's application for a hearing by the Supreme Court was denied November 12, 1969.
NOTES
[1]  In his petition filed in this court, petitioner characterizes this motion as one to "quash" attachment, whereas he labelled his motion in the trial court as one for "order discharging the attachment." We do not deem the variance to be material. "The McCall [McCall v. Superior Court (1934) 1 Cal.2d 527 [36 P.2d 642, 95 A.L.R. 1019]] case is authority for the rule that in proper cases mandamus is a remedy to secure the dissolution of an attachment. A proper case for such a remedy is one in which there is sufficient showing that under special circumstances then existing the remedy by appeal is not adequate." (Lohr v. Superior Court (1952) 111 Cal. App.2d 231, 235 [244 P.2d 5]; see also Weaver v. Superior Court (1949) 93 Cal. App.2d 729, 732 [209 P.2d 830, 210 P.2d 246].)
[2]  Caveat: on this point see Civil Code sections 1692 and 1693, as amended by Statutes 1961; Paularena v. Superior Court (1965) 231 Cal. App.2d 906, 912-913 [42 Cal. Rptr. 366].
[3]  The amendment added a specific figure of $10,329.25 to count IX and added count XI pleaded as a common count for money had and received in the sum of $10,329.25. Even as amended the complaint is a hodge-podge, confusing counts with separate causes of action. (Eichler Homes of San Mateo, Inc. v. Superior Court (1961) 55 Cal.2d 845, 847-848 [13 Cal. Rptr. 194, 361 P.2d 914]; Austin v. Massachusetts Bonding & Ins. Co. (1961) 56 Cal.2d 596, 601-602 [15 Cal. Rptr. 817, 364 P.2d 681].) Quaere if counts V, VII, and X even allege separate and distinctive remedies.

Certainly, the parties, in order to duly protect their mutual interests and in the interests of justice, should not attempt to go to trial with the case in this messy condition, without first seeking a pretrial conference afforded by rule 208, California Rules of Court. "The principal purposes of pretrial are to find out what the lawsuit is about, to simplify and define the issues to be litigated, and to determine how the trial may proceed most expeditiously." (Pulse v. Hill (1963) 217 Cal. App.2d 301, 304 [31 Cal. Rptr. 765]; accord Trickey v. Superior Court (1967) 252 Cal. App.2d 650, 653 [60 Cal. Rptr. 761].) The pleadings may be examined and cleaned up at that time. (Meyer Koulish Co. v. Cannon (1963) 213 Cal. App.2d 419, 433 [28 Cal. Rptr. 757].)
We gave notice in the alternative writ that in the absence of objections, we would take judicial notice of the trial court file pursuant to Evidence Code section 459. No objections were registered. The trial court file discloses that defendants failed to file timely answers and that a default was entered. As one of the stipulated conditions to the vacation of the entry of default against them and for obtaining permission to file a cross-complaint, the demurrer to the complaint was deemed overruled. So defendants lost the opportunity of attacking the pleadings by way of demurrer. Defendants' motion to strike was not filed until December 20, 1968; it was not within the period prescribed by section 435 of the Code of Civil Procedure and it was not upon the ground that the pleadings were defective. It was premised upon the theory that by running garnishments, the plaintiffs (real parties in interest) had made an irrevocable election of remedies. Consequently, there has been no genuine attempt by the parties to put the pleadings into proper shape or to formulate the issues to be litigated at trial.
[4]  Neither counsel, however, furnished the court with any analysis or with any authorities helpful to resolution of this question. At oral argument plaintiffs' counsel made known that the rents garnished did not exceed $25 or $30 in amount.
[5]  Cf. Lewis v. Morse (1850) 20 Conn. 211, 216, holding that where defendant had taken a wagon out of plaintiff's possession, plaintiff could attach it as defendant's property, and was not estopped from asserting his previous ownership of it in a suit for its monetary value.
