Updated for new lnApp

This commit is contained in:
Deon George
2014-08-25 14:41:07 +10:00
parent 52e94c6e7d
commit c1b1485c10
44 changed files with 208 additions and 481 deletions

View File

@@ -37,6 +37,13 @@ class Model_Product extends ORM_OSB implements Invoicable {
protected $_form = array('id'=>'id','value'=>'description()');
protected $_compress_column = array(
'avail_category',
'group_avail',
'price_group',
'prod_plugin_data',
);
protected $_nullifempty = array(
'price_group',
);
@@ -207,7 +214,7 @@ class Model_Product extends ORM_OSB implements Invoicable {
}
private function translate() {
return $this->translate->where('language_id','=',Config::language())->find();
return $this->translate->where('language_id','=',Company::instance()->language())->find();
}
/**

View File

@@ -106,7 +106,7 @@ class Model_Product_Category extends ORM_OSB {
private function translate() {
return $this->translate->where('language_id','=',Config::language())->find();
return $this->translate->where('language_id','=',Company::instance()->language())->find();
}
}
?>

View File

@@ -18,6 +18,10 @@ class Model_Product_Category_Translate extends ORM_OSB {
'language'=>array('foreign_key'=>'id'),
);
protected $_compress_column = array(
'description',
);
protected $_save_message = TRUE;
}
?>

View File

@@ -21,6 +21,10 @@ class Model_Product_Translate extends ORM_OSB {
'language'=>array('foreign_key'=>'id'),
);
protected $_compress_column = array(
'description_full',
);
protected $_save_message = TRUE;
}
?>