Sure, you can add a function to check if the due date of an invoice has passed and display a message if it has. Here is an example of how to do this:

function checkOverdue() {
    global $invoices;
    foreach ($invoices as $invoice) {
        $due_date = new DateTime($invoice['due_date']);
        if ($due_date < new DateTime()) {
            echo "Invoice {$invoice['number']} is overdue!\n";
        }
    }
}

You can call this function periodically to check for overdue invoices.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence