Minor fixes to statement, services and internal things

Many misc updates
This commit is contained in:
Deon George
2011-10-14 16:44:12 +11:00
parent 7876a16413
commit 56c11507f4
71 changed files with 2192 additions and 677 deletions

View File

@@ -1,7 +1,7 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides Admin Product functions
* This class provides Admin Product management
*
* @package OSB
* @subpackage Product
@@ -16,16 +16,16 @@ class Controller_Admin_Product extends Controller_TemplateDefault_Admin {
);
/**
* Show a list of services
* Show a list of products
*/
public function action_list() {
Block::add(array(
'title'=>_('Customer Products'),
'body'=>Table::display(
ORM::factory('product')->order_by('prod_plugin_file')->find_all(),
ORM::factory('product')->order_by('active DESC,prod_plugin_file')->find_all(),
25,
array(
'id'=>array('label'=>'ID','url'=>'user/product/view/'),
'id'=>array('label'=>'ID','url'=>'product/view/'),
'name()'=>array('label'=>'Details'),
'active'=>array('label'=>'Active'),
'prod_plugin'=>array('label'=>'Plugin'),
@@ -34,11 +34,13 @@ class Controller_Admin_Product extends Controller_TemplateDefault_Admin {
'price_type'=>array('label'=>'Price Type'),
'price_base'=>array('label'=>'Price Base'),
'taxable'=>array('label'=>'Taxable'),
'services_count()'=>array('label'=>'Services'),
'invoices_count()'=>array('label'=>'Invoices'),
),
array(
'page'=>TRUE,
'type'=>'select',
'form'=>'user/product/view',
'form'=>'product/view',
)),
));
}

View File

@@ -9,6 +9,9 @@
* @author Deon George
* @copyright (c) 2010 Open Source Billing
* @license http://dev.osbill.net/license.html
*
* Column Definitions:
* + price_type: 0=One Time, 1=Recurring, 2=Trial
*/
class Model_Product extends ORMOSB {
// @todo this doesnt have our site_id when getting the translation