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: per_billed for return DN #30868

Merged
merged 3 commits into from
May 11, 2022

Conversation

s-aga-r
Copy link
Contributor

@s-aga-r s-aga-r commented May 2, 2022

Source/Reference: ISS-21-22-10746

Issue(s): Delivery Note

Steps to replicate

Create = Save + Submit

  1. Create Sales Order
  2. Create Sales Invoice (1) from Sales Order
  3. Create Delivery Note (1) from Sales Invoice (1)
  4. Create Sales Return [Delivery Note (2)] from Delivery Note (1)
  5. Create Credit Note [Sales Invoice (2)] from Delivery Note (2)
  6. Again create Sales Return [Delivery Note (3)] for the same item from Delivery Note (1)
  7. Create Credit Note [Sales Invoice (3)] from Delivery Note (3)
Problem and Proposed Solution

Problem:

  1. per_billed not set correctly for 2^nd..n^th return DN. Since returned_qty is set while mapping the doc.

Proposed Solution:

  1. Make field returned_qty read-only and no-copy in Delivery Note Item.
Images/GIF

Before:
https://user-images.githubusercontent.com/63660334/166216659-52924f8a-74ca-4bb0-bcde-1816ebfec6cc.mov

After:
https://user-images.githubusercontent.com/63660334/166216692-04768235-bd45-44c8-a678-f72c41c64099.mov

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label May 2, 2022
@s-aga-r s-aga-r force-pushed the delivery-note/issues/per-billed branch from ce5ac7f to 7e43725 Compare May 2, 2022 23:04
@s-aga-r s-aga-r force-pushed the delivery-note/issues/per-billed branch from 7e43725 to 6c27f9d Compare May 3, 2022 00:29
@s-aga-r s-aga-r removed the needs-tests This PR needs automated unit-tests. label May 3, 2022
@ankush ankush self-assigned this May 4, 2022
erpnext/patches.txt Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented May 10, 2022

Codecov Report

Merging #30868 (f48e3b8) into develop (d258413) will increase coverage by 0.24%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #30868      +/-   ##
===========================================
+ Coverage    62.74%   62.98%   +0.24%     
===========================================
  Files          983      983              
  Lines        67103    67106       +3     
===========================================
+ Hits         42102    42266     +164     
+ Misses       25001    24840     -161     
Impacted Files Coverage Δ
...item_wise_sales_history/item_wise_sales_history.py 32.35% <ø> (ø)
...elling/report/quotation_trends/quotation_trends.py 0.00% <ø> (ø)
...ng/report/sales_order_trends/sales_order_trends.py 0.00% <ø> (ø)
.../selling/report/sales_analytics/sales_analytics.py 67.61% <100.00%> (+0.46%) ⬆️
...rial_no_valuation/incorrect_serial_no_valuation.py 85.96% <0.00%> (-10.53%) ⬇️
...pnext/stock/doctype/delivery_note/delivery_note.py 66.21% <0.00%> (-2.71%) ⬇️
erpnext/crm/doctype/prospect/prospect.py 55.22% <0.00%> (-1.50%) ⬇️
erpnext/support/doctype/issue/issue.py 64.25% <0.00%> (-0.97%) ⬇️
erpnext/stock/report/stock_ledger/stock_ledger.py 84.92% <0.00%> (-0.80%) ⬇️
erpnext/stock/doctype/batch/batch.py 82.80% <0.00%> (-0.64%) ⬇️
... and 22 more

@s-aga-r s-aga-r requested a review from ankush May 11, 2022 05:57
Copy link
Member

@ankush ankush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@ankush ankush merged commit 1a70701 into frappe:develop May 11, 2022
mergify bot pushed a commit that referenced this pull request May 11, 2022
* fix: per_billed for return DN

* chore: move patch from v14 to v13

(cherry picked from commit 1a70701)

# Conflicts:
#	erpnext/patches.txt
mergify bot added a commit that referenced this pull request May 11, 2022
This is a semi-automatic backport of pull request #30868 done by [Mergify](https://mergify.com).
frappe-pr-bot pushed a commit that referenced this pull request May 17, 2022
# [13.30.0](v13.29.2...v13.30.0) (2022-05-17)

### Bug Fixes

* `set_missing_values` in SE and re-use the same on all SE mappings ([fe52c1f](fe52c1f))
* Add validation for SEZ and Export invoices without payment of taxes ([cb8453d](cb8453d))
* allow to use formatting for the field to_discuss in opportunity ([e126d4e](e126d4e))
* Block 0 Qty via Update Items to be consistent with form validation ([5647875](5647875))
* Calculate totals even though pricing rule is not applied on mapped doc ([678a01d](678a01d))
* **charts:** Pass fieldtype for chart data in selling reports ([917e7c3](917e7c3))
* conflicts ([87fd933](87fd933))
* conflicts ([fb62bbf](fb62bbf))
* disable pricing rules for internal transfers (backport [#31034](#31034)) ([#31036](#31036)) ([d5eb9fb](d5eb9fb))
* discount ledger entry in case of multicurrency invoice ([#31047](#31047)) ([c3417e4](c3417e4))
* dont fail repost for recoverable errors (backport [#30979](#30979)) ([#31023](#31023)) ([a019cb6](a019cb6))
* **Employee Advance:** Return/Deduction from Salary button visibility (backport [#31011](#31011)) ([#31012](#31012)) ([5b1d85e](5b1d85e))
* Failing accounting dimension patch ([b14a7b8](b14a7b8))
* german translations for Employee ([b9bda04](b9bda04))
* gl entry validation for miniscule loan penalty ([e958ef2](e958ef2))
* hide template items from sales/purchase order ([8b99f43](8b99f43))
* IN time not captured in Attendance through Employee Checkin (backport [#31029](#31029)) ([#31031](#31031)) ([477bbcc](477bbcc))
* Item rate reset on changing posting date ([#30990](#30990)) ([8ef649f](8ef649f))
* Just add one rate in GST HSN Code ([ed76687](ed76687))
* Merge Conflicts ([3abf264](3abf264))
* Multiple fixes in GSTR-1 report ([f2cbb70](f2cbb70))
* **patch:** avoid checking for return field if it doesnt exits (backport [#30995](#30995)) ([#30997](#30997)) ([a94b5c0](a94b5c0))
* per_billed for return DN (backport [#30868](#30868)) ([#30971](#30971)) ([97ea1f5](97ea1f5))
* precision loss when transferring  (backport [#30834](#30834)) ([#31032](#31032)) ([fc80a50](fc80a50))
* precision of total penalty paid ([ad21853](ad21853))
* precision of total penalty paid ([5c45737](5c45737))
* prevent bypassing forced valuation rate (backport [#30987](#30987)) ([#31020](#31020)) ([706c19d](706c19d))
* pro rata calculation for monthly depreciation ([#30989](#30989)) ([408d952](408d952))
* remove item attribute limit from variant selector (backport [#31026](#31026)) ([#31028](#31028)) ([1f016e9](1f016e9))
* Set actual qty and basic rate in SE on warehouse triggers (`get_warehouse_details`) ([30b0aee](30b0aee))
* stock analytics report shows incorrect data there's no stock movement in a period (backport [#30945](#30945)) ([#30980](#30980)) ([295ffb3](295ffb3))
* translation for status filter ([e5f8231](e5f8231))
* **translations:** Update ru translations ([#30992](#30992)) ([f797005](f797005))
* TypeError in add_indicator_for_multicompany (backport [#31042](#31042)) ([#31048](#31048)) ([e24bb1d](e24bb1d))
* unlink Attendance from Employee Checkins on cancellation (backport [#31045](#31045)) ([#31049](#31049)) ([e03fe97](e03fe97))
* UOM in HSN-wise summary of outward supply ([cd7d5cd](cd7d5cd))
* user can select disabled accounts in taxes table ([047c879](047c879))
* validate disabled accounts before posting ledger entries ([515e49b](515e49b))
* validate on hold purchase invoices in payment entry ([9fbd170](9fbd170))

### Features

* add Employee Status filter in leave balance reports ([716b525](716b525))
* add Link to Opportunity ([#30614](#30614)) ([bc23bc7](bc23bc7))
* request_for_quotation ([db4e264](db4e264))
* request_for_quotation - refactor ([b6a3e69](b6a3e69))
* select multiple values for accounting dimension (backport [#31015](#31015)) ([#31041](#31041)) ([9c21eb5](9c21eb5))
@s-aga-r s-aga-r deleted the delivery-note/issues/per-billed branch April 15, 2023 10:01
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 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.

2 participants