[T2242][FIX] important fix to calculate well date_to_invoice

Merged Javier Vescio requested to merge T2242 into main

Merge request reports