hrank8t
Refresh Heading and Subheading
return new HtmlString(
'<div><strong>Age:</strong> ' . $this->record->ageInYears .
'<a href="tel:' . $this->record->mobile .
'"> <strong>Mob:</strong> ' . $this->record->mobile . '</a>' .
$mc
. '</div><div>' .
'<span title="Total Cost">' . '<strong> TC:</strong> ' . Number::currency($this->record->treatment->sum('cost'), 'INR') . '</span>' .
'<span title="Total Paid">' . '<strong> TP:</strong> ' . Number::currency($this->record->payment->sum('amount'), 'INR') . '</span>' .
'<span title="Balance" style="color:#ff6b6b">' . '<strong> B:</strong> ' . Number::currency(($this->record->treatment->sum('cost')
- $this->record->payment->sum('amount')), 'INR') . '</span></div>'
);
This is the code in function getSubHeading() of the View page of a resource. This page also has Many Relation Managers. I want to refresh the Cost, Paid and Balance once the RM table is updated. Any way to do that?2 replies