How to create a new batch job to check all open sales invoices and its due dates for all the customers? And then, update a field according to it.

How to create a new batch job to check all open sales invoices and its due dates for all the customers? And then, update a field according to it.
you could create a filtered sales invoice list with filter: due date: > t
t for today
for updating a field you need a custom codeunit or report, which is then run with a job queue entry.