Recalculate WO total after saving discount_pct

afterSave() calls recalcTotal() so discount_pct changes are applied
to the total immediately on save, then fillForm() refreshes the
displayed total field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-08 07:12:37 +00:00
parent 5610282078
commit b0433b66c7
@@ -28,6 +28,12 @@ class EditWorkOrder extends EditRecord
return \Filament\Resources\Pages\Enums\ContentTabPosition::After; return \Filament\Resources\Pages\Enums\ContentTabPosition::After;
} }
protected function afterSave(): void
{
$this->record->recalcTotal();
$this->fillForm();
}
protected function getHeaderActions(): array protected function getHeaderActions(): array
{ {
return [ return [