fix initial balance logic and add edit for cycle data

This commit is contained in:
Alberto-Audrix committed 2026-09-01 14:59:47 +07:00
1 parent 7a9d600aa6
commit 697feb206c
15 files changed
+402 -93

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@ const FeedSaldoCard: React.FC<FeedSaldoCardProps> = ({
displayDate,
}) => {
const saldoData = useMemo(() => {
const inbound = latest?.in_total ?? feedInitialBalance;
const inbound = (latest?.in_total ?? 0) + feedInitialBalance;
const feedUse = latest?.feed_use_total ?? 0;
const keluar = latest?.out_total ?? 0;
const saldo = inbound - feedUse - keluar;