{
if (!empty($SysPrefs->prefs['ref_no_auto_increase']))
$this->reference = $Refs->get_next($this->trans_type, null, array('date' => Today()));
{
if (!empty($SysPrefs->prefs['ref_no_auto_increase']))
$this->reference = $Refs->get_next($this->trans_type, null, array('date' => Today()));