feat: add initial balance support to accounts, enhancing account management and balance calculations across components

This commit is contained in:
Julien Froidefond
2025-11-30 12:13:02 +01:00
parent c26ba9ddc6
commit 184a073bb1
13 changed files with 117 additions and 30 deletions

View File

@@ -24,6 +24,7 @@ interface AccountFormData {
type: Account["type"];
folderId: string;
externalUrl: string;
initialBalance: number;
}
interface AccountEditDialogProps {
@@ -99,6 +100,24 @@ export function AccountEditDialog({
</SelectContent>
</Select>
</div>
<div className="space-y-2">
<Label>Solde initial</Label>
<Input
type="number"
step="0.01"
value={formData.initialBalance}
onChange={(e) =>
onFormDataChange({
...formData,
initialBalance: parseFloat(e.target.value) || 0,
})
}
placeholder="0.00"
/>
<p className="text-xs text-muted-foreground">
Solde de départ pour équilibrer le compte
</p>
</div>
<div className="space-y-2">
<Label>Lien externe (portail banque)</Label>
<Input