Skip to content

Commit

Permalink
412. hotfix for sales
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrakovich committed May 21, 2024
1 parent 136dffc commit cb5f691
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/app/Filament/Resources/Promo/SaleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ public static function form(Form $form): Form
->required(),
Forms\Components\TextInput::make('sale_percentage')
->label('Скидка в процентах')
->numeric()
->formatStateUsing(fn ($state) => $state ? round($state * 100, 4) : null)
->mutateDehydratedStateUsing(fn ($state) => $state ? round($state / 100, 4) : null)
->suffix('%')
->minValue(0.01)
->maxValue(100)
// ->numeric()
// ->formatStateUsing(fn ($state) => $state ? round($state * 100, 4) : null)
// ->mutateDehydratedStateUsing(fn ($state) => $state ? round($state / 100, 4) : null)
// ->suffix('%')
// ->minValue(0.01)
// ->maxValue(100)
->prohibits('sale_fix')
->requiredWithout('sale_fix'),
Forms\Components\TextInput::make('sale_fix')
Expand Down

0 comments on commit cb5f691

Please sign in to comment.