fix transaction save; calculate transaction action