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: Purchase Receipt Provisional Accounting GL Entries #37046

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

s-aga-r
Copy link
Contributor

@s-aga-r s-aga-r commented Sep 12, 2023

Source / Ref: 1081

Problem: GL Entries gets created based on item.amount instead of item.base_amount for non-stock item with Provisional Accounting For Non-Stock Items enabled.

Steps to Replicate:

  • Enable Provisional Accounting For Non Stock Items for the Company.
  • Create a Purchase Receipt for a non-stock item, and select the Supplier having a different Currency than the Company.
  • Check the GL Entries, which will have amount in Base Currency (Company Currency).

image

Before:

image

After:

image

Close: #36965

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Sep 12, 2023
@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Merging #37046 (1c78a5a) into develop (0d5c8f0) will increase coverage by 0.09%.
Report is 32 commits behind head on develop.
The diff coverage is 60.31%.

@@             Coverage Diff             @@
##           develop   #37046      +/-   ##
===========================================
+ Coverage    65.93%   66.03%   +0.09%     
===========================================
  Files          796      796              
  Lines        62756    62761       +5     
===========================================
+ Hits         41381    41442      +61     
+ Misses       21375    21319      -56     
Files Changed Coverage
...t_reconciliation/process_payment_reconciliation.py 0.00%
...stock/doctype/purchase_receipt/purchase_receipt.py ø
...t/accounts/report/general_ledger/general_ledger.py 22.22%
...preciation_schedule/asset_depreciation_schedule.py 50.00%
...ets/doctype/asset_maintenance/asset_maintenance.py 50.00%
...ement_of_accounts/process_statement_of_accounts.py 77.77%
erpnext/assets/doctype/asset/asset.py 81.81%
...tax_withholding_details/tax_withholding_details.py 100.00%
...t/manufacturing/doctype/bom_creator/bom_creator.py 100.00%
...cturing/doctype/production_plan/production_plan.py 100.00%
... and 1 more

@s-aga-r s-aga-r removed the needs-tests This PR needs automated unit-tests. label Sep 12, 2023
@s-aga-r s-aga-r added the backport version-14-hotfix backport to version 14 label Sep 12, 2023
@s-aga-r s-aga-r changed the title fix: Purchase Receipt Non-Stock Item GL Entries fix: Purchase Receipt Provisional Accounting GL Entries Sep 13, 2023
@s-aga-r s-aga-r marked this pull request as ready for review September 13, 2023 05:46
@s-aga-r s-aga-r merged commit b83d880 into frappe:develop Sep 13, 2023
12 of 13 checks passed
s-aga-r added a commit that referenced this pull request Sep 13, 2023
) (#37068)

* fix: Purchase Receipt Provisional Accounting GL Entries

(cherry picked from commit 6bab0ee)

* test: Purchase Receipt Provisional Accounting GL Entries

(cherry picked from commit 1c78a5a)

* fix(test): PR Provisional Accounting

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
frappe-pr-bot pushed a commit that referenced this pull request Sep 20, 2023
# [14.40.0](v14.39.0...v14.40.0) (2023-09-20)

### Bug Fixes

* + btn not appearing for delivery note connection (backport [#36980](#36980)) ([#37070](#37070)) ([c2a0c1e](c2a0c1e))
* accepted warehouse and rejected warehouse can't be same (backport [#36973](#36973)) ([#37071](#37071)) ([b56c9b9](b56c9b9))
* after applying coupon code, field in_words not updated ([#37133](#37133)) ([1cb8c64](1cb8c64))
* Apply dimension filter, irrespective of dimesion columns ([9bc44a3](9bc44a3))
* asset validation misfire on debit notes ([b33db6c](b33db6c))
* company wise deferred accounting fields in item ([#37023](#37023)) ([13aaff3](13aaff3))
* Don't allow merging accounts with different currency ([#37074](#37074)) ([c41cb39](c41cb39))
* don't set from warehouse for purchase material request ([#37132](#37132)) ([e62b783](e62b783))
* Duplicate Serial Nos validation in POS ([#36927](#36927)) ([366325c](366325c))
* fetch logic for repay_from_salary in loan_repayment [v14] ([#37135](#37135)) ([480a0ca](480a0ca))
* ignore user permissions for `Source Warehouse` in MR (backport [#37102](#37102)) ([#37110](#37110)) ([727dcc5](727dcc5))
* incorrect stock ledger entries in DN (backport [#36944](#36944)) ([#37066](#37066)) ([699ad80](699ad80))
* packed item using expired price ([413b40f](413b40f))
* POS opening Issue if Product Bundle is available ([#37138](#37138)) ([af05864](af05864))
* precision issue and column name ([#37073](#37073)) ([f2395a9](f2395a9))
* Purchase Receipt Provisional Accounting GL Entries (backport [#37046](#37046)) ([#37068](#37068)) ([8772e40](8772e40))
* Remove redundant code ([#37001](#37001)) ([3ecdf02](3ecdf02))
* **ux:** move `get_route_options_for_new_doc` to `refresh` ([#37092](#37092)) ([a563fed](a563fed))
* validate duplicate serial no in DN ([fffa13f](fffa13f))

### Features

* provision to create RIV from `Stock Ledger Invariant Check` report (backport [#37115](#37115)) ([#37147](#37147)) ([29ff0ce](29ff0ce))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants