Removed the need for price_base/price_setup in products table

This commit is contained in:
Deon George
2013-01-11 14:12:04 +11:00
parent 3fa1ca3665
commit a7a60a96d8
5 changed files with 10 additions and 30 deletions

View File

@@ -55,7 +55,6 @@ class Controller_Admin_Product extends Controller_TemplateDefault_Admin {
'prod_plugin_file'=>array('label'=>'Plugin Name'),
'prod_plugin_data'=>array('label'=>'Plugin Data'),
'price_type'=>array('label'=>'Price Type'),
'price_base'=>array('label'=>'Price Base'),
'taxable'=>array('label'=>'Taxable'),
'count_services()'=>array('label'=>'Services'),
'count_invoices()'=>array('label'=>'Invoices'),

View File

@@ -11,6 +11,9 @@
* @license http://dev.leenooks.net/license.html
*/
class Controller_Product extends Controller_TemplateDefault {
/**
* Show a list of product categories
*/
public function action_categorys() {
$output = '<div id="category">';
$output .= '<ul>';
@@ -19,9 +22,7 @@ class Controller_Product extends Controller_TemplateDefault {
$a = '<h3>'.$pco->display('name').'</h3>';
$a .= '<p>'.$pco->description().'</p>';
$output .= '<li>';
$output .= HTML::anchor('product/category/'.$pco->id,$a);
$output .= '</li>';
$output .= '<li>'.HTML::anchor('product/category/'.$pco->id,$a).'</li>';
}
$output .= '</ul>';
@@ -32,6 +33,7 @@ class Controller_Product extends Controller_TemplateDefault {
/**
* Show the available topics in a category
*
* @todo Only show categories according to their validity dates
* @todo Obey sort order
*/
@@ -92,10 +94,10 @@ class Controller_Product extends Controller_TemplateDefault {
}
Block::add(array(
'title'=>$po->product_translate->find()->description_short,
'title'=>$po->description_short(),
'body'=>View::factory($this->viewpath())
->set('record',$po),
));
));
}
}
?>

View File

@@ -26,10 +26,6 @@ class Model_Product extends ORM_OSB {
);
protected $_display_filters = array(
'price_base'=>array(
array('Tax::add',array(':value')),
array('Currency::display',array(':value')),
),
'price_type'=>array(
array('StaticList_PriceType::display',array(':value')),
),