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

Property currency_decimal added to Persistence UI (Money Type) #840

Merged
merged 2 commits into from
Nov 13, 2019

Conversation

stokkeland
Copy link
Contributor

Implementation of currency_decimal property in UI persistence. Simple use:

$app->ui_persistence->currency_decimals = 2; // default

// Typical US large or estimate type amount use:
$app->ui_persistence->currency = '$';
$app->ui_persistence->currency_decimals = 0; // no decimals

// When dealing in fractions of a penny type numbers
$app->ui_persistence->currency_decimals = 4; 
..

Displaying money type (currencies) with custom or zero decimal points. It is very common in business to chop off decimals for larger numbers.

Drag a SCREENSHOT here:
image

@codecov
Copy link

codecov bot commented Nov 13, 2019

Codecov Report

Merging #840 into develop will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop     #840   +/-   ##
==========================================
  Coverage      73.35%   73.35%           
  Complexity      2514     2514           
==========================================
  Files            125      125           
  Lines           5919     5919           
==========================================
  Hits            4342     4342           
  Misses          1577     1577
Impacted Files Coverage Δ Complexity Δ
src/Persistence/UI.php 62.96% <100%> (ø) 43 <0> (ø) ⬇️
src/FormField/Money.php 100% <100%> (ø) 6 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5661df4...d365d8c. Read the comment docs.

@stokkeland stokkeland changed the title Add currency_decimal property added to Money Type Property currency_decimal added to Persistence UI (Money Type) Nov 13, 2019
Copy link
Member

@romaninsh romaninsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good

@romaninsh romaninsh merged commit 43b4618 into atk4:develop Nov 13, 2019
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

Successfully merging this pull request may close these issues.

2 participants