Next/Future invoices for users
This commit is contained in:
@@ -191,9 +191,6 @@ class Service extends Model
|
||||
*/
|
||||
public function type()
|
||||
{
|
||||
if (! $this->model)
|
||||
abort(500,'Missing Model in',['service'=>$this]);
|
||||
|
||||
return $this->morphTo(null,'model','id','service_id');
|
||||
}
|
||||
|
||||
@@ -772,7 +769,7 @@ class Service extends Model
|
||||
$o->date_stop = $this->invoice_next_end;
|
||||
$o->quantity = $this->invoice_next_quantity;
|
||||
|
||||
$o->addTaxes();
|
||||
$o->addTaxes($this->account->country->taxes);
|
||||
$result->push($o);
|
||||
}
|
||||
|
||||
@@ -789,7 +786,7 @@ class Service extends Model
|
||||
$o->date_stop = $this->invoice_next;
|
||||
$o->quantity = 1;
|
||||
|
||||
$o->addTaxes();
|
||||
$o->addTaxes($this->account->country->taxes);
|
||||
$result->push($o);
|
||||
}
|
||||
|
||||
@@ -807,7 +804,7 @@ class Service extends Model
|
||||
$o->module_id = 30; // @todo This shouldnt be hard coded
|
||||
$o->module_ref = $oo->id;
|
||||
|
||||
$o->addTaxes();
|
||||
$o->addTaxes($this->account->country->taxes);
|
||||
$result->push($o);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user