Formulas if and datecomp, and how can they update

Formulas if and datecomp, and how can they update

Hello, I'm trying out this formula, but as it turns out there is a syntax error in the first part, can somebody help me? I'm trying to calculate number of days the client has been behind on payment, decreasing from today to the day the invoice expired, 

If(Contains(${SalesOrders.Status de pago},'Pendiente'), ((Datecomp(Now(),${SalesOrders.Fecha vencimiento factura})))/(60*24)

Also, what can I do so this gets updated everyday, as it turns out if I entered the information today when I check it tomorrow the number of days stays the same,

Help :D