Add cost/price/supplierid to service, update service report to show supplerid and overridden costs (if any)

This commit is contained in:
2025-05-16 20:36:27 +10:00
parent 8d72c1ceb5
commit b33c052995
8 changed files with 78 additions and 43 deletions

View File

@@ -1,7 +1,7 @@
<!-- $o=Service::class,$p=Product::class -->
@use(App\Models\Invoice)
@use(Carbon\CarbonInterface)
@use(App\Models\Invoice)
@php($c=$o->product)
@@ -68,7 +68,7 @@
<tr>
<th>Billing Price</th>
<td @if($o->isChargeOverridden())class="text-danger"@endif>${{ number_format($b=$o->billing_charge,2) }}</td>
<td>${{ number_format($a=$o->account->taxed($c->base_cost),2) }}</td>
<td @if($o->isCostOverridden())class="text-danger"@endif>${{ number_format($a=$o->billing_cost,2) }}</td>
<td>{!! markup($a,$b) !!}</td>
@if($p->exists)
<td @if($o->isChargeOverridden())class="text-danger"@endif>${{ number_format($b=$o->account->taxed($p->base_charge),2) }}</td>
@@ -90,7 +90,7 @@
@if($x)
<abbr title="${{ number_format($a=$o->account->taxed($c->base_cost)*Invoice::billing_change($o->billing_interval,Invoice::BILL_MONTHLY),2) }}">${{ number_format($b=$o->billing_cost_normalised,2) }}
@else
${{ number_format($o->billing_cost_normalised,2) }}
${{ number_format($a=$o->billing_cost_normalised,2) }}
@endif
</td>
<td>{!! markup($a,$b) !!}</td>