The contract binding the principal and the managing agent may be terminated at any time under the conditions set by the parties. However, in the event of termination of the contract by the principal, except in the event of gross negligence on the part of the manager-agent, the principal shall pay the manager-agent compensation equal, unless more favourable conditions are agreed by the parties, to the amount of commissions earned, or to the minimum guaranteed commission mentioned in Article L. 146-3, during the six months prior to termination of the contract, or during the term of performance of the contract if this was less than six months.