I'm at the final stages of a development project that I've been working on for about a year and a half. The major difference between this project and others that I've worked on is that the client wants the source code.

Thier desire is not to sell it, but, rather maintain and upgrade it without having to contract with my company for additional programming manhours.

I do not know the exact details of the contract worked out between my company and my client, but, the factors szlamany mentioned were taken into consideration (what monies may be lost to us if they no longer need us for maintainance/upgrades/etc.)

I also don't know what my company is charging them for the source code, but my boss once told me that he would love to have in his pocket what they are paying.