Depends on your PS version, but I've just tried this on PS 1.7.80 and it works with by creating an override for the Address class.
<?php class Address extends AddressCore { public function __construct($id_address = null, $id_lang = null){ parent::__construct($id_address, $id_lang); if($this->vat_number && ($this->vat_number != strtoupper($this->vat_number))){ $this->vat_number = strtoupper($this->vat_number); $this->update(); } } }
I threw in the update() in case your module works by retrieving the vat_number column through the database rather than by using the Address class.