Different lawyer here. Please permit me to assist.
It is well established under California law that advances against commissions are not yet "earned," until the commission is earned. Therefore the advance money is still the property of the employer, not the employee, and can be recovered by a legal action after the employee's termination from employment. However, unless the employee is otherwise exempt from the minimum wage laws, the employee is entitled to minimum wage for his/her services (and overtime), which cannot be recovered from the advance.
Re your question about contract language making you only liable for repayment from your earned commissions, that language implies a penalty to the employer, since the difference between commissions and advance were not earned and you are effectively getting the money in exchange for nothing.
You could possibly include language stating something like: "In the event that any unearned advance balance exists as of the date of termination, said balance shall be considered a bonus for past services rendered to the employer."
Hope this helps.
NOTICE: My goal here is to educate the public about the law. Please help me in this effort by clicking Accept for my Answer to your Question. If you have a subscription account, clicking Accept does not create any additional charge. It merely gets me credit for my Answer. And, if you need to contact me again, please put my user id on the title line of your question ("To Socrateaser"), and the system will send me an alert. Thanks!
Please Click the following link for IMPORTANT LEGAL INFORMATION