osb/resources/views/theme/backend/adminlte/service/widget/internal.blade.php

88 lines
2.3 KiB
PHP

<!-- $o = Service::class, $p = Product::class -->
<table class="table table-sm">
<thead>
<tr>
<th>&nbsp;</th>
@if (($s=$o->supplied) && $s->exists)
<th>{{ $s->supplier_detail->supplier->name }}</th>
@endif
<th>Us</th>
@if ($s->exists)
<th>&nbsp;</th>
@endif
</tr>
</thead>
<tbody>
<tr>
<th>Product</th>
@if ($s->exists)
<td>#{{ $s->id }}: {{ $s->name }}</td>
@endif
<td>#{{ $p->id }}: {{ $p->name }}</td>
@if ($s->exists)
<td>{{ $p->category_name }}</td>
@endif
</tr>
<tr>
<th>Setup</th>
@if ($s->exists)
<td>${{ number_format($a=\App\Models\Tax::tax_calc($s->setup_cost,$o->account->taxes),2) }}</td>
<td>${{ number_format($b=\App\Models\Tax::tax_calc($p->setup_charge,$o->account->taxes),2) }}</td>
<td>{!! markup($a,$b) !!}</td>
@else
<td>-</td>
@endif
</tr>
<tr>
<th>Billed</th>
@if ($s->exists)
<td>{{ $s->billing_interval_string }}</td>
@endif
<td>{{ $o->billing_interval_string }}</td>
@if ($s->exists)
<td>&nbsp;</td>
@endif
</tr>
<tr>
<th>Billing Price</th>
@if ($s->exists)
<td>${{ number_format($a=\App\Models\Tax::tax_calc($s->base_cost*\App\Models\Invoice::billing_change($s->billing_interval,$p->billing_interval),$o->account->taxes),2) }}</td>
@endif
<td>${{ number_format($b=$o->billing_charge,2) }}</td>
@if ($s->exists)
<td>{!! markup($a,$b) !!}</td>
@endif
</tr>
<tr>
<th>Monthly Price</th>
@if ($s->exists)
<td>${{ number_format($a=\App\Models\Tax::tax_calc($s->base_cost*\App\Models\Invoice::billing_change($s->billing_interval,1),$o->account->taxes),2) }}</td>
@endif
<td @if($x=$o->isChargeOverriden()) class="text-danger" @endif>${{ number_format($b=($x ? $p->base_charge_taxable : $o->billing_monthly_price),2) }}</td>
@if ($s->exists)
<td>{!! markup($a,$b) !!}</td>
@endif
</tr>
<tr>
<th>Contract</th>
@if ($s->exists)
<td>{{ $s->contract_term }} months</td>
@endif
<td>{{ $p->contract_term }} months</td>
@if ($s->exists)
<td>&nbsp;</td>
@endif
</tr>
<tr>
<th>Min Price</th>
@if ($s->exists)
<td>${{ number_format($a=\App\Models\Tax::tax_calc($s->min_cost,$o->account->taxes),2) }}</td>
<td>${{ number_format($b=\App\Models\Tax::tax_calc($p->getMinChargeAttribute($o->billing_interval),$o->account->taxes),2) }}</td>
<td>{!! markup($a,$b) !!}</td>
@else
<td>-</td>
@endif
</tr>
</tbody>
</table>