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

feat: LIFO valuation #29296

Merged
merged 7 commits into from
Feb 8, 2022
Merged

feat: LIFO valuation #29296

merged 7 commits into from
Feb 8, 2022

Conversation

ankush
Copy link
Member

@ankush ankush commented Jan 15, 2022

Similar to FIFO valuation except when consuming last received material is consumed first.

https://www.investopedia.com/articles/02/060502.asp

my first feature in ERPNext

todo:

To test:

  • automated tests added. To check behavior create new item with LIFO valuation and run sales/purchase cycles (A lot of different ways it can be tested)
  • check that FIFO/Moving average still work as expected.

@ankush ankush added this to the v14.0 milestone Jan 15, 2022
@codecov
Copy link

codecov bot commented Jan 15, 2022

Codecov Report

Merging #29296 (e6ac99b) into develop (0b9c066) will increase coverage by 9.60%.
The diff coverage is 93.68%.

❗ Current head e6ac99b differs from pull request most recent head f089d39. Consider uploading reports for the commit f089d39 to get more accurate results

@@             Coverage Diff             @@
##           develop   #29296      +/-   ##
===========================================
+ Coverage    48.82%   58.43%   +9.60%     
===========================================
  Files         1107     1096      -11     
  Lines        69162    68814     -348     
===========================================
+ Hits         33768    40209    +6441     
+ Misses       35394    28605    -6789     
Impacted Files Coverage Δ
...er_invariant_check/stock_ledger_invariant_check.py 43.18% <ø> (+43.18%) ⬆️
erpnext/stock/utils.py 66.26% <85.71%> (+0.49%) ⬆️
erpnext/stock/valuation.py 96.80% <94.36%> (-1.85%) ⬇️
erpnext/stock/stock_ledger.py 85.84% <100.00%> (+2.08%) ⬆️
...rpnext/selling/page/point_of_sale/point_of_sale.py 0.00% <0.00%> (-54.68%) ⬇️
erpnext/utilities/product.py 50.00% <0.00%> (-21.61%) ⬇️
erpnext/setup/doctype/item_group/item_group.py 48.40% <0.00%> (-12.47%) ⬇️
...t/accounts/report/sales_register/sales_register.py 72.72% <0.00%> (-7.88%) ⬇️
...work_order_stock_report/work_order_stock_report.py 94.11% <0.00%> (-5.89%) ⬇️
...pnext/accounts/report/gross_profit/gross_profit.py 81.32% <0.00%> (-4.67%) ⬇️
... and 278 more

@ankush ankush marked this pull request as ready for review January 16, 2022 13:43
erpnext/stock/doctype/item/item.json Outdated Show resolved Hide resolved
erpnext/stock/doctype/stock_settings/stock_settings.json Outdated Show resolved Hide resolved
erpnext/stock/stock_ledger.py Outdated Show resolved Hide resolved
erpnext/stock/valuation.py Show resolved Hide resolved
erpnext/stock/stock_ledger.py Outdated Show resolved Hide resolved
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