sale_validity: backport 8.0 tests to 7.0

fixed a bug in the date_order_change function on the way
(in v7 date_order is a datetime, not a date)