Merge pull request '아마란스 결재문서 금액 표시 오류 수정 (formatNumber 소수점 처리)' (#191) from V20260210 into main

Reviewed-on: #191
This commit was merged in pull request #191.
This commit is contained in:
2026-03-30 06:55:12 +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();