fix:차변/대변 금액 0일 때 빈칸 표시 (placeholder 금액 노출)

This commit is contained in:
김보곤
2026-02-11 13:58:19 +09:00
parent 89c8c24663
commit 2cc28c4bc3

View File

@@ -1133,7 +1133,7 @@ className={`px-2 py-0.5 rounded text-xs font-medium cursor-pointer hover:opacity
</td>
<td className="px-3 py-2">
<input type="text" id={`m-amount-debit-${index}`}
value={line.dc_type === 'debit' ? formatInputCurrency(line.debit_amount) : ''}
value={line.dc_type === 'debit' && line.debit_amount ? formatInputCurrency(line.debit_amount) : ''}
onChange={(e) => updateLine(index, 'debit_amount', parseInputCurrency(e.target.value))}
onKeyDown={(e) => { if (e.key === 'Tab' && !e.shiftKey) { e.preventDefault(); document.getElementById(`m-desc-${index}`)?.focus(); } }}
disabled={line.dc_type !== 'debit'}
@@ -1142,7 +1142,7 @@ className={`w-full px-2 py-1.5 text-xs text-right border rounded outline-none fo
</td>
<td className="px-3 py-2">
<input type="text" id={`m-amount-credit-${index}`}
value={line.dc_type === 'credit' ? formatInputCurrency(line.credit_amount) : ''}
value={line.dc_type === 'credit' && line.credit_amount ? formatInputCurrency(line.credit_amount) : ''}
onChange={(e) => updateLine(index, 'credit_amount', parseInputCurrency(e.target.value))}
onKeyDown={(e) => { if (e.key === 'Tab' && !e.shiftKey) { e.preventDefault(); document.getElementById(`m-desc-${index}`)?.focus(); } }}
disabled={line.dc_type !== 'credit'}
@@ -1536,7 +1536,7 @@ className={`px-2 py-0.5 rounded text-xs font-medium cursor-pointer hover:opacity
</td>
<td className="px-3 py-2">
<input type="text" id={`b-amount-debit-${index}`}
value={line.dc_type === 'debit' ? formatInputCurrency(line.debit_amount) : ''}
value={line.dc_type === 'debit' && line.debit_amount ? formatInputCurrency(line.debit_amount) : ''}
onChange={(e) => updateLine(index, 'debit_amount', parseInputCurrency(e.target.value))}
onKeyDown={(e) => { if (e.key === 'Tab' && !e.shiftKey) { e.preventDefault(); document.getElementById(`b-desc-${index}`)?.focus(); } }}
disabled={line.dc_type !== 'debit'}
@@ -1546,7 +1546,7 @@ className={`w-full px-2 py-1.5 text-xs text-right border rounded outline-none fo
</td>
<td className="px-3 py-2">
<input type="text" id={`b-amount-credit-${index}`}
value={line.dc_type === 'credit' ? formatInputCurrency(line.credit_amount) : ''}
value={line.dc_type === 'credit' && line.credit_amount ? formatInputCurrency(line.credit_amount) : ''}
onChange={(e) => updateLine(index, 'credit_amount', parseInputCurrency(e.target.value))}
onKeyDown={(e) => { if (e.key === 'Tab' && !e.shiftKey) { e.preventDefault(); document.getElementById(`b-desc-${index}`)?.focus(); } }}
disabled={line.dc_type !== 'credit'}