From 8eb9d435255d9f4e592b739e147c15146d8259d8 Mon Sep 17 00:00:00 2001 From: Vasyka Date: Tue, 8 Sep 2026 12:16:44 +0000 Subject: [PATCH] fix: remove redundant Achitat field when pay_status != partial MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The read-only Achitat (MDL) display is unnecessary — the Total field already shows the amount. Only show the editable Sumă achitată field when partial is selected; rest de achitat remains always visible. Co-Authored-By: Claude Sonnet 4.6 --- app/Filament/Tenant/Resources/WorkOrderResource.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/Filament/Tenant/Resources/WorkOrderResource.php b/app/Filament/Tenant/Resources/WorkOrderResource.php index b572138..6de3fba 100644 --- a/app/Filament/Tenant/Resources/WorkOrderResource.php +++ b/app/Filament/Tenant/Resources/WorkOrderResource.php @@ -184,12 +184,6 @@ class WorkOrderResource extends Resource ->default(fn ($record) => $record ? $record->paidAmount() : 0) ->visible(fn (Get $get) => $get('pay_status') === 'partial') ->helperText(__('Introduceți suma achitată — se înregistrează automat ca plată la salvare')), - Forms\Components\TextInput::make('_achitat') - ->label(__('Achitat (MDL)')) - ->readOnly()->dehydrated(false) - ->default(fn ($record) => $record ? number_format($record->paidAmount(), 2, '.', '') : '0.00') - ->visible(fn (Get $get) => $get('pay_status') !== 'partial') - ->extraAttributes(['style' => 'color:#16a34a;font-weight:600']), Forms\Components\TextInput::make('_rest') ->label(__('Rest de achitat (MDL)')) ->readOnly()->dehydrated(false)