diff --git a/agents/stock/workspace/scripts/behive_web.py b/agents/stock/workspace/scripts/behive_web.py
index 86e886b..8a85b6f 100644
--- a/agents/stock/workspace/scripts/behive_web.py
+++ b/agents/stock/workspace/scripts/behive_web.py
@@ -8723,8 +8723,14 @@ function renderOrderInfo(){
var pl = (price - avg) * qty;
var plCls = pl>=0?'pl-up':'pl-down';
var plSign = pl>=0?'+':'';
+ // 같은 소유자 그룹(본인 일반↔ISA / 가희끼리) 다른 계좌도 보유 중이면 현재계좌/전체 병기
+ var selAcc = (($('[data-order-account]')||{}).value) || '';
+ var sibAcc = selAcc ? siblingAccount(selAcc) : null;
+ var sibHold = (sibAcc && state.accStatus && state.accStatus.byLabel && state.accStatus.byLabel[sibAcc]) ? (state.accStatus.byLabel[sibAcc].hold_qty||0) : 0;
+ var holdPart = '보유: '+fmt(d.hold_qty||0)+'주';
+ if(sibHold > 0) holdPart += ' / 전체 '+fmt((d.hold_qty||0)+sibHold)+'주';
infoEl.innerHTML =
- '보유: '+fmt(d.hold_qty||0)+'주 (매도가능 '+fmt(d.trde_able_qty||0)+'주)
'+
+ holdPart+' (매도가능 '+fmt(d.trde_able_qty||0)+'주)
'+
'평단가: '+fmt(avg)+'원
'+
'예상수익: '+plSign+fmt(pl)+'원 ('+fmt(qty)+'주 매도)
'+
'주문예상액: '+fmt(amount)+'원';
@@ -9153,12 +9159,14 @@ function doPropose(){
}
return;
}
- // 매도인데 같은 소유자 그룹의 다른 계좌에도 같은 종목 보유 → 선택 팝업 (두 계좌 모두 / 선택 계좌만 / 취소)
+ // 전량매도(입력 수량 = 매도가능 전량)이고 같은 소유자 그룹의 다른 계좌에도 같은 종목 보유
+ // → 선택 팝업 (두 계좌 모두 / 선택 계좌만 / 취소). 일부매도는 팝업 없이 단일 진행.
if(state.side === 'SELL'){
+ var fullSell = lc && typeof lc.max_qty === 'number' && lc.max_qty > 0 && qty === lc.max_qty;
var sib = siblingAccount(account);
var sibInfo = (sib && state.accStatus && state.accStatus.byLabel) ? state.accStatus.byLabel[sib] : null;
var sibQty = sibInfo ? (sibInfo.trde_able_qty || 0) : 0;
- if(sibQty > 0){
+ if(fullSell && sibQty > 0){
openSellChoice({account: account, qty: qty, sibling: sib, siblingQty: sibQty, orderType: orderType, price: price});
return;
}
@@ -9233,8 +9241,8 @@ function openSellChoice(opts){
if(sum){
sum.innerHTML = '' + (state.name || state.code) + ' 종목을 ' + (disp[opts.account]||opts.account) +
' · ' + (disp[opts.sibling]||opts.sibling) + ' 두 계좌 모두 보유하고 있습니다.
' +
- '· ' + (disp[opts.account]||opts.account) + ': ' + fmt(opts.qty) + '주 매도 (입력 수량)
' +
- '· ' + (disp[opts.sibling]||opts.sibling) + ': ' + fmt(opts.siblingQty) + '주 매도 (보유 전량)
' +
+ '· ' + (disp[opts.account]||opts.account) + ': ' + fmt(opts.qty) + '주 매도 (매도가능 전량)
' +
+ '· ' + (disp[opts.sibling]||opts.sibling) + ': ' + fmt(opts.siblingQty) + '주 매도 (매도가능 전량)
' +
'· 단가: ' + priceStr + ' (두 계좌 동일)';
}
var sb = $sc('[data-sell-choice-single]');