Autocalculate date to custom field

Correction of variables