Work on invoice
This commit is contained in:
@@ -37,6 +37,10 @@ abstract class ORM_OSB extends ORM {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto process some data as it comes from the database
|
||||
* @see parent::__get()
|
||||
*/
|
||||
public function __get($column) {
|
||||
if (array_key_exists($column,$this->_table_columns)) {
|
||||
// If the column is a blob, we'll decode it automatically
|
||||
@@ -216,14 +220,17 @@ abstract class ORM_OSB extends ORM {
|
||||
return parent::save($validation);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function help to find records that are active
|
||||
*/
|
||||
public function list_active() {
|
||||
return $this->_where_active()->find_all();
|
||||
}
|
||||
|
||||
public function list_count($active=TRUE) {
|
||||
$a=($active ? $this->_where_active() : $this);
|
||||
$x=($active ? $this->_where_active() : $this);
|
||||
|
||||
return $a->find_all()->count();
|
||||
return $x->find_all()->count();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user