the defendant promised to pay. He admits a payment and one credit, which he deducts, and demands judgment for the balance after these deductions. Issue having been joined by the service of an answer containing a general denial, the plaintiff moved for a reference upon the pleadings, and upon an affidavit showing that it would be necessary to prove upon the trial of the action the sale at 101 different dates of 658 different items of merchandise. This evidence is not disputed. Nevertheless, the motion for a reference was denied, and from the order denying it this appeal is taken. The learned justice who made this order refers as authority for his action to three cases in the court of appeals, which he cites. We have examined these cases, and we cannot find in them any authority for the action which he took. The rules controlling motions of this kind have been so often and so fully set out that we can conceive of no reason for any misapprehension of them at this time. An action is not referable under section 1013 of the Code, unless it is an action upon contract; and it will be necessary for the plaintiff, in establishing his case, to prove a long account. The character of the action is determined by the complaint, and, if the complaint sets out a cause of action upon contract, the question whether or not the action is one which may be referred is to be determined either by an examination of the complaint or such other proof as may be introduced upon that subject. In actions like the one at bar, it would be impracticable to decide from the pleading whether the trial would involve the examination of a long account or not. If the pleader set out his cause of action correctly, that fact certainly would not appear. Therefore the court must resort to other proof to ascertain whether such an account is necessarily involved. If a bill of particulars has been served, that-may be referred to, and would probably be sufficient; but, if no bill of particulars had been served, then, clearly, it is necessary for the plaintiff, if he wishes a reference, to make proof by affidavit from which the court can see that the examination of a long account is involved; and, if that fact is established, it is proper to order a reference. These propositions have been the established law of the state for many years. Welsh v. Darragh, 52 N. Y. 691 ;
Spence v. Simis, 137 N. Y. 616 , 33 N. E. 554 ;
Cassidy v. McFarland, 139 N. Y. 201 , 34 N. E. 893 . These cases concur in holding what is held by numerous other cases,—that the proof to show that the trial of the action will involve the examination of a long account may be made by affidavit if the fact does not appear upon the face of the pleading.
But this order was made, as we are told, upon the ground that the court could refer only to the complaint to ascertain whether the examination of a long account is necessary, and was not at liberty to consider affidavits presented by the moving party on that subject. This conclusion is reached, as we are told, upon the authority of a phrase in the syllabus of the case of Steck v. Iron Co., 142 N. Y. 236 , 37 N.