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 invoice standalone return GLEs #31209

Merged
merged 2 commits into from
Jun 7, 2022

Conversation

ankush
Copy link
Member

@ankush ankush commented Jun 1, 2022

Ignore the large diff, only one line needs to be reviewed, rest are just tests:

https://github.com/frappe/erpnext/pull/31209/files#diff-f9290e84973862e466a078cc8a15aee932c8e8a2e680b9183e08e70c678744b6R1130

After #24200 the linked condition was never getting triggered due to type mismatch, this PR fixes that condition and adds test for the behaviour.

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Jun 1, 2022
@codecov
Copy link

codecov bot commented Jun 1, 2022

Codecov Report

Merging #31209 (68792b3) into develop (c3f2201) will decrease coverage by 0.35%.
The diff coverage is n/a.

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

@@             Coverage Diff             @@
##           develop   #31209      +/-   ##
===========================================
- Coverage    63.40%   63.04%   -0.36%     
===========================================
  Files          986      986              
  Lines        67440    67368      -72     
===========================================
- Hits         42759    42475     -284     
- Misses       24681    24893     +212     
Impacted Files Coverage Δ
...ounts/doctype/purchase_invoice/purchase_invoice.py 82.48% <ø> (ø)
...tion_detail/employee_benefit_application_detail.py 0.00% <0.00%> (-100.00%) ⬇️
...unts/report/purchase_register/purchase_register.py 34.21% <0.00%> (-37.51%) ⬇️
...enefit_application/employee_benefit_application.py 34.96% <0.00%> (-29.53%) ⬇️
...ext/accounts/report/balance_sheet/balance_sheet.py 36.36% <0.00%> (-21.82%) ⬇️
...t/payroll/doctype/payroll_period/payroll_period.py 64.81% <0.00%> (-18.52%) ⬇️
...e_purchase_register/item_wise_purchase_register.py 57.42% <0.00%> (-16.84%) ⬇️
...saction/incorrect_balance_qty_after_transaction.py 88.37% <0.00%> (-9.31%) ⬇️
...eport/sales_order_analysis/sales_order_analysis.py 73.33% <0.00%> (-6.67%) ⬇️
erpnext/hr/doctype/job_offer/job_offer.py 82.92% <0.00%> (-4.88%) ⬇️
... and 27 more

ankush and others added 2 commits June 7, 2022 11:35
voucher_wise_stock_value contains tuples and the condition was looking
for string, so it's never triggered.

Caused by frappe#24200
@ankush ankush marked this pull request as ready for review June 7, 2022 06:39
@ankush ankush added backport version-13-hotfix and removed needs-tests This PR needs automated unit-tests. labels Jun 7, 2022
@ankush ankush changed the title fix: PI return GLe fix: purchase invoice standalone return GLEs Jun 7, 2022
@ankush ankush removed the request for review from nextchamp-saqib June 7, 2022 07:23
@ankush ankush merged commit 25f9d58 into frappe:develop Jun 7, 2022
@ankush ankush deleted the purch_return_gle branch June 7, 2022 09:05
ankush added a commit that referenced this pull request Jun 7, 2022
* test: create stock test mixin for assertion/utils

(cherry picked from commit 293eb8d)

# Conflicts:
#	erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py
#	erpnext/stock/tests/test_utils.py

* fix: purchase invoice return GLe

voucher_wise_stock_value contains tuples and the condition was looking
for string, so it's never triggered.

Caused by #24200

(cherry picked from commit 7726271)

* chore: conflicts

Co-authored-by: Ankush Menat <me@ankush.dev>
Co-authored-by: Ankush Menat <ankush@frappe.io>
frappe-pr-bot pushed a commit that referenced this pull request Jun 14, 2022
# [13.34.0](v13.33.0...v13.34.0) (2022-06-14)

### Bug Fixes

* (auto-merge) Use `frappe.log_error` instead of `doc.log_error` ([bced6a0](bced6a0))
* `test_work_order_with_non_stock_item` ([b827c3b](b827c3b))
* Add cost center in loan document ([c19dfbe](c19dfbe))
* **asset:** failing test case ([#31277](#31277)) ([8a4c9d1](8a4c9d1))
* Auto Insert Item Price If Missing when discount & blank UOM (backport [#31168](#31168)) ([#31267](#31267)) ([e69bff0](e69bff0))
* Call `calculate_cost` for Draft BOM and typo in argument ([d035aa2](d035aa2))
* Company address filter in quotation ([d375939](d375939))
* DB update child items, remove redundancy, fix perf ([cbc52a2](cbc52a2))
* Depreciate Asset before generating GL Entries on sale ([#30759](#30759)) ([dfbfe40](dfbfe40))
* Get fresh RM rate in `calculate_rm_cost` ([9a513fd](9a513fd))
* **India:** Incorrect taxable in GSTR-3B report ([e5d2c59](e5d2c59))
* **India:** Sales taxes and charges template fetching in quotation ([a1ba847](a1ba847))
* locale Currency and Float setting in update_employee ([391ed9c](391ed9c))
* misaligned columns in print format of AR/AP report ([81e32e2](81e32e2))
* Partially Ordered status for quotation ([37ba550](37ba550))
* purchase invoice standalone return GLEs (backport [#31209](#31209)) ([#31263](#31263)) ([6d99b5a](6d99b5a))
* Reset represents company on disabling internal customer and supplier (backport [#31302](#31302)) ([#31306](#31306)) ([fb9b302](fb9b302))
* Safe cast `row.rate` (in case of faulty exploded items, edge case but oh well) ([6d65e2b](6d65e2b))
* Supplied Qty not updated on Stock Entry cancel ([79b2062](79b2062))
* Trial Balance failing to ignore Finance Book ([00371f4](00371f4))
* typo in sql condition ([894f945](894f945))
* update fr translation (backport [#31232](#31232)) ([#31334](#31334)) ([5d0f271](5d0f271))
* update Period Closing Voucher per Company ([5ebbe81](5ebbe81))
* update ru translate (backport [#31200](#31200)) ([#31304](#31304)) ([77e4755](77e4755))
* Use `frappe.as_unicode` to decode output of redis module list (backport [#31282](#31282)) ([#31283](#31283)) ([633a452](633a452))
* **ux:** hide new version btn on unsaved BOM (backport [#31297](#31297)) ([#31298](#31298)) ([9f6b32a](9f6b32a))
* **UX:** use doc.status for Job Card status ([#31320](#31320)) ([78473b8](78473b8))

### Features

* Add german translations ([a3f2cf3](a3f2cf3))
* Level-wise BOM cost updation ([74d7d81](74d7d81))
* Only update exploded items rate and amount ([a26da58](a26da58))
* Track progress in Log Batch/Job wise ([3b2a8bf](3b2a8bf))

### Performance Improvements

* `get_boms_in_bottom_up_order` ([87c2b3b](87c2b3b))
* `get_next_higher_level_boms` ([767a775](767a775))
* Use cached doc instead of `get_doc` ([faa69c9](faa69c9))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants