* @param rowNumbers row indexes related to the new rows to save
* @param newValueObjects list of new value objects to save
* @return an ErrorResponse value object in case of errors, VOListResponse if the operation is successfully completed
*/
public Response insertRecords(int[] rowNumbers, ArrayList newValueObjects) throws Exception {
ItemDiscountVO vo = null;
Response response = null;
DetailItemVO itemVO = (DetailItemVO)frame.getFormPanel().getVOModel().getValueObject();
for(int i=0;i<newValueObjects.size();i++) {
vo = (ItemDiscountVO)newValueObjects.get(i);
response = validateDiscount(vo);
if (response.isError())
return response;
vo.setCompanyCodeSys01SAL03(itemVO.getCompanyCodeSys01ITM01());
vo.setItemCodeItm01SAL04(itemVO.getItemCodeITM01());
}
response = ClientUtils.getData("insertItemDiscounts",newValueObjects);
return response;
}