You can't look at or modify a table (acc_det in this case) that is mutating (changing) in a trigger. You will need to rewrite the query so it avoids doing a double select on acc_det.