fix(stock): 브로커 총 매입 금액을 매입가 단순 합계로 수정
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -76,7 +76,8 @@ export default function usePortfolio() {
|
|||||||
for (const item of items) {
|
for (const item of items) {
|
||||||
const qty = item.quantity ?? 0;
|
const qty = item.quantity ?? 0;
|
||||||
const purchase = item.purchase_price ?? item.avg_price ?? 0;
|
const purchase = item.purchase_price ?? item.avg_price ?? 0;
|
||||||
totalBuy += purchase * qty;
|
// 총 매입 = 종목별 매입가의 단순 합 (수량 미곱산)
|
||||||
|
totalBuy += purchase;
|
||||||
totalCostBasis += (item.avg_price ?? 0) * qty;
|
totalCostBasis += (item.avg_price ?? 0) * qty;
|
||||||
if (item.eval_amount != null) totalEvalAmt += item.eval_amount;
|
if (item.eval_amount != null) totalEvalAmt += item.eval_amount;
|
||||||
else hasNullPrice = true;
|
else hasNullPrice = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user