
    J. S. GANLEY AND OTHERS v. CITY OF PIPESTONE AND OTHERS. NEW AMSTERDAM CASUALTY COMPANY, APPELLANT.
    
    No. 22,968.
    January 12, 1923.
    Application of payments on running account made with funds of another.
    1. Where a debtor makes payments on a running account from funds absolutely his own without applying them on specific items and the creditor makes no such application, the law will apply them on the oldest items. But, if the payments were .made with funds impressed with an equity in favor of a third party, they will he applied so as to protect the interests of that party.
    Funds of one debtor cannot be applied on debt of another.
    2. Payments from the funds of one debtor cannot be applied on the debt of another, although a common representative has placed the transactions of both in single account.
    Finding sustained.
    3. The evidence .sustains the finding that a balance of $3,466.52 is due defendant bank from plaintiffs for advances -made under the agreement in controversy.
    Advances by bank to contractor give it preference over surety on funds withheld from contractor by owner.
    4. Where a bank makes an agreement with a contractor to advance funds needed to pay for labor and material as the work progresses, in consideration of an order from the contractor directing the owner to repay the advances so made out of any funds in his hands due under the contract and of the agreement of the contractor to deposit in the bank the funds received and to make all payments by checks on the bank, and, pursuant to such agreement, advances funds used exclusively for the payment of claims for labor and material for the payment of which the surety of the contractor was bound, the bank is not a mere volunteer or money loaner, and its right to be reimbursed for such advances out of funds withheld from the contractor by the owner is superior to that of the surety arising out of the payment by the surety of other claims for labor and material. New Amsterdam Casualty Co. v. Wurtz, 145 Minn. 438, followed and applied.
    Action in the district court for Pipestone county to recover $10,-992.92. The case was tried before Nelson, J., who made findings and ordered judgment as stated in the fourth paragraph of the opinión. From the judgments entered pursuant to the order for judgment, New Amsterdam Casualty Company appealed.
    Affirmed.
    
      Fowler, Carlson, Furber & Johnson, for appellant.
    
      Clay W. Johnson, for plaintiffs respondents.
    
      G. P. Gurley, for City of Pipestone.
    
      Morris Evans and C. T. Hoioa.rd, for First National Bank of Pipe-stone.
    
      
      Reported in 191 N. W. 738.
    
   Taylor, C.

In July, 191G, plaintiffs, a copartnership doing business under the firm name of Ganley Construction Company, entered into a contract with the city of Pipestone to pave certain streets in that city for the sum of $55,264.42 and executed the statutory bond to secure the performance of their contract and the payment of all claims for labor and material furnished therefor with defendant casualty company as surety thereon. Shortly thereafter they made an arrangement with defendant bank by which they opened an account with the bank in the name of J. H. & J. S. Ganley, and agreed to deposit therein all payments received under the contract with the city, and by which the bank agreed to advance them money as needed to pay claims incurred for labor and material in performing the contract. As a part of this arrangement, plaintiffs gave the bank an order directing the city to repay the bank all sums so advanced by it out of any moneys which should become due plaintiffs under the contract, which order was filed with the city clerk. Part of the paving was done in 1916 and the remainder in 1917. The claims growing out of the work done in 1916 were paid and satisfied and are not involved in this controversy.

In March, 1917, two of plaintiffs together with other parties organized a corporation under the name of Ganley Construction Company, the same name under which the partnership had done business, and it was evidently understood that the contract in question was to be transferred from the partnership to the corporation. But the city would not consent to the proposed transfer, and the city charter prohibited the assignment or transfer of any contract with the city without the consent of the city. For this, reason, the contract was not transferred but was completed by the plaintiffs as copartners. They seem, however, to have performed the work done in 1917 through the corporation; at least, they gave G. A. Thayer, an officer of the corporation and not a member of the partnership, full charge of the work and he carried it to completion for them.

On June 7, 1917, J. S. Ganley, who was a member of the partnership and also an officer of the corporation, went to the bank with Thayer and made an agreement with the bank to continue in force, during 1917, the arrangement made in 1916 with the single change that the account with the bank was to be carried in the name of G. A. Thayer by whom the checks drawn upon it were to be signed. Thayer began work under the contract in June and completed it September 14, 1917. He deposited in the bank all funds received, including the monthly payments made by the city, and made all payments by checks drawn on the bank. To cover the advances made by the bank he deposited notes from time to time executed by the corporation and received credit for the amount of the notes in his account. The arrangement between plaintiffs and the corporation under which the corporation executed these notes does not clearly appear. When the contract was completed plaintiffs owed considerable sums for labor and material which they were unable to pay and for which the casualty company was liable under its bond, and also a balance to the bank for advances made. The city refused to pay the final instalment of the contract price until all claims for labor and material had been paid and satisfied. Thereupon plaintiffs brought this action to have the court determine the rights, obligations and liabilities of the several parties concerned and to distribute the fund held by the city to those entitled thereto.

Before the trial the casualty company paid and satisfied all claims for labor and material outstanding when the action was brought and the present controversy is narrowed to the question whether the casualty company or the bank has the superior right to the money remaining in the hands of the city. The court found that the balance due from the city on this contract was the sum of $7,379.00; that the amount of the claims for labor and material paid by the casualty company under its bond exceeded that sum, and that the balance due the bank for money furnished to pay claims for labor and material on this contract was the sum of $3,466.52. The court held that the bank was entitled to this sum and interest thereon out of the fund in the hands of the city, and that the casualty company was entitled to the remainder of that fund, and rendered judgment accordingly. Both the findings and the judgment cover numerous other matters, some of which will be referred to later. The casualty company appealed.

Thayer began work under the contract held by the partnership in June, 1917, and'completed that contract September 14, 1917. On August 20, 1917, the corporation entered into a contract with the city o'f Pipestone to do certain paving therein specified for the sum of $10,783.24, and the casualty company was the surety on the bond given by the corporation to secure the*performance of this contract. This contract wras entirely separate and distinct from the contract of the previous year with the partnership, but Thayer was also placed in charge of the work under this contract. He commenced the work at once and completed it in November. After beginning work on the corporation contract, all expenditures on both contracts were made in the same manner by checks drawn against the same account and all funds received on both contracts were placed in this account.

The casualty company contends that the bank account in the name of Thayer was a single, continuous account from the time it was opened at the beginning of work on the first or partnership contract in June, 1917, until it was finally closed after the completion of the work on the second or corporation contract; that the deposits therein were credited on the account generally without being applied on any particular indebtedness by either Thayer or the bank; that these deposits must be applied on the oldest debit items of the account; that all the advances on the first contract were made prior to September 20, 1917, and, so far as they remained unpaid, were covered by and included in a note of $2,400 made on that date and a prior note of $1,800 made September 8, and. that, as both the advances and the deposits made after that date largely exceeded any amount then due, all amounts advanced on account of the first or partnership contract must be taken as fully paid and satisfied.

In support of this contention the casualty company invokes the well-established rule, announced in Hersey v. Bennett, 28 Minn. 86, 9 N. W. 590, 41 Am. Rep. 271, and other subsequent cases, that where a debtor makes payments on a running account without applying them on specific items of the account and the creditor makes mo such application, the law will apply them on the earliest items. Perhaps it may be said that this is the universal rule where the debtor makes the payments with money or property belonging to himself and which he is free to use or dispose of as he pleases. But the rule does not go to the extent of requiring or permitting payments to be so applied which are made with funds belonging to a third party or impressed with an equity in favor of a third party whose rights would be prejudicially affected by so applying them. Where payments are made from such funds they must be applied so as to protect the interests of the third party, and the creditor will not be permitted to apply them to the earliest items of the account, if doing so be to the detriment of the third party.

In Merchants Ins. Co. v. Herber, 68 Minn. 420, 71 N. W. 624, Herber was appointed agent of the insurance company with authority to collect and remit premiums, and gave a bond to secure the payment to the company of the premiums so collected. He was required to make remittances monthly and did so, but by agreement between him and the company several of these remittances were applied upon an indebtedness to the company for premiums collected before the beginning of the period covered by the bond. It was held that the premiums were the property of the company and that the surety was entitled to have those collected and remitted during the period covered by the bond applied on the obligation for which he was liable. The court, after remarking that as a general rule a surety cannot direct the application of payments made by his principal, said [at page 424]:

“This rule, as thus broadly stated, applies to cases only where the principal makes the payment from funds which are his own, and free from any equity in favor of the surety to have the money applied in payment of the debt for which he is liable. Hence, where the specific moneys paid to the creditor, and applied on a debt of a principal for which the surety is not held, are the very moneys for the collection and payment of which he is obligated to the creditor, he is not bound by such application, and is equitably entitled to have the moneys applied to the payment of the debt for which he is surety, unless the creditor can show that he has a superior equity to have them applied as they were applied. The adjudged cases are not harmonious on this proposition, but any attempt to here cite and analyze them would be unprofitable. Many of them which are apparently conflicting may be reconciled by observing the distinction between payments made from funds which were the absolute property o'f the principal, and those madé from funds affected by an equity in favor of the surety. Upon principle, we hold that the proposition we have stated is correct.”

See also Thorne v. Allen, 72 Minn. 461, 75 N. W. 706; Clark v. Gaar, Scott & Co. 78 Minn. 492, 81 N. W. 530; L. J. Mueller Furnace Co. v. Colvin, 146 Minn. 252, 178 N. W. 496; Columbia Digger Co. v. Sparks, 227 Fed. 780, 142 C. C. A. 304; Bross v. McNicholas, 66 Ore. 42, 133 Pac. 782, Ann. Cas. 1915B, 1272; Boyer-Van Kuran L. & Co. v. Colonial Apartment House Co. 94 Neb. 180, 142 N. W. 519; Crane Co. v. Pacific H. & P. Co. 36 Wash. 95, 78 Pac. 460; Andrews v. Exchange Bank, 108 Ga. 802, 34 S. E. 183; First Nat. Bank v. Scott, 123 N. C. 538, 31 S. E. 819; Terhune v. Colton, 12 N. J. Eq. 232; St. Louis Type Foundry Co. v. Wisdom, 72 Tenn. (4 Lea) 695; Fidelity & Deposit Co. v. Northwestern National Bank, 90 Wash. 179, 155 Pac. 743.

Here we have two different parties performing separate contracts. Thayer was the managing agent for both and received the funds and made the disbursements for both. The original arrangement with the bank for the opening of the bank account and the advancement of funds by the bank was made by the partnership. The purpose of this arrangement was to provide the funds needed by the partnership in performing its contract. The renewal of the arrangement in 1917 was made on behalf of the partnership and related solely to the contract held by the partnership, for no other was then in existence and the assignment given in 1916 of the payments to be made by the city under the contract was continued in force as security for the advances to be made by the bank , in 1917. The bank account, although in the name o'f Thayer, was in no sense his personal account. It was opened by and for the partnership, but was put in the name of Thayer, the manager in charge of the work, as a matter of convenience to enable him to draw checks for the necessary disbursements as the work progressed. That Thayer, after beginning work for the corporation under the second or corporation contract, took it upon himself to treat the account as covering and including that business as well as the business of the partnership, is no sufficient reason for applying the funds accruing to the corporation from its own contract on the debt of the partnership. Where a creditor has two debtors he cannot apply payments made by one on the debt of the other, although both have the same name and the charges against both are entered in the same account. St. Louis Type Foundry Co. v. Wisdom, 72 Tenn. 695. The casualty company is not entitled t» have the proceeds of the corporation contract on the expenditures for the partnership contract.

The casualty company further contends that the finding that there is a balance of $3,466.52 due the bank for advances made ’for the partnership contract, is not sustained by the evidence, even if the transactions pertaining to that contract are to be treated as separate and distinct from those pertaining to the corporation contract.

The expenditures for the partnership contract began in June and continued until that contract was completed in September. The expenditures for the smaller corporation contract began after August 20. Both parties concede that the expenditures made between August 20 and the time of the completion of the partnership contract, are so intermingled that it is impossible to segregate those made for one contract from those made for the other. Consequently the amounts chargeable to the partnership account cannot be determined by computation.

On September 8, 1917, a note for $1,800 was deposited to cover existing overdrafts and advances then to be made and the amount thereof was credited in the account. On September 20, 1917, a note for $2,400 was deposited to cover existing overdrafts and the amount thereof was credited in the account. There is evidence to the effect that when these notes were taken it was with the understanding that they would “about wind up the transaction on the 1916 contract.” Other notes were given both before and after these, some o'f which were credited in the account and some of which took up prior notes. All have been paid except these two, and the sum of $733.48 was paid November 13, 1917, on the $1,800 note, leaving a balance of $3,466.52 due on the two. This is the exact amount which the court found due the bank for advances made for the partnership contract. It is the same amount which the assistant cashier testified was still due for advances made on that contract. As above stated, the advances for the two contracts made after August 20 cannot be segregated from each other. Between August 20 and September 20 approximately $7,000 was deposited in addition to the amount of the two notes in question, and yet the account was overdrawn during the greater part of that period, and after crediting the amount of the $2,400 note on September 20 the credit balance was only $66.44. There is no evidence from which it can be said that the advances for the partnership contract were taken care of independent of the credits given 'for these two notes. In view of the evidence as to the understanding at the time these notes were given, and of the testimony of the assistant cashier who took them that a balance of $3,466.52 is still due from the partnership, and of the absence of evidence from which the state of the account can be ascertained more definitely, we think the court was justified in concluding that the balance due the bank for advances to the partnership was equal to the balance due on these notes. The fact that funds, admittedly received from the corporation contract after the completion of the partnership contract and while the city was withholding the final payment thereon, were applied in payment of later notes instead of these notes, accords with the theory that these notes represented a balance due from the partnership and that the later notes represented advances made wholly or mainly for the corporation contract.

The corporation constructed a stone-crushing plant at Pipestone in the spring of 1917 and put it in operation in June. The partnership does not appear to have had anything to do with this project, but Thayer seems to have taken charge of the business after the plant was in operation. He paid the operating expenses by checks on the bank and deposited the payments for crushed stone to the credit of his account with the bank. This added to the mix-up in the account, but we take it that no claim is made that any of the advances in controversy are chargeable to the stone-crushing business. It seems to have been self-supporting while in operation, and the payments made for it were marked so that they could be segregated from those made for the paving contracts.

The casualty company further contends that its right to be subrogated to the rights of the laborers and materialmen whose claims it paid, gave it a right to the fund in the hands of the city superior to that of the bank under the assignments from the contractors.

The court found, on ample evidence, that plaintiffs entered into an agreement with the bank by which plaintiffs promised to deposit with the bank the funds received from the city on the contract, and the bank promised that, in case plaintiffs needed additional funds to pay for labor and material, the bank would furnish such 'funds; that it was agreed that the funds so furnished should be used only in paying for labor and material applied on the contract; that pursuant to such agreement plaintiffs deposited with the bank the funds received and the bank advanced funds to pay for labor and material, and that all the funds so advanced were paid by the bank direct to laborers and materialmen on checks issued to them by plaintiffs •or plaintiffs’ authorized agent for labor and material which actually entered into the work. The facts bring the case within the rule announced in New Amsterdam Casualty Co. v. Wurtz, 145 Minn. 438, 177 N. W. 664. The casualty company concedes that the Wurtz case was correctly decided but insists that a wrong reason ivas given for the decision.

Where a building contract provides that a part of the contract price shall be withheld until the work is completed and the claims for labor and material have been paid, and the contractor fails to pay such claims, it is well' settled that the laborers and materialmen are entitled to have the fund so retained applied upon their claims, and also that a surety of the contractor who has been compelled to pay laborers and materialmen is entitled to be subrogated to their rights in this fund, unless some third party has a superior right to it. The cases involving the respective rights in such a fund of a surety who has paid the claims of laborers and material-men and of a bank to which the contractor has assigned the fund as security were examined and considered in the Wurtz case. The conclusion was reached that where the bank advanced money without being under an obligation to do so, at the time it was advanced, or where the money advanced could be used by the contractor as he saw fit, the equities of the surety were superior to those of the bank, but that where the bank had previously made an agreement with the contractor to advance money to pay for the labor and material used in the work during its progress and took the assignment as security for the advances so to be made, and pursuant to such agreement did make advances which were used solely in paying claims for labor and material for which the surety would have been liable if they had remained unpaid, the rights of the bank under its assignment were superior to those of the surety. We see no reason to doubt the correctness of this conclusion.

Where the bank, in consideration of the security given and of the agreement of the contractor to make payments through the bank and to deposit funds therein, agrees to advance money in the future for payrolls and material, we see no good reason why it should not be permitted to carry out its agreement and make the promised advances without being put in the position of a mere volunteer. And, where the advances so made are applied exclusively in payment of claims for the payment of which the surety was bound, we think that the rights of the bank under its assignment are superior to the equitable rights of the surety.

The casualty company urges in strong language that the bank voluntarily assumed the obligation to advance the money and should not be permitted to acquire a right to the fund in controversy by performing an obligation which it voluntarily assumed. This argument applies to the bank with no more force than to the casualty company itself. That company voluntarily assumed the obligations of a surety and its position, viewed from this standpoint, would seem to be no better than that of the bank.

The casualty company also contends that the bank made no binding agreement to advance money and must be deemed a volunteer for that reason. It predicates this contention on statements of the cashier on cross-examination to the effect that the advances were to be for a specific purpose, that nothing was said as to the amount, but that he understood that the bank would be the judge of the amount which it would advance. The agreement was to advance funds needed to make payments for labor and material as the work progressed. The advances were to be made by paying checks issued by Thayer. So far as appears all checks issued by him were paid. If the bank considered that it had the right to place a limit on the amount which it would advance for the specified purpose, it did not do so. And, whatever may have been its rights in that regard, we think it is not to be deemed a volunteer in making the advances which it did make pursuant to its agreement.

Various other questions have been raised, but we find none requiring special mention or which would justify extending an opinion already too long.

Judgment affirmed.  