
78 Cal.App.2d 571 (1947)
WILLIAM J. EATON, Appellant,
v.
PAUL C. QUEEN, Respondent.
Civ. No. 13136. 
California Court of Appeals. First Dist., Div. Two.  
Mar. 14, 1947.
 Jefferson E. Peyser for Appellant.
 Freed & Freed, Eli Freed and Emmett F. Gebauer for Respondent.
 GOODELL, J.
 This is an appeal from an order granting a motion to discharge an attachment.
 The appellant sued for damages for breach of contract. An affidavit and undertaking were filed and a writ was issued and levied.
 The respondent promptly moved to discharge the attachment. When the motion came on for hearing an amended complaint and amended affidavit had been filed. That such amendments before hearing are permissible (Republic etc. Corp. v. Peak, 194 Cal. 492, 507 [229 P. 331]) is conceded. Accordingly, the only pleading with which we are concerned is the amended complaint which is in three counts.
 The first count (upon which, alone, the appellant relies to support the attachment) alleges that a sale was made by respondent to appellant of a used tractor for the price of $6,418.75 and a used power unit for $578 and the full price was paid. It alleges that at and prior to the sale respondent warranted that the equipment would give service equivalent to new equipment of the same type for a period of 60 days after delivery, and that if it did not do so respondent would pay appellant the reasonable value of repairs required to place the equipment in a condition equivalent to new condition. It then alleges that the equipment did not do so, but that within the 60 days it broke down and required repairs to put it in operating condition. It then alleges: "That thereupon plaintiff demanded that defendant pay to plaintiff the reasonable value of the repairs required to place said machines ... in new condition but that defendant refused; that by reason of the failure of the machines to do the work for which they were intended, plaintiff was necessarily required to and did expend the sum of $4,474.69 in repairs, which sum was and is the reasonable value of said repairs to place the said machines in good operating condition; that plaintiff has demanded of defendant the repayment of said sum but that defendant has refused to pay the same or any part thereof *573 to plaintiff and the whole thereof is now due, owing and unpaid from defendant to plaintiff. That by reason of said premises plaintiff has been damaged, and defendant is indebted to plaintiff in the sum of $4,474.69." (Emphasis added.)
 The second count repeats the allegations of the first and alleges that the warranty was required by an O. P. A. regulation. The third count is simply for damages for breach of warranty.
 In the amended affidavit the plaintiff deposes that the defendant is indebted to him in the sum of $4,474.69, "over and above all legal setoffs or counterclaims, or the amount claimed as damages upon an express or implied contract for the direct payment of money, to-wit: For breach of warranty, and for indebtedness for reasonable value of repairs to items of equipment under warranty, as more fully set forth in the Amended Complaint on file herein which by this reference is made a part hereof, ..."
 The order granting the motion recites that the writ was improperly issued because the complaint and amended complaint did not "state an action upon a contract, express or implied, for the direct payment of money."
 [1] The question presented for decision is whether or not the allegations of the amended complaint taken in connection with the amended affidavit bring this case within the line of authorities starting with Hathaway v. Davis, 33 Cal. 161 and coming down to Redwood Fibre Products Co. v. Miller Mfg. Co., 61 Cal.App.2d 505 [143 P.2d 389], holding that an attachment is allowable and proper in certain actions for damages for breach of contract.
 The latest restatement by the Supreme Court of the rule followed by those cases is found in the case of Force v. Hart, 205 Cal. 670, 673 [272 P. 583], as follows:
 "It is a well-recognized rule of law in this state that an attachment will lie upon a cause of action for damages for a breach of contract where the damages are readily ascertainable by reference to the contract and the basis of the computation of damages appears to be reasonable and definite. (Hale Bros. v. Milliken, 142 Cal. 134 [75 P. 653]; DeLeonis v. Etchepare, 120 Cal. 407, 419 [52 P. 718]; Hamburger v. Halpern, 28 Cal.App. 317 [152 P. 6]; 3 Cal.Jur., p. 423, and cases cited.) The fact that the damages are unliquidated is not determinative. (Willett & Burr v. Alpert, 181 Cal. 652, 657 [185 P. 976]; Hale Bros. v. Milliken, supra, *574 at p. 140.) But the contract sued on must furnish a standard by which the amount due may be clearly ascertained and there must exist a basis upon which the damages can be determined by proof. (Dunn v. Mackey, 80 Cal. 104, 108 [22 P. 64].) The language of the court in Greenebaum v. Smith, 51 Cal.App. 692 [197 P. 675, 676], may well be applied to the present case, where it is said at page 694: 'This being an action for damages for the breach of an executory contract, defendant contends that it cannot be held to be an action on a contract for the direct payment of money. True, this is not an action for a debt in a technical sense, nor for a certain sum of money specified in the contract, but it is nevertheless an action for the breach of a contract for the direct payment of money, and merely because the amount is uncertain, consisting of damages to be proven at the trial, is no reason why an attachment may not issue where, as here, such damages are easily ascertainable according to fixed standards supplied by the contract or the law acting upon it.' "
 [2] An examination of the amended complaint and amended affidavit in the light of the foregoing quotation shows that the damages are readily ascertainable by reference to the contract, and that the basis of their computation is reasonable and definite--the same being the cost of the repairs, $4,474.69, which the appellant pleads he paid. Thus as alleged the contract itself furnishes the "standard by which the amount due may be clearly ascertained."
 It has been held in several cases that the word "direct" as used in section 537 Code of Civil Procedure is merely surplusage. (McCall v. Superior Court, 1 Cal.2d 527, 539 [36 P.2d 642, 95 A.L.R. 1019]; Redwood Fibre Products Co. v. Miller Mfg. Co., supra, p. 510). It has also been held that "... as regards the right to attach, it makes not a particle of difference whether the contract is express or implied ..." (See Simpson v. McCarty, 78 Cal. 175, 179 [20 P. 406, 12 Am.St.Rep. 37], where the words "express or implied" were entirely omitted from the affidavit; see, also, Flagg v. Dare, 107 Cal. 482, 486-7 [40 P. 804]; Hale Bros. v. Milliken, 142 Cal. 134, 138 [75 P. 653]; Hamilton v. Baker-Hansen Mfg. Co., 176 Cal. 569, 571 [169 P. 238].) The essential and material allegation is that the money sued on is due on contract (Donnelly v. Strueven, 63 Cal. 182; Simpson v. McCarty, supra; Hale Bros. v. Milliken, supra). *575
 In Hathaway v. Davis, 33 Cal. 161, supra, an attachment was held proper in an action on a bond on appeal although the amount to be paid would have to be ascertained by proof in court. There the court said, "There is certainly no reason why an attachment should be allowed in an action upon a promissory note, which is not equally persuasive in the present case. The plaintiff can swear to the amount due with equal accuracy, and his right to recover is as clear, and his claim upon the law for the advantages of this remedy no less reasonable and just." The authority of that case has never been questioned.
 The situation is not essentially different from that in Donnelly v. Strueven, supra, where the action was on a contract whereby the plaintiffs agreed to sell, and the defendant to buy, hides. The defendant refused to receive and pay for the hides and the plaintiff sued for damages and attached. It is obvious that in such circumstances the plaintiff would have to prove the amount of his damages. In commenting on that case on the point of the claimed uncertainty of amount, the court in Dunn v. Mackey, 80 Cal. 104, 108, said [22 P. 64], "It is true that the question of uncertainty as to the amount of the debt was not directly determined, but it existed there as clearly as in the case before us, and it was held that the attachment was properly issued." In the same case the court said, "This is as easily done as it would be to prove what the services were worth in an action on an implied contract for work done or upon an express contract to pay what the services were reasonably worth, and certainly such contracts would uphold an attachment."
 MacDonald v. Crawford, 106 Cal.App. 193 [288 P. 1088] is substantially the same case on its facts as Dunn v. Mackey, supra, and follows it.
 The situation is not essentially different from that in Flagg v. Dare, supra, where the plaintiff purchased from defendants 40 shares of bank stock for $5,000, which defendants agreed to repurchase at not less than the same price on 60 days' notice. Plaintiff desired to resell the stock and gave the defendants notice, but they refused to perform. Plaintiff tendered the stock into court and sued for $5,000 and interest less $125 which he had received as dividends. An attachment was upheld.
 The appellant's chief reliance is on the case of Redwood Fibre Products Co. v. Miller Mfg. Co., supra, an action on an *576 express warranty which was a part of the sale by defendant to plaintiff of certain machinery. It was alleged that if the machinery did not do the work which it was warranted to do, the seller would return to the buyer the whole purchase price and the suit was brought to recover such price. The only difference between that case and this is that here it is alleged that the seller promised to repay to the buyer not the whole purchase price, but what the buyer would have to expend to put the machinery into the condition to do the work as warranted. There is no distinction in principle between the two cases. There the trial court discharged the attachment and its order was reversed. That case is in line with the numerous cases already cited, and on the authority of all of them this order must be reversed.
 The respondent's main reliance is on the case of Willett & Burr v. Alpert, 181 Cal. 652 [185 P. 976], but that case is just as inapplicable here as it was to the Redwood Fibre case where, also, it was relied on. In distinguishing it the court in the latter case said (61 Cal.App.2d at 512): "In support of its main contention that plaintiff was not entitled to an attachment defendant relies largely on the case of Willett & Burr v. Alpert, 181 Cal. 652 [185 P. 976], but an examination of the opinion in that case shows that the contract there sued upon was essentially different in its terms from the one here pleaded in that there the contract contained no express promise on the part of the vendor to repay the purchase price or to pay any other sum of money." Furthermore, the distinction appears on the face of the opinion in the Alpert case, where the six grounds of the motion to discharge the attachment are set out. On page 655 the fifth ground is quoted: "That the action is for damages for alleged breach of contract and that the damages are unliquidated and cannot be ascertained with reasonable certainty from an inspection of the complaint, or the affidavit upon which said alleged illegal attachment is based. ..." (Emphasis added.)
 In the instant case, as already appears, the damages claimed can be ascertained with reasonable certainty from an inspection of the complaint and affidavit.
 The respondent invokes the rule that in establishing the right to an attachment the pleadings must be considered in their entirety and the complaint must be treated as an affidavit. That, of course, is true, but this case is not at all like *577 San Francisco etc. Co. v. Abraham, 211 Cal. 552 [296 P. 82], cited by respondent, where the action was based on deceit and where the plaintiff in one count sued for money had and received and sought an attachment. It was held that the action was essentially ex delicto, and at page 554 it was said "... by the terms of that contract the defendant never bound himself to repay to the plaintiff the amount of its expenditures [citation]. Therefore, it was not entitled to a writ of attachment." In the case at bar a promise to repay is alleged. There is nothing about the instant case which savors at all of an action ex delicto. All three counts are clearly based on breach of warranty.
 Powers v. Freeland, 114 Cal.App. 146 [299 P. 736] also cited by respondent is similar to the Abraham case, supra.
 Sturtevant v. K. Hovden Co., 60 Cal.App. 696 [214 P. 244], is not essentially different from the Alpert case, supra, which it follows. Doud v. Jackson, 102 Cal.App. 213 [283 P. 107] is not in point for there was no more showing in the complaint and affidavit of a promise to pay money to plaintiff than in the Sturtevant case (see discussion at p. 220, where 176 Cal. 569, supra, is cited). In the instant case the allegation that the respondent promised, as an integral part of his warranty, to repay to appellant whatever it cost to bring the equipment up to the warranted condition distinguishes it from the cases cited by the respondent.
 The appellant makes the point that the respondent's notice of motion to discharge the attachment did not specify the ground on which it was based and that it was error, therefore, to grant the motion. The respondent counters by claiming that this point was waived because it was not urged at the hearing. In view of our conclusion on the primary question it is not necessary to decide this secondary one.
 The order discharging the attachment is reversed.
 Nourse, P. J., and Dooling, J., concurred.
