
220 P.3d 333 (2009)
SHAMBERG, JOHNSON & BERGMAN, CHTD., Plaintiff,
v.
Michael P. OLIVER, Appellant, and
Wallace, Saunders, Austin, Brown & Enochs, Chtd., Appellee.
No. 97,584.
Supreme Court of Kansas.
October 30, 2009.
*334 Mark D. Hinderks, of Stinson Morrison Hecker LLP, of Overland Park, argued the cause, and Donald C. Ramsay, of the same firm, of Overland Park, and Stewart M. Stein, of the same firm, of Kansas City, Missouri, were with him on the briefs for the appellant.
Derrick A. Pearce, of Wallace, Saunders, Austin, Brown and Enochs, Chartered, of Overland Park, argued the cause, and Richard T. Merker, of the same firm, was with him on the brief for the appellee.
*335 The opinion of the court was delivered by JOHNSON, J.:
Michael P. Oliver appeals the district court's grant of summary judgment in favor of his former law firm, Wallace, Saunders, Austin, Brown & Enochs, Chartered (Wallace Saunders), in this dispute over a referral fee in a medical malpractice action. Shamberg, Johnson & Bergman, Chartered (Shamberg), the firm that had agreed to pay a contingent referral fee and that subsequently obtained a settlement judgment in favor of the injured person, filed this interpleader action and paid the referral fee into court in order to remove itself from this winner-take-all battle over the referral fee. Accordingly, Shamberg did not participate in this appeal. We reverse the district court's grant of summary judgment and remand with directions to enter summary judgment in favor of Oliver.

FACTUAL OVERVIEW
Wallace Saunders is a law firm, duly incorporated under the laws of the State of Kansas, with which Oliver entered into an employment agreement on January 1, 1987. Subsequently, Oliver was elected a director of the firm.
Oliver first became involved in this case when he was contacted by the family of Sara Hotchkiss after she experienced severe medical complications. Sara's husband, Rob, first requested assistance with the medical situation, and Oliver referred him to Jim Butler at Wallace Saunders. Butler drafted a power of attorney for the Hotchkisses. Next, Oliver met with Sara's husband and her father to discuss the possibility of a medical malpractice claim. However, because Wallace Saunders was principally engaged in defense work, it had a policy against suing medical care providers. Therefore, Oliver proposed to refer the case to another firm and arranged for the Hotchkisses to meet with two attorneys to determine who they would want to retain. Oliver attended the meetings and assisted the Hotchkiss family in asking questions. The Hotchkisses selected Victor Bergman of the Shamberg firm.
On January 8, 2003, Sara and Robert Hotchkiss entered into an employment agreement with Shamberg, in which they agreed to a contingent fee of 40% of the net recovery after expenses. Bergman wrote Oliver at Wallace Saunders on January 13, 2003, offering 25% of Shamberg's attorney fees as a referral fee. Bergman asked Oliver to confirm that the referral fee was acceptable or to make a counterproposal. Shamberg would take responsibility to do the work and to finance the case, but Bergman solicited Oliver's suggestions with regard to the areas on which Bergman planned to focus. The record reflects no written response to Bergman's letter.
Oliver had his paralegal complete both a new file intake sheet and a new client intake sheet on or about February 19, 2004. These forms identified Sara Hotchkiss as the plaintiff and Olathe Medical Center as the defendant. The new file documentation identified the case as a plaintiff, medical malpractice contingent fee case with the notation that "will receive a referral fee at the end of the case." Sara Hotchkiss was identified as the new client and was listed as a contingent fee client.
A litigation file was opened, assigned to Oliver, placed upon the firm's master inventory of cases, and placed in Oliver's personal inventory. A file was also set up in the Wallace Saunders corporate accounting system for tracking time and expenses, showing Oliver as the billing attorney and listing the case as medical malpractice.
On May 5, 2004, over a year after Bergman's first letter mentioning the referral fee, he wrote to Oliver at the Wallace Saunders offices and modified the fee-sharing arrangement, offering to divide the net attorney fees as follows: 10% of the first $100,000 of net attorney fees; plus 15% of any net attorney fees from $100,001-$250,000; plus 20% of any net attorney fee between $250,001-$500,000; plus 25% of all net attorney fees greater than $500,001. The letter said that Shamberg would be responsible to advance all of the expenses of litigation and do all of the work. It also stated that if the Hotchkisses needed assistance with obtaining governmental benefits, Wallace Saunders would either help them or assist them with an appropriate referral. Bergman also requested *336 Oliver to accompany him for an off-the-record visit with a physician. In the letter, Bergman said that the fees would be divided between "our firms," referring to Shamberg and Wallace Saunders. Neither Oliver nor Wallace Saunders wrote a response to this May 5, 2004, letter until after Oliver departed from Wallace Saunders.
Oliver resigned as an employee and director of Wallace Saunders, effective January 31, 2005. On February 1, 2005, Richard Merker of Wallace Saunders wrote to Bergman at Shamberg to advise him of a disagreement between Wallace Saunders and Oliver regarding entitlement to the referral fee. The next day, Merker wrote another letter to Shamberg, reciting the terms of the referral fee payment formula and reiterating that Wallace Saunders claimed the entire referral fee. On April 5, 2005, after he had resigned from Wallace Saunders, Oliver wrote to Shamberg, purporting to accept the referral fee agreement described in the May 2004 letter.
When Oliver left Wallace Saunders, he took the Hotchkiss file at the clients' request. He continued to work on the Hotchkiss case, including assisting with mediation, drafting settlement documents, and being present for the first 2 days of trial. Oliver and his staff spent 151.3 hours working on the Hotchkiss file after his departure from Wallace Saunders. In contrast, while employed at Wallace Saunders, Oliver did not make a record of the time he worked on the Hotchkiss file, albeit he now claims to have put in approximately 15 hours on the Hotchkiss case before his departure from the firm. The Wallace Saunders file did reflect some paralegal time during that period, and some expenses were charged against the file in May and November 2004.
While researching on the Johnson County District Court online docket system after he left Wallace Saunders, Oliver discovered at least three different 2004 medical malpractice cases in which a Wallace Saunders attorney had entered his appearance on behalf of the Olathe Medical Center, after the Hotchkiss file was opened by Wallace Saunders in February of 2004. Wallace Saunders did not inform Olathe Medical Center of its relationship with the plaintiff in the Hotchkiss v. Olathe Medical Center matter and did not seek or obtain a conflict waiver. Wallace Saunders produced a conflict check dated March 20, 2006, which reflected that Wallace Saunders represented Sara Hotchkiss as a plaintiff against Olathe Medical Center. The Hotchkisses claimed they were not aware that Wallace Saunders was also representing Olathe Medical Center during the pendency of their lawsuit. The Hotchkisses also said that they did not know, at the time of settlement, that Wallace Saunders was claiming the entire referral fee. Wallace Saunders did not disclose to anyone at Shamberg that, while representing the Hotchkisses, it had been simultaneously representing Olathe Medical Center.
The Hotchkisses' malpractice claim against certain physicians was settled and approved by the court on July 11, 2005. The claim against the Olathe Medical Center proceeded to trial but was settled during trial. The district court approved the settlement and attorney fees on September 2, 2005. Shortly thereafter, on September 16, 2005, Shamberg filed this interpleader action. The total amount of referral fee at issue is $582,881.90.
Both Oliver and Wallace Saunders filed motions for summary judgment. The district court, in a memorandum decision and order, denied Oliver's motion and granted Wallace Saunders' motion, resulting in the court's awarding the entire referral fee to Wallace Saunders. Oliver timely appealed, and the matter was transferred to the Supreme Court pursuant to K.S.A. 20-3018(c).

LAW FIRM EMPLOYMENT CONTRACTS
In 1987, Oliver and Wallace Saunders executed an employment contract. As part of Oliver's consideration, he agreed that he "shall not, without the express prior written consent of [Wallace Saunders], directly or indirectly, during the term of this agreement, render services of a professional nature to or for any person or firm for compensation or engage in any activity competitive with and adverse to [Wallace Saunders'] business or practice." The contract set forth the manner in which it could be terminated and noted that upon termination, Oliver "shall not be entitled to keep or preserve files or records *337 of [Wallace Saunders] as to any client unless said client shall specifically request a different disposition of his file." Further, Oliver agreed "to carry out and to perform orders, directions and policies" of the firm and acknowledged that [Wallace Saunders] "shall have final authority over acceptance or refusal of any client and over the amount of fee to be charged any client for professional services."
The same date, Oliver and Wallace Saunders entered into a Deferred Compensation Agreement (DCA), whereby the firm agreed to pay Oliver compensation in addition to the salary and bonus referred to in the employment contract. The additional compensation represented an amount "equal to [Oliver's] interest in the active accounts receivable and work-in-process of the corporation." The DCA described a formula to calculate Oliver's interest in the firm's accounts receivable and work-in-process that would accrue after his date of employment. Subsequently, the parties executed an addendum to the DCA.
On April 1, 2005, Wallace Saunders and Oliver entered into an agreement purporting to settle the amounts due to Oliver upon his termination from the firm. The settlement agreement recites that the employment agreement had been amended in 1995, that the date of the DCA was January 1, 1993, and that a stock purchase agreement had been entered on January 1, 1993, and amended November 2, 2004, albeit those dates do not match the documents in the appeal record. The calculation of Oliver's share of work-in-process reflects that the amount due to Oliver was reduced by 32 files which were withdrawn from the firm, 12 of which were taken by Oliver. At the same time, the parties executed a carve-out agreement, acknowledging that they disagreed on how to handle the Hotchkiss v. Olathe Medical Center case and "any fees which may arise from that case, including referral fees, deferred compensation fees and accounting for that case and file." The carve-out agreement clarified that both parties were preserving their claims to the Hotchkiss referral fee, notwithstanding their respective releases in the agreement for amounts due under the deferred compensation and stock purchase agreements.

DISTRICT COURT'S DECISION
In its Memorandum Decision and Order, the district court made an extensive recitation, covering some 12-plus pages, of the "key" facts that it found to be uncontroverted. We will review those findings most relevant for our purposes.
The court found that "Sara and Rob Hotchkiss first became clients of [Wallace Saunders] after Sara's injury when, at Oliver's suggestion, James Butler of [Wallace Saunders] met with Rob and drafted a Power of Attorney in December 2002." Butler opened a firm file, listing Sara as a client. The findings indicate that, thereafter, Oliver actively participated in the Hotchkisses' selection of an attorney to handle the medical malpractice claim, including attending and participating in the meetings with the prospective attorneys. The district court reviewed the records established by Oliver and Wallace Saunders reflecting that the Hotchkisses were firm clients and determined that "[t]he case was set up by [Wallace Saunders] administration on February 19, 2004, in exactly the same manner that any other case, hourly or contingent, had been set up, and was not treated as unique."
The court found that Bergman's May 5, 2004, letter, outlining how the fees were to be divided, indicated that the agreement was between the Shamberg firm and the Wallace Saunders firm. However, Bergman from the Shamberg firm considered Oliver to be the Hotchkisses' attorney and had no contact with any other Wallace Saunders attorney until Oliver's termination from the firm. No one from the Wallace Saunders firm, including Oliver, responded to Bergman's May 5, 2004, fee-division proposal until after Oliver left Wallace Saunders. After Oliver's termination, Bergman declined to communicate with Wallace Saunders about the case, but rather he continued "to work with Oliver and had found Oliver's involvement to be helpful."
When Oliver left the firm, "he took the Hotchkisses' physical file with him at the Hotchkisses' request" and afterward continued to work on the case. The district court found that Oliver's involvement included:

*338 "participating in the day-long settlement conference where the settlement agreement was reached with the doctor defendants and meeting with Rob and Sara concerning the settlement agreement reached and the use of special trusts and structures to protect their assets. Oliver also participated in the drafting of the final settlement documents from the first settlement with the doctors, including meeting with the bank that would handle and administer the special needs trust and meeting with two lawyers involved in preparing the structured settlement and the drafting of the trust itself. Oliver revised the final settlement documents and was the attorney of record in conducting the settlement approval hearing on July 11, 2005, with Judge Elliott.
"Oliver provided beneficial legal counsel to Rob and Sara regarding their lawsuit both before and after he left [Wallace Saunders] on January 31, 2005. Oliver's paralegal entered time on the file on May 11, 2004, and some expenses were also added in May and November 2004. Oliver did not record any time on any timesheets with respect to any work he allegedly performed on behalf of the Hotchkisses while he was an employee of [Wallace Saunders]. Since his departure from [Wallace Saunders], Mr. Oliver and his staff spent 151.3 hours working on the Hotchkiss file."
In discussing the agreed-upon calculation of the additional compensation due to Oliver under the DCA, the district court found:
"All files in inventory under the DCA and Addendum, as listed in the Agreement, are arbitrarily valued at the $150.00 [per file] rate, regardless of the actual value of the file or any potential fee recovery expected to result from the file, and regardless of whether hourly or contingent fee. The December 31, 2004, Inventory of 4,375 files used by [Wallace Saunders] to calculate Oliver's deferred compensation for `work-in-process' specifically included the Hotchkiss file. The Hotchkiss file was also specifically among the 12 `Files withdrawn from Firm' listed for Oliver and deducted from `work in process' files to which the $150.00 per file was applied in the calculation set forth above. The Hotchkiss file was not classified by [Wallace Saunders] as an account receivable at the time Oliver left [Wallace Saunders] on January 31, 2005."
The district court also found that Wallace Saunders had accepted representation of Olathe Medical Center to defend it in three different medical malpractice cases in 2004, after Oliver had opened the Hotchkiss file in which Olathe Medical Center was shown as the defendant. The district court noted that the Hotchkisses, Oliver, the Olathe Medical Center, and the Shamberg firm were all unaware that, according to Wallace Saunders' own conflicts system, the firm was concurrently defending the medical center while seeking a referral fee in a lawsuit against the medical center. Wallace Saunders did not seek a conflicts waiver from anyone. Further, the Hotchkisses asserted that they were unaware that Wallace Saunders was claiming the entire referral fee.
The district court then offered its conclusions of law, beginning with the well-established law that summary judgment is proper only where there is no genuine issue of fact remaining, giving the party against whom judgment is sought the benefit of all inferences. The district court concluded that the referral agreement had been made between the two law firms, Wallace Saunders and Shamberg, with Oliver acting as an agent for his corporate law firm. Any purported confirmation or reaffirmation by Oliver, personally, after leaving the firm was ineffective, because the contract was between the law firms.
Most importantly, the court concluded that the referral contract was complete when Shamberg accepted the case and agreed to pay a referral fee. Wallace Saunders' consideration was referring the case to Shamberg, and the firm "needed to do nothing else." In essence, the district court found that the referral fee was earned by Wallace Saunders prior to Oliver's departure.
The court rejected Oliver's argument that he paid Wallace Saunders for the file under the DCA settlement when he left the firm and that the file included the referral fee agreement. The court was unpersuaded by *339 the fact that the file was not part of the accounts receivable category, opining that listing the file in the "work-in-process" calculation "does not change the original contract between [Shamberg] and [Wallace Saunders]." The court did not believe that the DCA had any effect on the contract between the firms which was already in place when Oliver departed. Moreover, the district court concluded that the DCA agreement did not meet the legal requirements of an assignment of Wallace Saunders' referral fee contract to Oliver, and that the carve-out agreement refuted such an assignment.
Finally, the district court declined to consider Oliver's conflict of interest argument, which was that Wallace Saunders was precluded from accepting a referral fee on a case in which it had a conflict of interest. The district court noted that the conflict of interest arose after the referral contract was complete and, therefore, did not taint that matter. Moreover, the conflict issue was best left in the appropriate forum of a disciplinary proceeding, where, if deemed appropriate, the law firm could be ordered to make restitution on the referral fee.
Accordingly, the district court granted Wallace Saunders' summary judgment motion, ruling that the law firm was entitled to the entire referral fee. In appealing the district court's ruling, Oliver specifies the following issues: (1) the district court erred in its interpretation of the deferred compensation agreement between Wallace Saunders and Oliver; (2) the district court erroneously interpreted the carve-out agreement; (3) the district court's separation of the referral fee contract from the clients' instructions and interests was against public policy and contrary to the law; (4) Wallace Saunders should be precluded from receiving a referral fee because of its conflict of interest and failure to effectively comply with Kansas Rules of Professional Conduct (KRPC) 1.5(g) (2008 Kan. Ct. R. Annot. 448); and (5) alternatively, the district court erred in refusing to divide the referral fee based upon quantum meruit. We take the liberty of combining and rearranging the order of our discussion of the issues.

STANDARDS OF REVIEW
The district court disposed of this case on summary judgment. Our standard of review in such cases is well settled:
"`"`Summary judgment is appropriate when the pleadings, depositions, answers to interrogatories, and admissions on file, together with the affidavits, show that there is no genuine issue as to any material fact and that the moving party is entitled to judgment as a matter of law. The trial court is required to resolve all facts and inferences which may reasonably be drawn from the evidence in favor of the party against whom the ruling is sought. When opposing a motion for summary judgment, an adverse party must come forward with evidence to establish a dispute as to a material fact. In order to preclude summary judgment, the facts subject to the dispute must be material to the conclusive issues in the case. On appeal, we apply the same rules and where we find reasonable minds could differ as to the conclusions drawn from the evidence, summary judgment must be denied.' [Citation omitted.]" Mitchell v. City of Wichita, 270 Kan. 56, 59, 12 P.3d 402 (2000) (quoting Bergstrom v. Noah, 266 Kan. 847, 871-72, 974 P.2d 531 [1999]).' State ex rel. Stovall v. Reliance Ins. Co., 278 Kan. 777, 788, 107 P.3d 1219 (2005)." Smith v. Kansas Gas Service Co., 285 Kan. 33, 39, 169 P.3d 1052 (2007).
In addition, we will be called upon to interpret certain contracts. The interpretation and legal effect of a written contract are matters of law over which an appellate court has unlimited review. Conner v. Occidental Fire & Cas. Co., 281 Kan. 875, 881, 135 P.3d 1230 (2006). Regardless of the district court's construction of a written contract, an appellate court may construe a written contract and determine its legal effect. City of Arkansas City v. Bruton, 284 Kan. 815, 828-29, 166 P.3d 992 (2007). However, whether a contract exists is a question of fact. In re Estate of Hjersted, 285 Kan. 559, 589, 175 P.3d 810 (2008).
Oliver also raises an issue involving the KRPC. "The interpretation of a Supreme Court rule, like the interpretation of a statute, *340 is a question of law. Gerhardt v. Harris, 261 Kan. 1007, 1010, 934 P.2d 976 (1997)." Kansas Judicial Review v. Stout, 287 Kan. 450, 459, 196 P.3d 1162 (2008).

DISCIPLINARY VIOLATIONS
Oliver attempts to disqualify Wallace Saunders from receiving any portion of the fee generated through the referral agreement, which Oliver negotiated on behalf of the firm, because other members of the firm subsequently accepted representation of Olathe Medical Center, which was an adverse party in the Hotchkisses case. There is nothing in the record to indicate that, when Wallace Saunders opened the Hotchkiss file or when the referral to Shamberg was accepted, the firm had a conflict of interest with respect to the adverse interest of Olathe Medical Center.
The district court found that Oliver's complaint about his former firm's ethical conduct was more properly addressed through a disciplinary action, where, if appropriate, the firm could be ordered to disgorge any fees that were wrongfully received. We agree. This is an action between an attorney and his former firm over how to divide a referral fee, in which the attorney wants to assert the clients' rights to have conflict-free representation, as a means to take the entire fee. This is not an action by a client seeking to avoid paying attorney fees or to disqualify an attorney or a firm from the case. The foreign cases cited by Oliver are distinguishable as involving the disallowance of referral fees because the referring attorney or firm had a conflict of interest precluding the initial acceptance of representation. Here, Oliver seeks to be the beneficiary of Wallace Saunders' alleged postreferral wrongdoing toward its clients.
Supreme Court Rule 226 (2008 Kan. Ct. R. Annot. 391), setting forth the Kansas Rules of Professional Responsibility, contains a section explaining the scope of the rules. Particularly pertinent to the case before us is the following recitation:
"Violation of a Rule should not itself give rise to a cause of action against a lawyer nor should it create any presumption in such a case that a legal duty has been breached. In addition, violation of a Rule does not necessarily warrant any other nondisciplinary remedy, such as disqualification of a lawyer in pending litigation. The Rules are designed to provide guidance to lawyers and to provide a structure for regulating conduct through disciplinary agencies. They are not designed to be a basis for civil liability. Furthermore, the purpose of the rules can be subverted when they are involved by opposing parties as procedural weapons. The fact that a Rule is a just basis for a lawyer's self-assessment, or for sanctioning a lawyer under the administration of a disciplinary authority, does not imply that an antagonist in a collateral proceeding or transaction has standing to seek enforcement of the Rule." 2008 Kan. Ct. R. Annot. 395.
Accordingly, when Oliver discovered what he perceived to be a rule violation by Wallace Saunders, his duty as an attorney was to "inform the appropriate professional authority," i.e., the Office of the Disciplinary Administrator. KRPC 8.3(a) (2008 Kan. Ct. R. Annot. 585). He should not have sought standing to enforce the disciplinary rules as a procedural weapon to prevail in a civil action.

REFERRAL AGREEMENT
The district court's memorandum decision began with the declaration: "This is a contract action." We agree. However, whereas the district court focused solely on Wallace Saunders' duty under a referral agreement, the facts of this case require us to consider the interface of the respective parties' duties and obligations under a number of agreements. Oliver and Wallace Saunders had reciprocal rights and obligations emanating from an employment contract, the DCA, a stock purchase agreement, and the agreements executed upon Oliver's termination. There was an attorney/client relationship between Oliver and the Hotchkisses, and vicariously between Wallace Saunders and the Hotchkisses. Shamberg had an attorney/client employment agreement with the Hotchkisses and a referral agreement with Wallace Saunders and/or Oliver.
We begin with the referral agreement between Shamberg and Wallace Saunders, *341 which was the basis for the district court's ruling. The district court found that a valid referral fee agreement was formed between the two law firms, Wallace Saunders and Shamberg; that Wallace Saunders gave consideration when Oliver, as a director-agent of the firm, referred the Hotchkisses to Shamberg and that firm accepted the case; that, in return, Shamberg then promised to pay Wallace Saunders a referral fee; and that Wallace Saunders "needed to do nothing else." Apparently, the district court viewed the referral agreement as a stand-alone contract for the sale of the medical malpractice claim and determined that Wallace Saunders had completed its performance and earned its referral fee when the client was delivered to Shamberg. We cannot accept that characterization. "A client is not an article of property in which a lawyer can claim a proprietary interest, which he can sell to other lawyers expecting to be compensated for the loss of a property right." Palmer v. Breyfogle, 217 Kan. 128, 142, 535 P.2d 955 (1975). The referral agreement must be viewed in the context of the duties which are owed to the client.
We do agree with the district court's finding that the original referral agreement was between the law firms. No one contests that fact, and Oliver's employment contract would dictate that he be considered an agent of Wallace Saunders while performing attorney services during his period of employment. However, the uncontroverted facts refute the notion that Wallace Saunders had no further obligation on the file after referral.
The district court specifically found that "Oliver provided beneficial legal counsel to Rob and Sara regarding their lawsuit both before and after he left [Wallace Saunders] on January 31, 2005." That finding is consistent with the affidavits from Oliver, Bergman, Robert Hotchkiss, and Sara Hotchkiss. Wallace Saunders contends that those services were not required by the referral agreement, pointing to language in Bergman's May 5, 2004, letter that the Shamberg firm would be responsible for doing all of the work. However, that same letter indicates that Oliver would be expected to continue to assist the Hotchkisses on certain matters and suggests that Bergman would utilize Oliver's assistance by specifically asking Oliver to accompany Bergman to visit a doctor. Moreover, the affidavits of both Oliver and Bergman, the two persons who negotiated the referral agreement on behalf of their respective firms, establish that the agreement contemplated Oliver's continued participation, after referral. While Wallace Saunders embraces Oliver's status as its agent to claim sole ownership of the referral fee, it apparently does not want to be bound by its agent's commitment to provide assistance to Bergman as part of the referral agreement.
Aside from the ambiguous language in Bergman's letter, the evidence establishes that part of the consideration for the referral was Oliver's continued participation. Pointedly, the conduct of the parties corroborates that agreement. See Cline v. Angle, 216 Kan. 328, Syl. ¶ 6, 532 P.2d 1093 (1975) ("If parties to a contract, subsequent to its execution, have shown by their conduct that they have placed a common interpretation on the contract, this interpretation will be given great weight in determining the meaning to be attributed to the provisions in question."). Both Bergman and Oliver conducted themselves as if the referral agreement called for Oliver's continued participation and assistance. At the very least, then, the question of whether Wallace Saunders was obligated to provide Shamberg assistance to earn its referral fee is a disputed fact.
Nevertheless, even if no further participation by Oliver was required by the referral agreement, it is difficult to intuit how Wallace Saunders' percentage share of the contingency fee could have been fully earned before Shamberg earned the contingency fee which was to be divided. Generally, an attorney who is discharged before the occurrence of the contingency provided for in a contingency fee contract may not recover compensation on the basis of the contract, but rather the attorney is entitled only to the reasonable value of the services rendered based upon quantum meruit. Madison v. Goodyear Tire & Rubber Co., 8 Kan.App.2d 575, Syl. ¶ 1, 663 P.2d 663 (1983). If the Hotchkisses had discharged Shamberg prior to obtaining the settlement judgments, there *342 would have been no contingency fee to split and Wallace Saunders' purported vested right in a share of that fee would have been illusory.
More importantly, however, the district court's ruling that Wallace Saunders did not need to do anything further to earn its referral fee ignores the firm's vicarious obligations to the Hotchkisses. In its brief, Wallace Saunders attempted to skirt the issue by arguing that its representation of the Hotchkisses ended upon the referral to Shamberg. At oral argument, the firm argued that Ryder v. Farmland Mut. Ins. Co., 248 Kan. 352, 362, 807 P.2d 109 (1991), stands for the proposition that a referring attorney does not have an attorney/client relationship with the person referred. Neither argument fits the facts of this case.
The affidavits of Robert Hotchkiss and Sara Hotchkiss state that they considered Oliver to be their attorney from their first consultation about the medical malpractice claim and that the representation continued throughout the medical malpractice litigation. Oliver actively counseled the Hotchkisses about selecting an attorney and participated in the selection process. Oliver's services from the beginning exceeded the simple referral scenario. Thereafter, as the district court specifically found, Oliver continued to provide beneficial services to the Hotchkisses, i.e., they continued to be Oliver's clients even after the referral. Again, if Wallace Saunders wants to claim Oliver as an agent in order to claim ownership of the referral fee agreement, it must also claim Oliver's clients as clients of the firm. Moreover, the district court found that Wallace Saunders had set up client files for the Hotchkisses in the normal fashion, i.e., Wallace Saunders' own records refute its assertion that the Hotchkisses were not firm clients after the referral date.
The affidavits of Robert and Sara Hotchkiss also clearly establish their expectation that Oliver would continue to advise and counsel them, after the referral to Shamberg. Robert Hotchkiss' affidavit states that he asked how Oliver would be paid for his advice and counseling on the medical malpractice case and Oliver said that his fees would be paid out of Bergman's percentage. Therefore, regardless of what Oliver promised Bergman with respect to doing the work on the malpractice litigation, Oliver promised the Hotchkisses that he would provide them with continuing legal advice and counseling after the referral and that the Hotchkisses would not need to pay any fees over and above the contingency percentage. Wallace Saunders was bound by that agreement, as Oliver's principal.
Accordingly, the Hotchkisses' consent to the referral agreement and the resultant referral fee must be viewed in the context of their vicarious attorney/client relationship with Wallace Saunders. The firm's obligations to its own client cannot be divorced from the referral agreement it made with another firm. Although the referral fee may be paid by one firm to another, the bottom line is that fee is being paid by the clients. Wallace Saunders' argument, and the district court's suggestion, that Oliver should look to the Hotchkisses to pay additional fees for his postdeparture beneficial services suggests a breach of the firm's agreement with the Hotchkisses.
Moreover, requiring the Hotchkisses to pay more than the contingency fee contradicts the district court's finding that the referral agreement met the reasonableness requirement of KRPC 1.5(g) (2008 Kan. Ct. R. Annot. 448) because the judge in the medical malpractice lawsuit approved the amount of the contingency fee. That fee approval contemplated that the referring attorney would be fully compensated through its percentage share of the agreed-upon contingency fee. If the Hotchkisses must pay more than the total contingency fee, then the validity of the referral agreement is suspect under the requirement that the total fee must be reasonable, i.e., the referral agreement cannot increase the total amount of fees the client must pay.
To summarize, Wallace Saunders, through its agent Oliver, had an attorney/client relationship with the Hotchkisses which required the firm to provide the client with advice and counseling throughout the medical malpractice litigation. The clients agreed to compensate for those services by consenting to the *343 referral agreement which gave Wallace Saunders a share of the contingency fee. When Oliver departed the firm, the referral fee had not been fully earned because the clients were still entitled to services, i.e., the referral agreement remained executory.

DEFERRED COMPENSATION AGREEMENT
When Oliver departed Wallace Saunders, he took the Hotchkisses' file, at the client's request. Oliver contends that the referral agreement is simply a fee arrangement with the client which passes with the file. He interprets the DCA as providing a mechanism for valuing the work-in-process for all of the applicable files, both retained and withdrawn, and regardless of whether the matter is designated as hourly or contingent fee. Accordingly, he argues that when Wallace Saunders deducted the agreed-upon value of the Hotchkiss file in the calculation of the amount due Oliver under the DCA, the firm received all of its contractually allocated share of the referral agreement. We agree.
The DCA begins with a calculation of the individual attorney's percentage share of the firm by dividing the attorney's total income in the preceding year by the total salaries and bonuses paid to all stockholders/employees for the prior year. The agreement then creates two categories upon which compensation will be calculated: work-in-process and accounts receivable. The work-in-process calculation begins with the total number of client files in the firm's inventory the previous month and then subtracts the number of files in accounts receivable on that date. The resultant number of work-in-process files is then multiplied by $150 to get the total value of the firm's work-in-process. That total is reduced by a floor dollar amount which essentially represents the number of active files the firm had in inventory when the attorney entered the firm, again valued at $150 each. That net dollar amount is then multiplied by the attorney's percentage share of the firm to yield the amount that will be paid to the individual attorney. When an attorney is withdrawing from the firm, the attorney's work-in-process payment is further reduced by the number of files that the attorney takes out of the firm, multiplied by $150 per file and by the attorney's percentage share.
The attorney's deferred compensation for accounts receivable is essentially determined by multiplying the attorney's percentage share with the dollar amount of unrealized accounts receivable, which is defined as "professional charges for services billed and the expenses advanced by the [firm] which shall remain unpaid as of the last calendar month next preceding the event requiring payment." A floor amount is again deducted and other adjustments made, none of which impact our analysis.
The district court found that the parties' characterization of the Hotchkisses' file as work-in-process, rather than as an accounts receivable, did not impact the original referral agreement between Wallace Saunders and Shamberg. Further, the court opined that the DCA was not an effective assignment of that referral contract and that the carve-out agreement corroborated that there was no assignment or transfer of the firm's contractual rights. We disagree on both counts.
First, we quickly dispose of all of the arguments relying on the carve-out agreement. That document simply allowed the parties to settle all other aspects of the DCA calculation without prejudicing their respective claims to the referral fee in this case. By its terms, it did not create, modify, or destroy any of the parties' respective rights and obligations that existed at the time.
Next, the district court's determination that the parties' treatment of the Hotchkisses' file as work-in-process for DCA purposes had no impact on the original referral fee agreement is inconsistent with the court's determination that Wallace Saunders had nothing more to do to earn the referral fee. The very name of the category, "work-in-process," indicates a recognition there is more to do on the file. If, as the district court opined, Wallace Saunders had to do nothing else on the Hotchkisses' referral, then that fee was fully earned when Oliver departed. If the fee was fully earned, the Hotchkisses' file should have been in the accounts receivable pile, i.e., work completed, awaiting payment.
*344 More to the point, however, the district court's interpretation of the DCA treats the referral agreement as a separate and distinct sale of chattel between law firms, disassociated from the client file. However, as we noted above, the referral agreement was part of Oliver's fee arrangement with the clients and, accordingly, was inextricably tied to the clients' file. When Oliver took the Hotchkisses' file, he not only assumed the obligation to complete the performance that was due the clients, but he also received the benefits of the fee arrangement that was tied to that performance.
On the other hand, part of the performance on the Hotchkisses' file was effected while Oliver was an agent of Wallace Saunders. Accordingly, the firm was entitled to that part of the compensation the clients consented to be paid to Oliver that was earned during his employment. Cf. Tucker v. Rio Optical Corp., 20 Kan.App.2d, 233, 236, 885 P.2d 1270 (1994) (generally, attorney withdrawing for good cause entitled to compensation, even if attorney had been working under a contingent fee contract). Arguably, in such circumstances, an allocation between the firm and departing attorney could be made on the basis of quantum meruit. Cf. Madison v. Goodyear Tire & Rubber Co., 8 Kan.App.2d 575, 579, 663 P.2d 663 (1983) (discharged attorney subject to contingent fee arrangement entitled to reasonable value of services rendered based on quantum meruit). However, Wallace Saunders does not seek only a fair share of the fee and, more importantly, the firm had reached a prior agreement with Oliver, through the DCA, to place a fixed value on the file, rather than to allocate value on the basis of quantum meruit.
Wallace Saunders attempts to avoid using the DCA as a measure of the Hotchkisses' file's value by saying it was designed simply to measure the firm's growth during the attorney's employment. However, the firm acknowledges that the DCA "is an admittedly crude measuring stick used to arrive at an amount to pay a departing member." Crude or not, the DCA effectively measures a departing attorney's share of the value of the firm by utilizing a fixed rate of $150 for each and every work-in-process file, including those retained by the firm with a contingent fee arrangement. Upon paying for retained work-in-process files under the DCA, the firm is entitled to receive all of the future fees generated by those files. In the context of our case, if the Hotchkisses had not requested Oliver to take their file, Oliver's employment agreement would have left that file with Wallace Saunders. The firm would have paid Oliver for his percentage share of $150 on that file, being approximately $5.22, and subsequently kept the referral fee of over a half-million dollars. As Oliver aptly stated in his brief, "Sauce for the goose is sauce for the gander." The DCA makes no provision for treating a withdrawn file with a referral fee arrangement any differently. Oliver paid the agreed-upon value for the Hotchkisses' file under the DCA, and he, likewise, was entitled to the future fees generated by that file.
The district court's grant of summary judgment to Wallace Saunders and denial of summary judgment to Oliver are reversed. The matter is remanded to the district court with directions to grant summary judgment in favor of Oliver.
Reversed and remanded.[1]
DAVIS, J., recused.
GREENE, J., assigned.[2]
NOTES
[1]  REPORTER'S NOTE: Chief Justice Kay McFarland participated in case No. 97,584 before her retirement. Justice Dan Biles, currently a Justice on the Kansas Supreme Court, was not a member of the court when this case was argued and decided.
[2]  REPORTER'S NOTE: Judge Richard D. Greene, of the Kansas Court of Appeals, was appointed to hear case No. 97,584 vice Justice Davis pursuant to the authority vested in the Supreme Court by K.S.A. 20-3002(c).
