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')