What Happens in Vegas
(2008)

Joy (Cameron Diaz) finds out that Jack (Ashton Kutcher) had originally tried to convince Mason (Jason Sudeikis) that she wasn't over him in an attempt to get her to divorce Jack so he could keep all of the money.

After meeting the six-month time frame set by Judge Whopper (Dennis Miller), instead of agreeing to either agree to split the money in half between the two of them or to stay married, she decides that she just wants a divorce and Jack can keep all of the money, then she leaves town. When Jack figures out what happened, he eventually finds her, where he apologizes and asks her to marry him again. She says yes.

Thanks Sam!