pstmt.setBigDecimal(10,vo.getTaxableIncomeDOC01());
pstmt.setBigDecimal(11,vo.getTotalVatDOC01());
pstmt.setBigDecimal(12,vo.getTotalDOC01());
int updatedRows = pstmt.executeUpdate();
if (updatedRows==0)
return new VOListResponse("record already updated");
// vo.setTaxableIncomeDOC01(totalTaxableIncome);
// vo.setTotalVatDOC01(totalVat);
// vo.setTotalDOC01(total);
Logger.debug(username,this.getClass().getName(),"updateTaxableIncomes","Updating taxable incomes... total time: "+(System.currentTimeMillis()-time)+" ms");
// return taxable income rows...
ArrayList taxableIncomeRows = new ArrayList();
Enumeration en = itemsTaxableIncomeRows.keys();
while(en.hasMoreElements()) {
taxableIncomeRows.add( itemsTaxableIncomeRows.get(en.nextElement()) );
}
en = actsTaxableIncomeRows.keys();
while(en.hasMoreElements()) {
taxableIncomeRows.add( actsTaxableIncomeRows.get(en.nextElement()) );
}
en = chargesTaxableIncomeRows.keys();
while(en.hasMoreElements()) {
taxableIncomeRows.add( chargesTaxableIncomeRows.get(en.nextElement()) );
}
return new VOListResponse(taxableIncomeRows,false,taxableIncomeRows.size());
}
catch (Throwable ex) {
Logger.error(username,this.getClass().getName(),"updateTaxableIncomes","Error while updating taxable incomes and document totals:\n"+ex.getMessage(), ex);
throw new Exception(ex.getMessage());
}