I always preferred the Dolly Parton version as well. You are correct that it was in "Best Little Whorehouse in Texas". However, Dolly didn't write the song for that movie. In fact she wrote the song when she left the Porter Wagnor show because Porter had given her her start, and she had been with the show for a long time. She wanted to pay tribute to him while letting him know why it was best for both of them for her to move on.
mistmouse