40 lines
989 B
PHP
40 lines
989 B
PHP
<?php defined('SYSPATH') or die('No direct access allowed.');
|
|
|
|
/**
|
|
* This class supports OSB exporting.
|
|
*
|
|
* @package Export
|
|
* @category Models
|
|
* @author Deon George
|
|
* @copyright (c) 2009-2013 Open Source Billing
|
|
* @license http://dev.osbill.net/license.html
|
|
*/
|
|
class Model_Export_DataMap extends ORM {
|
|
// Relationships
|
|
protected $_belongs_to = array(
|
|
'export_module' => array(),
|
|
'module' => array(),
|
|
);
|
|
|
|
protected $_compress_column = array(
|
|
'map_data',
|
|
);
|
|
|
|
public function list_itemsnoexport(Model $o,$emoid,$desc='name(Site::language())') {
|
|
$result = array();
|
|
|
|
$o->select(array($this->table_name().'.id','edm'))
|
|
->join($this->table_name(),'LEFT OUTER')
|
|
->on($this->table_name().'.item_id','=',$o->table_name().'.id')
|
|
->on('export_module_id','=',$emoid)
|
|
->where($o->table_name().'.status','=',TRUE)
|
|
->having('edm','=',NULL);
|
|
|
|
foreach ($o->find_all() as $object)
|
|
$result[$object->id] = $object->resolve($desc);
|
|
|
|
return $result;
|
|
}
|
|
}
|
|
?>
|