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

@@ -12,6 +12,9 @@
*/
class Model_Service extends ORMOSB {
// Relationships
protected $_has_one = array(
'service_billing'=>array('far_key'=>'account_billing_id','foreign_key'=>'id'),
);
protected $_has_many = array(
'invoice'=>array('through'=>'invoice_item'),
);
@@ -108,14 +111,6 @@ class Model_Service extends ORMOSB {
return $plugin->_admin_update();
}
// @todo To implement
/**
* Calculate the tax for this item
*/
public function tax() {
return $this->price * .1;
}
/** LIST FUNCTIONS **/
public function list_active() {

View File

@@ -0,0 +1,16 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class supports Service Billing.
*
* @package OSB
* @subpackage Product/Service
* @category Models
* @author Deon George
* @copyright (c) 2010 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Model_Service_Billing extends ORMOSB {
protected $_table_name = 'account_billing';
}
?>