1002807 - Make sure _ID parameter always being passed as Integer instead of BigDecimal. IDEMPIERE-1422

This commit is contained in:
Heng Sin Low 2013-09-30 18:33:25 +08:00
parent 212e94881a
commit 0b12114ec1
1 changed files with 8 additions and 1 deletions

View File

@ -1253,7 +1253,14 @@ public class ReportStarter implements ProcessCall, ClientProcess
if (para != null) {
for (int i = 0; i < para.length; i++) {
if (para[i].getParameter_To() == null) {
params.put(para[i].getParameterName(), para[i].getParameter());
if (para[i].getParameterName().endsWith("_ID") && para[i].getParameter() instanceof BigDecimal)
{
params.put(para[i].getParameterName(), ((BigDecimal)para[i].getParameter()).intValue());
}
else
{
params.put(para[i].getParameterName(), para[i].getParameter());
}
} else {
params.put( para[i].getParameterName()+"1", para[i].getParameter());
params.put( para[i].getParameterName()+"2", para[i].getParameter_To());