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

fix: ticket sales value #5686

Merged
merged 4 commits into from
Nov 18, 2020
Merged

fix: ticket sales value #5686

merged 4 commits into from
Nov 18, 2020

Conversation

maze-runnar
Copy link
Contributor

Fixes #5631

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Nov 18, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/4wtxc0x3t
✅ Preview: https://open-event-frontend-git-ticket-sales.eventyay.vercel.app

import { ceil } from 'lodash-es';

export function roundUp(params) {
return ceil(params[0], 2);
Copy link
Member

Choose a reason for hiding this comment

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

Use Math.ceil

@iamareebjamal
Copy link
Member

We already have ember math helpers, use round helper from that

@maze-runnar
Copy link
Contributor Author

maze-runnar commented Nov 18, 2020

using ceil helper. Ceil is looking appropriate than round in the situation.

@iamareebjamal
Copy link
Member

It's not displaying decimals now

@maze-runnar
Copy link
Contributor Author

It's not displaying decimals now

round is not also displaying decimals. For that I have to use custom helper.

@iamareebjamal
Copy link
Member

No, you can pass decimal=2 in the round helper. Check the docs

@codecov
Copy link

codecov bot commented Nov 18, 2020

Codecov Report

Merging #5686 (05ef8a0) into development (bb47e1f) will decrease coverage by 0.29%.
The diff coverage is 5.98%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #5686      +/-   ##
===============================================
- Coverage        23.72%   23.42%   -0.30%     
===============================================
  Files              498      508      +10     
  Lines             5277     5374      +97     
  Branches            47       47              
===============================================
+ Hits              1252     1259       +7     
- Misses            4017     4107      +90     
  Partials             8        8              
Impacted Files Coverage Δ
app/components/account/contact-info-section.js 33.33% <0.00%> (ø)
app/components/account/password-section.js 25.00% <0.00%> (ø)
app/components/forms/admin/content/pages-form.js 0.00% <0.00%> (ø)
...omponents/forms/admin/content/social-links-form.js 0.00% <0.00%> (ø)
.../components/forms/admin/settings/analytics-form.js 0.00% <0.00%> (ø)
app/components/forms/admin/settings/images-form.js 0.00% <0.00%> (ø)
...ponents/forms/admin/settings/microservices-form.js 0.00% <0.00%> (ø)
...nents/forms/admin/settings/payment-gateway-form.js 0.00% <0.00%> (ø)
app/components/forms/admin/settings/system-form.js 0.00% <0.00%> (ø)
...components/forms/events/view/create-access-code.js 0.00% <0.00%> (ø)
... and 34 more

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 f84c50a...05ef8a0. Read the comment docs.

@iamareebjamal
Copy link
Member

I'm seeing only 1 digit after decimal

@maze-runnar
Copy link
Contributor Author

I'm seeing only 1 digit after decimal

if there are more than two or two digits after decimal then it will show two digits after decimal. Otherwise wise original number

@iamareebjamal iamareebjamal merged commit f766fc4 into fossasia:development Nov 18, 2020
@maze-runnar maze-runnar deleted the ticket-sales branch November 18, 2020 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Organizer Ticket Sales Overview: Fix Sales Calculation
2 participants