emp calc residual not allocated inserted to db