Site/Module setup work and auto_format fixes
This commit is contained in:
@@ -147,14 +147,13 @@ class Model_Service extends ORMOSB {
|
||||
|
||||
/**
|
||||
* List services that need to be billed.
|
||||
*
|
||||
* @param $days int Additional number of days to add to the query, above the module config.
|
||||
*/
|
||||
public function list_invoicesoon() {
|
||||
// @todo This needs to be configurable
|
||||
$days = 35;
|
||||
|
||||
public function list_invoicesoon($days=0) {
|
||||
return $this->_list_active()
|
||||
->where_open()->where('suspend_billing','IS',NULL)->or_where('suspend_billing','=','0')->where_close()
|
||||
->where('date_next_invoice','<',time()+$days*86400)
|
||||
->where('date_next_invoice','<',time()+(ORM::factory('invoice')->config('GEN_DAYS')+$days)*86400)
|
||||
->find_all();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user