Optimised Company() Setup() Config() and changed method_directory into URL
This commit is contained in:
@@ -46,7 +46,7 @@ class Model_Account extends Model_Auth_UserDefault {
|
||||
}
|
||||
|
||||
public function accnum() {
|
||||
return sprintf('%s-%04s',Config::siteid(TRUE),$this->id);
|
||||
return sprintf('%s-%04s',Company::instance()->site(TRUE),$this->id);
|
||||
}
|
||||
|
||||
public function sortkey($withcompany=FALSE) {
|
||||
@@ -115,10 +115,6 @@ class Model_Account extends Model_Auth_UserDefault {
|
||||
foreach ($this->invoices_due($date) as $io)
|
||||
$result += $io->due();
|
||||
|
||||
// @todo This shouldnt really be required
|
||||
if ($result < 0)
|
||||
throw new Kohana_Exception($result);
|
||||
|
||||
return $format ? Currency::display($result) : $result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user