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

refactor: button to toggle parent doc cost center preference for rounding adjustment amount #35091

Conversation

ruthra-kumar
Copy link
Member

@ruthra-kumar ruthra-kumar commented Apr 28, 2023

While using Cost Center Allocation(CCA), there are scenarios where user might face below error.
Screenshot 2023-04-28 at 12 15 08 PM copy

This happens when Rounding adjustment gets split to smaller allocation. Say a rounding amount of 0.01 (which is very common) gets split into 95% and 5% cost center allocation and the system is configured for 2 digit floating point precision. In Such cases, after splitting the round off amount, the 5% alllocation becomes zero (0.01 * 0.05 = 0.0005) due to rounding effect. This causes validation error in General Ledger.

Adding a checkbox to toggle auto fetching Parent Document cost center for Rounding off entries. If unchecked, default round off cost center from Company master will be used.
Screenshot 2023-04-28 at 2 39 34 PM

If the default cost center in company master also has such kind of CCA, for some reason, then disabling the CCA is the only option.

@github-actions github-actions bot added accounts needs-tests This PR needs automated unit-tests. labels Apr 28, 2023
@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

Merging #35091 (4ccce93) into develop (04902e1) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #35091      +/-   ##
===========================================
- Coverage    63.69%   63.69%   -0.01%     
===========================================
  Files          813      813              
  Lines        60007    60019      +12     
===========================================
+ Hits         38221    38228       +7     
- Misses       21786    21791       +5     
Impacted Files Coverage Δ
...ounts/doctype/purchase_invoice/purchase_invoice.py 84.11% <ø> (ø)
...xt/accounts/doctype/sales_invoice/sales_invoice.py 82.14% <ø> (ø)
erpnext/accounts/general_ledger.py 94.24% <100.00%> (ø)

... and 15 files with indirect coverage changes

@ruthra-kumar ruthra-kumar marked this pull request as ready for review May 2, 2023 03:52
@ruthra-kumar ruthra-kumar merged commit 1d70183 into frappe:develop May 2, 2023
@ruthra-kumar ruthra-kumar added backport version-14-hotfix backport to version 14 and removed needs-tests This PR needs automated unit-tests. labels May 2, 2023
ruthra-kumar added a commit that referenced this pull request May 2, 2023
…-35091

refactor: button to toggle parent doc cost center preference for rounding adjustment amount (backport #35091)
@ruthra-kumar ruthra-kumar deleted the cost_center_allocation_splits_roundoff branch June 14, 2023 16:03
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant