@php $hasDeduction = $item->deduction !== null; $amount = -($item->deduction->manual_amount ?: $item->deduction->amount ?? 0); $calculated = -($item->deduction->amount ?? 0); $formattedTooltipAmount = !$invoice->is_currency_hidden ? cMoney($calculated, $invoice->currency, true) : number_format(cMoney($calculated, $invoice->currency, false)->getAmount(), 2); @endphp @if($hasDeduction) {{ cMoney($amount, $invoice->currency, true) }} @if($item->deduction->is_percentage) ({{ $item->deduction->percentage }}%) @endif @if($item->deduction->manual_amount) * @endif @else {{ cMoney(0, $invoice->currency) }} @endif