From ee5e3952ac39c3046ded72c988ab8a1fa4efac57 Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Thu, 19 Feb 2026 09:52:29 +0700 Subject: [PATCH] Remove `number_format` state formatting from the total amount input field. --- .../Resources/DelayedGoods/Schemas/DelayedGoodForm.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/Filament/Resources/DelayedGoods/Schemas/DelayedGoodForm.php b/app/Filament/Resources/DelayedGoods/Schemas/DelayedGoodForm.php index c5bee1e..8110745 100644 --- a/app/Filament/Resources/DelayedGoods/Schemas/DelayedGoodForm.php +++ b/app/Filament/Resources/DelayedGoods/Schemas/DelayedGoodForm.php @@ -140,7 +140,6 @@ public static function configure(Schema $schema): Schema $paidAmount = (int) str()->replace('.', '', (string) ($state ?? 0)); $totalAmount = (int) str()->replace('.', '', (string) ($get('total_amount') ?? 0)); - // Update is_paid based on paid_amount (hanya jika tidak dari toggle) if (! $get('is_paid')) { $set('is_paid', $paidAmount >= $totalAmount && $totalAmount > 0); } @@ -154,10 +153,7 @@ public static function configure(Schema $schema): Schema } }) ->currencyMask(thousandSeparator: '.', decimalSeparator: ',', precision: 0) - ->dehydrateStateUsing(fn ($state) => (int) str()->replace('.', '', (string) ($state ?? 0))) - ->formatStateUsing( - fn ($state) => number_format((int) ($state ?? 0), 0, ',', '.') - ), + ->dehydrateStateUsing(fn ($state) => (int) str()->replace('.', '', (string) ($state ?? 0))), TextInput::make('remaining_amount') ->label('Sisa Pembayaran')