Fix phone contract length display

This commit is contained in:
Deon George 2022-09-29 17:55:50 +10:00
parent 15a3b11d2e
commit 319fa32754

View File

@ -53,16 +53,16 @@
@if ($o->inContract())
<tr>
<th>Contract</th>
<td>{{ $o->contract_term }} months <small>({{ ($x=$o->service_contract_date->addMonths($o->contract_term))->diffForHumans() }})</small></td>
<td>{{ $o->contract_term }} months</td>
</tr>
<tr>
<th>Contract End</th>
<td>{{ $x->format('Y-m-d') }}</td>
<td>{{ $o->service_expire->format('Y-m-d') }} <small>({{ $o->service_expire->diffForHumans() }})</small></td>
</tr>
@endif
<tr>
<th>Cancel Notice</th>
<td>1 month @if($o->inContract())<small>(after {{ $o->service_contract_date->addMonths($o->contract_term-1)->format('Y-m-d') }})</small>@endif</td>
<td>1 month @if($o->inContract())<small>(after {{ $o->service_expire->subMonth()->format('Y-m-d') }})</small>@endif</td>
</tr>
</table>
</div>