While the order appealed from upon its face purports to grant a motion to vacate an order for discovery, with leave to apply for an examination before trial under section 872, subdivision 7, of the Code of Civil Procedure, this is an error, for no such motion was before the court and no such order for discovery had in fact been made. The motion before the court for consideration was for an order directing the defendant to produce and discover and to allow the plaintiff to inspect and copy the books, records, papers, contracts and documents described, relating to the sale of lots in certain real estate development in the county of Suffolk, State of New York.
The action was commenced by the service of a summons, but no complaint has yet been served. According to the moving affidavit, it is brought to recover moneys due to plaintiff from defendant by virtue of four contracts in writing, copies of which are attached to the affidavit and the terms of the contract are thus set forth in said affidavit:
“ Under and by the terms of said four contracts, the plaintiff promised to contract with such persons as might purchase *859from, the defendant its real property described in each of said contracts, to buy from said purchasers at a future date under certain conditions the land which they might so purchase and the defendant in consideration of the plaintiff’s said promise, promised to pay the plaintiff an amount equal to 6% of the moneys received by it from such purchasers; where the full consideration was paid the 6% was due and payable at the time of the receipt of the purchase price; where the purchase was made on the installment plan, the defendant promised to pay the plaintiff under the contracts Exhibits ‘ A ’ and ‘ B,’ $1.00 upon the signing of each contract and the balance at the rate of 10% on each monthly installment until 6% of the purchase price had been thus paid and under contract Exhibit ‘ D,’ the defendant promised to pay the plaintiff 6% of the purchase price in six (6) equal installments, one-sixth on the receipt of each of the first six installments of the purchase price.”
It is alleged that “ from the reports made from time to time by the defendant to the plaintiff of the contracts in force, there is due to the plaintiff upon the installments called for by said contracts upwards of $5,000 and this action is brought to recover what is due and owing from the defendant to the plaintiff under said contracts, both upon the contracts with purchasers reported as well as contracts with purchasers unreported.”
The four contracts between plaintiff and defendant contain respectively the following provisions, referring to defendant’s books and records:
1. “(e) To permit the said Company [plaintiff] or its duly authorized agents for said purpose to inspect during reasonable business hours all their books and records to ascertain the facts required by said company in reference to any and all sales made by said operator.”
2. “(c) To permit the said Company [plaintiff] or its duly authorized agents for said purpose to inspect during reasonable business hours all their books and records to ascertain the facts required as to sales made.”
3. “(d) To permit the said Company [plaintiff] or its duly authorized agents to inspect during reasonable business hours all their books and records of sales made.”
4. “(d) To permit the said Company [plaintiff] or its duly *860authorized agents to inspect during reasonable business hours all their books and records of sales made.”
Plaintiff duly designated an agent to make the inspection of the books and records of defendant according to the terms of these contracts and furnished him with appropriate written authorizations, but the defendant refused to permit such inspection though twice demanded.
Defendant resists the motion upon the ground that the relief sought by plaintiff is really an accounting, and that, therefore, an examination of defendant before trial can only be had as to such facts as are material and necessary to be proved in order to entitle plaintiff to an interlocutory judgment for an accounting, and the accounting itself cannot be gone into until the interlocutory judgment has been granted.
But in the present case the right to an inspection is based upon the contractual agreement of the parties, which obviously was intended to insure to plaintiff the only adequate method of ascertaining the amount due it by defendant which was by an inspection of the latter’s books and records, containing the details of the sale made by it, upon which plaintiff’s percentage to be paid it by defendant was to be based.
Where there is a special contract between the parties by which an inspection by plaintiff of the defendant’s books and records is expressly allowed, the plaintiff’s right thereto will be enforced by order.
The order appealed from is reversed, with ten dollars costs and disbursements, and the motion is granted, with ten dollars costs.
Clarke, P. J., Smith, Page and Philbin, JJ., concur.
Order reversed, with ten dollars costs and disbursements, and motion granted, with ten dollars costs.