Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix: Logged hours not upto two decimal places#410

Merged
ajinkyaa merged 1 commit intodevelopfrom
fix-logged-hours
May 25, 2022
Merged

Fix: Logged hours not upto two decimal places#410
ajinkyaa merged 1 commit intodevelopfrom
fix-logged-hours

Conversation

@mayankagnihotri7
Copy link
Contributor

@mayankagnihotri7 mayankagnihotri7 commented May 25, 2022

Notion card

https://www.notion.so/saeloun/The-logged-hours-should-be-displayed-upto-2-decimal-points-on-client-details-page-94bc4df7f9204c02905042413b2b775e

Summary

When logged hours had more than two decimal places, it was not being rounded up to two decimal places.

Preview

Screenshot_20220525_115104

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

This was fixed using JavaScript's toFixed() function and supplying it with the digit 2 so that it rounds up the decimals to two decimal places.

Checklist:

  • I have manually tested all workflows
  • I have performed a self-review of my own code
  • I have added automated tests for my code

@github-actions
Copy link

Current Code Coverage Percent of this PR:

83.59 %

Files having coverage below 100%

Impacted Files Coverage
/app/controllers/subscriptions_controller.rb 66.67 %
/app/controllers/invoices_controller.rb 57.14 %
/app/models/invoice.rb 96.3 %
/app/models/client.rb 92.68 %
/app/policies/timezone_policy.rb 66.67 %
/app/policies/subscriptions_policy.rb 66.67 %
/app/policies/client_policy.rb 95.45 %
/app/policies/invoice_policy.rb 94.12 %
/app/controllers/invoices/payments_controller.rb 61.11 %
/app/services/report/filters.rb 87.88 %
/app/services/invoice_payment/checkout.rb 43.48 %
/app/services/invoice_payment/pdf_generation.rb 66.67 %
/app/controllers/internal_api/v1/timezones_controller.rb 37.5 %
/app/controllers/internal_api/v1/clients_controller.rb 94.44 %
/app/controllers/internal_api/v1/invoices_controller.rb 94.87 %
/lib/benchmarking/benchmarker.rb 0.0 %
/lib/countries_info.rb 0.0 %

@ajinkyaa ajinkyaa merged commit 75a8c2b into develop May 25, 2022
@ajinkyaa ajinkyaa deleted the fix-logged-hours branch May 25, 2022 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants