
327 Pa. Superior Ct. 407 (1984)
476 A.2d 16
COMMERCIAL TRADING COMPANY, INC.
v.
MILSAN MILLS INCORPORATED, Appellant.
Supreme Court of Pennsylvania.
Argued November 3, 1983.
Filed April 19, 1984.
*410 Stanley W. Katz, Lebanon, for appellant.
Daniel J. Barrett, Athens, for appellee.
Before WICKERSHAM, WIEAND and CERCONE, JJ.
WIEAND, Judge:
Staylor Industries, Inc. (Staylor) assigned to Commercial Trading Company, Inc. (Commercial) all sums owed to Staylor by Milsan Mills Incorporated (Milsan). Commercial gave notice of the assignment to Milsan on August 9, 1979. Commercial subsequently commenced an action against Milsan to recover the sum of $29,070.16, which Milsan allegedly had owed Staylor at the time of the assignment. Milsan's answer contained a denial that any amount was due. Instead, it was alleged, credits had been extended by Staylor to Milsan in the amount of $14,784.26 on August 8, 1979, prior to notice of the assignment. The balance of $14,285.90, it was also alleged, had been paid to Staylor by *411 Milsan's check dated October 26, 1979. A partial summary judgment was entered in favor of Commercial and against Milsan for this latter amount because it was improperly paid to Staylor after Milsan had received notice that its account indebtedness had been assigned to Commercial.[1] The issue of Milsan's liability for the balance of $14,784.26 was tried before the court without a jury.
At trial, Milsan admitted the assignment. However, its witnesses testified and produced bookkeeping entries that the account between Milsan and Staylor had been reduced by a credit extended by Staylor on August 8, 1979. This credit was extended, it was stated, to cover the value of Milsan's cloth seized by creditors of Staylor, to which creditors the cloth had been sent for work, as security for moneys owed them by Staylor. Commercial produced no contradictory evidence but generally denied Milsan's defense. The trial court, without determining the credibility of Milsan's evidence, entered an adjudication in favor of Commercial because "[t]oo broad a variation exists between allegata and probata."[2] Exceptions were dismissed, and judgment was entered on the adjudication by the court.
It was error to base a decision on that which the court deemed to be a variance between allegata and probata. Although it is correct that a party's proof must be consistent with his pleadings, Willinger v. Mercy Catholic Medical Center, 241 Pa.Super. 456, 464, 362 A.2d 280, 284 (1976), aff'd, 482 Pa. 441, 393 A.2d 1188 (1978), and that a defendant may prove only those defenses which have been pleaded, Ochs v. Reynolds, 155 Pa.Super. 469, 472, 38 A.2d 728, 729 (1944); 29 P.L.E. Pleading § 175 (1960), a failure to object to a variance at trial is a waiver of the right to *412 object to it thereafter. Sangl v. Sangl, 394 Pa. 156, 159-160, 146 A.2d 303, 305 (1958); Williams v. Philadelphia Transportation Co., 219 Pa.Super. 134, 140, 280 A.2d 612, 615 (1971).
In the instant case, the only variance between appellant's evidence and the averments of its answer was the date on which the alleged credit was given by Staylor to Milsan. The answer contained an averment that the transaction had occurred on October 26, 1979;[3] whereas, the evidence at trial was that the credit had been extended on August 8, 1979. Appellee did not object to the variance or otherwise raise it at trial. The trial court, therefore, could not properly raise the issue sua sponte and refuse to consider appellant's evidence of an alleged credit merely because the date thereof, as testified to by witnesses at trial, was at variance with the date recited in appellant's pleading.
The rule of law by which the validity of the credit must be determined has been set forth in Section 9-318(1) of the Uniform Commercial Code, 12A P.S. § 9-318(1) (repealed 1980) (current version at 13 Pa.C.S. § 9318(a)), where it is provided that the rights of an assignee are subject to
(a) all the terms of the contract between the account debtor and assignor and any defense or claim arising therefrom; and
(b) any other defense or claim of the account debtor against the assignor which accrues before the account debtor receives notification of the assignment.

(Emphasis added).[4]
Appellant's evidence, if believed, showed that its account with Staylor (the assignor) had been adjusted by *413 agreement of the debtor and creditor to reflect a credit of $14,784.26 and that this occurred prior to the date on which appellant received notice that its account balance had been assigned to Commercial (the assignee). The adjustment had been made allegedly to compensate appellant for its goods which had been seized by creditors of the assignor. Whether appellant's evidence was credible is not for this Court to decide. That issue was for the trial court as trier of the facts. If appellant's evidence is credible, the court can conclude that appellant had a defense to the claim being made by Staylor's assignee. If appellant's evidence is not to be believed, appellee is entitled to a judgment for the balance due on the account. Upon remand, the trial court should make the necessary findings upon which its ultimate decision can then be made to rest.
Prior to trial, Commercial served on appellant a set of written interrogatories requesting information about and documentation of the credits alleged in appellant's answer. These interrogatories were not answered and the requested information was not furnished by appellant prior to trial. Appellee did not request an order of court compelling answers to its interrogatories but elected to proceed to trial without obtaining such answers. Approximately two months after trial had been completed and after the case had been decided, appellee requested the court to enter an order imposing sanctions in the form of an award of counsel fees because of appellant's failure to answer pre-trial, discovery interrogatories. The court, in response thereto, ordered appellant to pay general counsel fees in an amount of $1,000 and an additional fee of $500 for counsel fees incurred in presenting and arguing the motion for sanctions. Appellant argues that the trial court's order was *414 procedurally irregular and substantively inappropriate. We agree.
Pa.R.C.P. 4019(g)(1) provides as follows:
(g)(1) Except as otherwise provided in these rules, if following the refusal, objection or failure of a party or person to comply with any provision of this chapter, the court, after opportunity for hearing, enters an order compelling compliance and the order is not obeyed, the court on a subsequent motion for sanctions may, if the motion is granted, require the party or deponent whose conduct necessitated the motions or the party or attorney advising such conduct or both of them to pay to the moving party the reasonable expenses, including attorney's fees, incurred in obtaining the order of compliance and the order for sanctions, unless the court finds that the opposition to the motion was substantially justified or that other circumstances make an award of expenses unjust.
(Emphasis added). The procedure contemplated by this Rule has been described in Goodrich-Amram 2d, § 4019(g):5, as follows:
There is a two-step procedure for the court to award expenses and attorneys' fees for the failure to comply with a discovery [rule]. The first step under subdivision (g)(1) of Rule 4019 is a motion to compel compliance. If, after a hearing, the motion is granted and depositions or discovery are ordered and the party against whom it is directed complies, that is the end of the matter as far as expenses and counsel fees are concerned. There can be no award of expenses and fees. If the order to comply is not obeyed, the aggrieved party may file a new motion to impose sanctions. The court, at this "second step" of the proceedings, may award expenses and counsel fees for either or both steps depending upon how the court views the conduct of the defaulting party and his counsel. The Rule permits the court to decline any award if the court finds that the opposition to the motion was substantially *415 justified or that other circumstances make an award unjust.
10 Goodrich-Amram 2d § 4019(g):5.
This is the procedure which must be followed before a party can obtain from the court an award of counsel fees "incurred in obtaining the order of compliance and the order for sanctions." In the instant case, this two-step procedure was not followed. The action went to trial without any prior attempt by appellee to obtain an order compelling appellant to answer the outstanding interrogatories. Without a pre-trial motion seeking an order compelling answers to its interrogatories and without an order entered pursuant thereto, there is no authority in the rules for a post-decision motion for discovery related counsel fees.
It is true that at trial appellee objected to and sought to prevent appellant from offering evidence of credits allegedly extended to appellant by appellee's assignor. The trial court overruled appellee's objection, however, and received the evidence. Thus, it seems clear that appellant did not disobey or refuse to comply with a proper court order. Without a refusal to comply with an order compelling answers, appellant could not be made to pay counsel fees and expenses under Pa.R.C.P. 4019(g)(1). The $500 award made for presenting and arguing the motion for sanctions, therefore, was improper.
The award of general counsel fees was also erroneous. An award of counsel fees for non-discovery related counsel fees is not authorized by Pa.R.C.P. 4019(g). If there is authority for such an award, it must be found in the provisions of Pa.R.C.P. 4019(a)(1), which authorize a court, on motion, to make an "appropriate order" whenever a party "fails to serve answers, sufficient answers or objections to written interrogatories under Rule 4005." The imposition and choice of sanctions for noncompliance with discovery under this Rule is within the discretion of the trial court, Walker v. Pugliese, 317 Pa.Super. 595, 600, 464 A.2d 482, 486 (1983); Feingold v. Philadelphia National Bank, 313 Pa.Super. 579, 583, 460 A.2d 339, 341 (1983). However, *416 the Rule "requires the court to select a punishment which `fits the crime'." Dunn v. Maislin Transport Limited, 310 Pa.Super. 321, 325, 456 A.2d 632, 634 (1983). The order must be appropriate under the circumstances. The extent to which a moving party has been prejudiced by the failure to produce is an important consideration in formulating an appropriate sanction order. Shehady v. Pittsburgh Post-Gazette, 307 Pa.Super. 247, 251, 453 A.2d 18, 20 (1982).
Here, two months after trial had been completed and a decision rendered, appellee petitioned for and the trial court awarded general counsel fees in the amount of One Thousand ($1,000) Dollars. This award was based on an estimate of counsel fees incurred by appellee in trying the case. It was premised upon a belief by the trial court that if appellant had filed answers to appellee's interrogatories, the case could have been resolved upon motion for summary judgment, thereby rendering trial unnecessary. The court concluded that it had been appellant's failure to file answers to interrogatories which had rendered a trial necessary and that, therefore, the expenses of trial, including counsel fees, were recoverable by appellee.
This was inappropriate. In the first place, the trial court's assumption that a trial could have been obviated by answers to interrogatories was not warranted. Appellant's evidence, as we observed earlier in this opinion, was sufficient to create an issue of fact for the fact finder. If disclosed prior to trial, this information would not have supported a summary judgment.
Secondly, an award of counsel fees incurred in going to trial is not one of those sanctions which has been authorized specifically by Pa.R.C.P. 4019(c).[5] Although this subsection *417 is not necessarily intended to limit the discretion vested in the trial court by subsection (a)(1) (subsection (c)(5) authorizes "such order . . . as is just"), it does provide guidance to the trial court called upon to enforce the discovery rules. The absence of express authority to award counsel fees, when viewed in the light of subsection (g) which authorizes discovery related counsel fees only after a two-step procedure there outlined, suggests that an award of general counsel fees should be made only in extreme cases of flagrant abuse.
Finally, an award of counsel fees incurred by appellee in trying the case was inappropriate under the circumstances here present. Appellee made no attempt to obtain a pre-trial order aiding in discovery and compelling appellant to answer its interrogatories. Instead, appellee elected to forego the remedy provided by the Rules and take its chances on proceeding to trial without compelling answers to interrogatories. After trial had been completed and a decision rendered, appellant could not for the first time seek a sanction order under Pa.R.C.P. 4019(a)(1) which required the opposing party to pay expenses incurred in trying the case without completed discovery. By failing to move pretrial in aid of discovery, appellant waived the right to recover such expenses after trial.
The judgment entered in favor of appellee for $14,784.26 is reversed, and the case is remanded to the trial court for findings of fact and decision in accordance with this opinion. *418 The order directing appellant to pay counsel fees is reversed and set aside. Jurisdiction is not retained.
NOTES
[1]  The entry of a partial summary judgment for this amount was clearly correct. The entry thereof has not been challenged on appeal.
[2]  The court also gave as a reason for its adjudication that Milsan had failed to prove an agency between Staylor and its creditors who allegedly seized Milsan's cloth and for which Staylor allegedly extended a credit to Milsan. The trial court obviously misapprehended Milsan's defense, for the existence of an agency relationship was entirely unnecessary to the credit which Milsan claimed.
[3]  This was the date of Milsan's check sent to Staylor for the alleged purpose of paying the balance of its account indebtedness.
[4]  Neither appellant nor appellee has raised as an issue whether the parties' rights are determined by the law of New York or the law of Pennsylvania, and with respect thereto we express no opinion. We observe, however, that both Staylor and Commercial are New York corporations and that the assignment was made in New York. Milsan, however, is a Pennsylvania corporation. The conflicts of law issue has caused us no concern because the Uniform Commercial Code has been adopted in both states, and the applicable provision in the New York law is identical with that in the Pennsylvania law. See: New York Uniform Commercial Code § 9-318(1) (McKinney Supp. 1983).
[5]  Pa.R.C.P. 4019(c) provides as follows:

(c) The court, when acting under subdivision (a) of this rule, may make
(1) an order that the matters regarding which the questions were asked, or the character or description of the thing or land, or the contents of the paper, or any other designated fact[s] shall be taken to be established for the purposes of the action in accordance with the claim of the party obtaining the order;
(2) an order refusing to allow the disobedient party to support or oppose designated claims or defenses, or prohibiting him from introducing in evidence designated documents, things or testimony, or from introducing evidence of physical or mental condition;
(3) an order striking out pleadings or parts thereof, or staying further proceedings until the order is obeyed, or entering a judgment of non pros or by default against the disobedient party or party advising the disobedience;
(4) an order imposing punishment for contempt, except that a party may not be punished for contempt for a refusal to submit to a physical or mental examination under Rule 4010;
(5) such order with regard to the failure to make discovery as is just.
