Fix VOIP services from 500 errors

This commit is contained in:
Deon George 2022-03-05 13:49:50 +11:00
parent 62f587d7e6
commit d7b5d9a272
3 changed files with 39 additions and 4 deletions

View File

@ -68,7 +68,7 @@ final class Voip extends Type implements ProductItem
public function hasUsage(): bool
{
return TRUE;
return FALSE;
}
public function allowance(): Collection
@ -78,7 +78,7 @@ final class Voip extends Type implements ProductItem
public function allowance_string(): string
{
// TODO: Implement allowance_string() method.
return "(TBA)";
}
public function getCostAttribute(): float

View File

@ -0,0 +1,35 @@
<div class="form-group row">
<label for="reference" class="col-sm-3 col-form-label text-right">Service Number</label>
<div class="col-sm-6">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-phone"></i></span>
</div>
<input type="text" class="form-control" name="voip[service_number]" value="{{ $o->service_number ?? '' }}">
</div>
</div>
</div>
<div class="form-group row">
<label for="reference" class="col-sm-3 col-form-label text-right">Service Username</label>
<div class="col-sm-6">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
</div>
<input type="text" class="form-control" name="voip[service_username]" value="{{ $o->service_username ?? '' }}">
</div>
</div>
</div>
<div class="form-group row">
<label for="reference" class="col-sm-3 col-form-label text-right">Service Password</label>
<div class="col-sm-6">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
</div>
<input type="text" class="form-control" name="voip[service_password]" value="{{ $o->service_password ?? '' }}">
</div>
</div>
</div>

View File

@ -45,8 +45,8 @@
<!-- @todo -->
@if($o->service->product->type)
<tr>
<th>Traffic</th>
<td>{{ $o->service->product->type->allowance_string() }} GB @if(FALSE)(YY GB used month)@endif</td>
<th>Usage</th>
<td>{{ $o->service->product->type->allowance_string() }} Included Calls</td>
</tr>
@endif
@if ($o->inContract())