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: incorrect posting time fetching incorrect qty #29103

Merged
merged 1 commit into from
Jan 3, 2022

Conversation

rohitwaghchaure
Copy link
Collaborator

The get_stock_balance method fetches incorrect qty if the posting time is set as 00:00:00

Issue

  1. Created Purchase Receipt entry for Item A with Warehouse A and qty as 1 and rate as 100, on the 1st of April 2021 and kept posting time as 00:00:10
  2. Created Stock Reco for the item Item A, warehouse as Warehouse A, qty as 1 and valuation rate as 100 on the 1st of April 2021 and kept posting time as 00:00:00
  3. While submitting the stock reco system throwing an error that "None of the items have any change in quantity or value."
  4. Ideally it should allow because the Stock against the Item A before 1st of April 2021 and posting time as 00:00:00 is None
  5. After debug came to know that if posting time is none then we set the posting time = Current Time
  6. With the current time system fetching the Qty and Rate from the Purchase Receipt

Somehow system ignoring the value 0:00:00
Screenshot 2022-01-03 at 1 53 07 PM

After Fix

To fix the issue added condition that if posting_time is None

@rohitwaghchaure
Copy link
Collaborator Author

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Jan 3, 2022

backport version-13-hotfix

🟠 Waiting for conditions to match

  • merged [:pushpin: backport requirement]

@codecov
Copy link

codecov bot commented Jan 3, 2022

Codecov Report

Merging #29103 (b6d45b2) into develop (b1d8815) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #29103      +/-   ##
===========================================
+ Coverage    55.66%   55.70%   +0.04%     
===========================================
  Files         1129     1131       +2     
  Lines        67471    67550      +79     
===========================================
+ Hits         37555    37629      +74     
- Misses       29916    29921       +5     
Impacted Files Coverage Δ
erpnext/stock/utils.py 65.99% <100.00%> (ø)
...work_order_stock_report/work_order_stock_report.py 50.00% <0.00%> (-50.00%) ⬇️
erpnext/utilities/product.py 14.70% <0.00%> (-35.30%) ⬇️
erpnext/shopping_cart/product_info.py 30.30% <0.00%> (-21.22%) ⬇️
...t/product_bundle_balance/product_bundle_balance.py 79.54% <0.00%> (-15.91%) ⬇️
...t/payroll/doctype/payroll_period/payroll_period.py 64.81% <0.00%> (-5.56%) ⬇️
.../manufacturing/report/bom_explorer/bom_explorer.py 94.44% <0.00%> (-5.56%) ⬇️
erpnext/education/doctype/student/student.py 73.68% <0.00%> (-3.16%) ⬇️
...ion/doctype/course_enrollment/course_enrollment.py 44.00% <0.00%> (-2.00%) ⬇️
...e/shopping_cart_settings/shopping_cart_settings.py 65.38% <0.00%> (-1.93%) ⬇️
... and 41 more

@ankush ankush merged commit f02e6b4 into frappe:develop Jan 3, 2022
mergify bot pushed a commit that referenced this pull request Jan 3, 2022
@mergify
Copy link
Contributor

mergify bot commented Jan 3, 2022

backport version-13-hotfix

✅ Backports have been created

rohitwaghchaure added a commit that referenced this pull request Jan 3, 2022
…-29103

fix: incorrect posting time fetching incorrect qty (backport #29103)
ChillarAnand pushed a commit to ChillarAnand/erpnext that referenced this pull request Jan 3, 2022
@rohitwaghchaure
Copy link
Collaborator Author

@Mergifyio backport version-13-pre-release

@mergify
Copy link
Contributor

mergify bot commented Jan 5, 2022

backport version-13-pre-release

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jan 5, 2022
rohitwaghchaure added a commit that referenced this pull request Jan 5, 2022
…se/pr-29103

fix: incorrect posting time fetching incorrect qty (backport #29103)
conncampbell pushed a commit to conncampbell/erpnext that referenced this pull request Jan 9, 2022
conncampbell pushed a commit to conncampbell/erpnext that referenced this pull request Jan 9, 2022
fproldan pushed a commit to fproldan/erpnext that referenced this pull request Jan 2, 2023
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.

None yet

2 participants