Short answer: the usual recommendation is at least 12 hours after a single no-decompression dive and 18 hours after several dives or multiple days of diving; many divers simply keep the last day dive-free.
Flying too soon after diving raises the risk of decompression sickness because cabin pressure is lower than at sea level.
Guidelines
Divers Alert Network publishes these minimums. Longer is safer.
Plan it
Book your last dives two days before you fly, or dive in the morning and fly the day after next.
FAQ
Does the ferry count as flying?
No, sea travel is fine.
And going up to the Chocolate Hills?
The altitude is low; it is not an issue for most divers.