Section Fourteen Hundred and Seventy-nine. Where a debtor, under several obligations to another, does an act, by way of performance, in whole or in part, which is equally applicable to two or more of such obligations, such performance must be applied as follows:
One-If, at the time of performance, the intention or desire of the debtor that such performance should be applied to the extinction of any particular obligation, be manifested to the creditor, it must be so applied.
Two-If no such application be then made, the creditor, within a reasonable time after such performance, may apply it toward the extinction of any obligation, performance of which was due to him from the debtor at the time of such performance; except that if similar obligations were due to him both individually and as a trustee, he must, unless otherwise directed by the debtor, apply the performance to the extinction of all such obligations in equal proportion; and an application once made by the creditor cannot be rescinded without the consent of [the] debtor.
Three-If neither party makes such application within the time prescribed herein, the performance must be applied to the extinction of obligations in the following order; and, if there be more than one obligation of a particular class, to the extinction of all in that class, ratably:
Ca. Civ. Code § 1479