pelmered / filament-money-field

Money field powered by Money PHP
MIT License
40 stars 19 forks source link

Editing bug #12

Closed threeel closed 5 months ago

threeel commented 5 months ago

I think there is a bug while trying to update and view so in my ProductsResource i have this

MoneyInput::make('cost_price')->default(0)
                ->currency('EUR')->locale('el_GR')
                ->required(),
MoneyInput::make('list_price')->default(0)
                ->currency('EUR')->locale('el_GR')
                ->required(),

on my migrations

$table->integer('cost_price');
$table->integer('list_price');

on my listing table i have this

MoneyColumn::make('cost_price')->default(0)
                    ->currency('EUR')->locale('el_GR'),
MoneyColumn::make('list_price')->default(0)
                    ->currency('EUR')->locale('el_GR')

Every time i click edit product the pricehave an appended 2 zeros then i save and i go back to the listing then i edit again and re appends two zeros.

I think it must be a bug

pelmered commented 5 months ago

Could you try if this is fixed in 1.2.0-beta?

threeel commented 5 months ago

@pelmered on 1.2.0 seems to be fixed thank you.

pelmered commented 5 months ago

@threeel 1.2.0 is now released!