feat: add initial balance support to accounts, enhancing account management and balance calculations across components
This commit is contained in:
9
lib/account-utils.ts
Normal file
9
lib/account-utils.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { Account } from "./types";
|
||||
|
||||
/**
|
||||
* Calcule le solde réel d'un compte en incluant le solde initial
|
||||
*/
|
||||
export function getAccountBalance(account: Account): number {
|
||||
return (account.initialBalance || 0) + account.balance;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user