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: unable to create partial invoice with auto fetch terms enabled #35285

Conversation

ruthra-kumar
Copy link
Member

@ruthra-kumar ruthra-kumar commented May 13, 2023

With 'Automatically Fetch Payment Terms' enabled in Accounts Settings, partial invoice creation from Orders wasn't possible.

Fix: If Auto Fetch is enabled, Partial Invoice will pull the same Payment Terms from Sales/Purchase Order the validation on the terms will be skipped.

@github-actions github-actions bot added accounts needs-tests This PR needs automated unit-tests. labels May 13, 2023
@codecov
Copy link

codecov bot commented May 13, 2023

Codecov Report

Merging #35285 (63357ea) into develop (ecc80a8) will increase coverage by 0.07%.
The diff coverage is 0.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #35285      +/-   ##
===========================================
+ Coverage    63.75%   63.82%   +0.07%     
===========================================
  Files          813      813              
  Lines        60115    60211      +96     
===========================================
+ Hits         38326    38430     +104     
+ Misses       21789    21781       -8     
Impacted Files Coverage Δ
erpnext/controllers/accounts_controller.py 85.28% <0.00%> (+0.04%) ⬆️

... and 20 files with indirect coverage changes

@deepeshgarg007
Copy link
Member

@ruthra-kumar The validation should have been completely avoided in this case. In any case "
Automatically Fetch Payment Terms from Order" is checked in Accounts Setting and the order is linked to the invoice. Just simply fetch payment terms from Order, no validation. Maybe check once why the validation isn't getting ignored, should have been

@ruthra-kumar ruthra-kumar force-pushed the fix_auto_fetch_payment_terms_po_to_partial_pi_issue branch from 2363dbc to 63357ea Compare May 15, 2023 13:00
@ruthra-kumar
Copy link
Member Author

@ruthra-kumar The validation should have been completely avoided in this case. In any case "
Automatically Fetch Payment Terms from Order" is checked in Accounts Setting and the order is linked to the invoice. Just simply fetch payment terms from Order, no validation. Maybe check once why the validation isn't getting ignored, should have been

Addressed

@ruthra-kumar ruthra-kumar marked this pull request as ready for review May 15, 2023 13:01
@deepeshgarg007 deepeshgarg007 added the backport version-14-hotfix backport to version 14 label May 16, 2023
@deepeshgarg007 deepeshgarg007 merged commit 0da6c16 into frappe:develop May 16, 2023
mergify bot pushed a commit that referenced this pull request May 16, 2023
…35285)

fix: fetch so/po terms if auto fetch is enabled
(cherry picked from commit 0da6c16)
deepeshgarg007 pushed a commit that referenced this pull request May 16, 2023
…35285)

fix: unable to create partial invoice with auto fetch terms enabled (#35285)

fix: fetch so/po terms if auto fetch is enabled
(cherry picked from commit 0da6c16)

Co-authored-by: ruthra kumar <[email protected]>
frappe-pr-bot pushed a commit that referenced this pull request May 16, 2023
## [14.24.2](v14.24.1...v14.24.2) (2023-05-16)

### Bug Fixes

* add missing options for `Content Align` ([3697e8f](3697e8f))
* allow over-payment against SO ([#35079](#35079)) ([fe9e0c2](fe9e0c2))
* bad strings format for command get-untraslated  ([#34361](#34361)) ([5a54296](5a54296))
* bad strings format for update-translations ([#34592](#34592)) ([e3c1d73](e3c1d73))
* bom item filter issue ([098603d](098603d))
* cancelled vouchers in tax withheld vouchers list ([#35309](#35309)) ([c41e1d7](c41e1d7))
* enqueue submit/cancel action for stock entry to avoid time out error ([457846e](457846e))
* force to do reposting for cancelled document ([6f96e5d](6f96e5d))
* function `batch_no` should only be declared once ([#35115](#35115)) ([26928b3](26928b3))
* incorrect packing items ([ab56470](ab56470))
* inventory dimension for inter company transfer return use case ([6d121b8](6d121b8))
* inventory dimension for material transfer not working ([1d8050d](1d8050d))
* item list view not working ([d9efa66](d9efa66))
* port option for additional_conditions in item wise sales register ([#35187](#35187)) ([42037f9](42037f9))
* recalculate costs in SCR while reposting ([9a8ee62](9a8ee62))
* sales person allocated amount calculation error nonetype and float ([#35293](#35293)) ([3a7c69f](3a7c69f))
* test case ([3f8928b](3f8928b))
* test case ([9b2b467](9b2b467))
* typo ([2772a91](2772a91))
* unable to create partial invoice with auto fetch terms enabled ([#35285](#35285)) ([fa9fa97](fa9fa97))
* update workstation hour rate when workstation change in job card ([bc88415](bc88415))
* **UX:** misc "home" onboarding improvements (backport [#35319](#35319)) ([#35321](#35321)) ([f8c58b6](f8c58b6))
* validate for active sla ([#32132](#32132)) ([38e27a6](38e27a6))

### Performance Improvements

* cache and simplify queries for holiday list (backport [#35315](#35315)) ([#35318](#35318)) ([0e78403](0e78403))
@ruthra-kumar ruthra-kumar deleted the fix_auto_fetch_payment_terms_po_to_partial_pi_issue branch June 14, 2023 16:02
bosue added a commit to bosue/erpnext that referenced this pull request Nov 11, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accounts backport version-14-hotfix backport to version 14 needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accounts Settings: Automatically fetch payment terms from Order --> Raises Error
2 participants