아마란스 결재문서 금액 표시 오류 수정 (formatNumber 소수점 처리) #191

Merged
hjjeong merged 1 commits from V20260210 into main 2026-03-30 06:55:13 +00:00

View File

@@ -3598,7 +3598,13 @@ public class ApprovalService {
private String formatNumber(Object value){
if(value == null) return "0";
try {
long num = Long.parseLong(value.toString().replaceAll("[^0-9\\-]", ""));
String strVal = value.toString().replaceAll("[^0-9.\\-]", "");
if(strVal.isEmpty()) return "0";
if(strVal.contains(".")) {
long num = Math.round(Double.parseDouble(strVal));
return String.format("%,d", num);
}
long num = Long.parseLong(strVal);
return String.format("%,d", num);
} catch(Exception e){
return value.toString();