Thankyou for providing the added detail. Knowing your end goal helps us to offer potential solutions.
We have many other Clinics operating with similar cancellation/DNA policies, but as with any full accounting package, (not just ClinicOffice) it is assumed that an invoice being raised means that money is owed at that point in time. The due date on the invoice would represent the latest that payment is required for that invoice.
Even in software that allows you to automatically schedule invoices in advance, these still technically aren’t being created until the client actually owes the money.
With this being the case, usually any implementation of cancellation/DNA charges would be handled via pre-payment requirements, and then issuing subsequent refunds/partial refunds ONLY if the cancellation meets your accepted requirements. This tends to apply in most cases to save having to chase unpaid invoices.
That being said, if you still wanted a custom script writing that will automatically match an invoice date to the date of a future appointment, then if you could please provide us with a contact email, one of our developers will be in touch regarding a quotation. You can reach us on the email below.