Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currency is not formatted in the edit page, but it is in the index #6042

Closed
msucevan opened this issue Nov 14, 2023 · 1 comment
Closed

Currency is not formatted in the edit page, but it is in the index #6042

msucevan opened this issue Nov 14, 2023 · 1 comment

Comments

@msucevan
Copy link

msucevan commented Nov 14, 2023

  • Laravel Version: 10.31
  • Nova Version: 4.29.5
  • PHP Version: 8.1
  • Database Driver & Version: MySQL 8.0.33 (DBNGIN)
  • Operating System and Version: Herd v1.3.1 (Build: 18)
  • Browser type and version: Chrome 119 on macOS (Sonoma)

Description:

The fields is correctly formatted in the index view, but is not formatted in the detail view. See images below.

In addition: thousand are also not with the apostrophes in the view page.

Index:
image

View:
image

Edit:
image

Detailed steps to reproduce the issue on a fresh Nova installation:

I'm using Nova Currency Field and it is set like this:
Currency::make(__('Price'), 'price') ->step(0.0001) ->context(new CustomContext(4)) ->size('w-1/4') ->rules('nullable', 'numeric', 'min:0', 'max:99999999') ->hideFromIndex(),

  • Price is stored as a decimal(12,4) in the database.
  • locale='de_CH'
  • currency='CHF'
@msucevan msucevan changed the title Currency Currency is not formatted in the edit page Nov 14, 2023
@msucevan msucevan changed the title Currency is not formatted in the edit page Currency is not formatted in the edit page, but it is in the index Nov 14, 2023
@msucevan
Copy link
Author

I found the cause.

An external package is responsible this issue: https://novapackages.com/packages/codenco-dev/nova-grid-system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant