Hi,
I have the following extension
class GST extends Extension {
private static $casting = array(
'GST' => 'Currency'
);
public function GST(){
parent::__construct();
$config = SiteConfig::current_site_config();
$base_charge = $this->owner->Total;
return $base_charge * ($config->GST/100);
}
}
with the following in the app.yml
Order:
extensions:
- GST
The function works as desired, however it is generating a
[Notice] Trying to get property of non-object
Which while not a major problem outside of a dev environment, I am wondering how to stop it coming up. I get the feeling I am missing something very basic here.