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: populate payment schedule from payment terms (backport #44082) #44083

Merged

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 11, 2024

Version: 15 and 14

fixes: #44039

Before:
The code checked if is_return was exactly 0 with this condition:

if(doc.payment_terms_template && doc.doctype !== 'Delivery Note' && doc.is_return == 0) {

This would only work if is_return was set to 0. If is_return wasn't available or set to something else, the condition wouldn't trigger, and the payment schedule wouldn't populate.

After:
The code was changed to:

if(doc.payment_terms_template && doc.doctype !== 'Delivery Note' && !doc.is_return) {

This condition checks if is_return is either not set or has a falsy value (like 0, null, or undefined). So, even if is_return is missing in some doctypes, the payment schedule will still auto-populate.

@Nihantra-Patel Nihantra-Patel merged commit 363f151 into version-15-hotfix Nov 11, 2024
6 checks passed
@Nihantra-Patel Nihantra-Patel deleted the mergify/bp/version-15-hotfix/pr-44082 branch November 11, 2024 07:42
frappe-pr-bot pushed a commit that referenced this pull request Nov 13, 2024
# [15.42.0](v15.41.2...v15.42.0) (2024-11-13)

### Bug Fixes

* add default height to POS item card selector (backport [#44071](#44071)) ([#44075](#44075)) ([65ec7c5](65ec7c5))
* add field conversion_factor when include_uom is settled ([#43701](#43701)) ([f387a8f](f387a8f))
* better gls for purchases with tax witholding ([#42743](#42743)) ([705a26a](705a26a))
* bind this object explicitly on callback event function ([3423d3c](3423d3c))
* calculate percentage received and delivered considering over-receipt and over-delivery (backport [#43870](#43870)) ([#44030](#44030)) ([5958d0c](5958d0c))
* Cannot read properties of undefined (reading 'work_order_closed') (backport [#44117](#44117)) ([#44122](#44122)) ([c1983a4](c1983a4))
* consider service item cost in the RM cost of the BOM (backport [#43962](#43962)) ([#44111](#44111)) ([6e83fec](6e83fec))
* Drop Shipping address based on customer shopping address ([8af005c](8af005c))
* duplicate items and outdated item price in POS (backport [#42978](#42978)) ([#44038](#44038)) ([4cde77d](4cde77d))
* exception on register reports when filtered on cost center ([be07421](be07421))
* improved the conditions for determining voucher subtypes ([58ca4a2](58ca4a2))
* incorrect produced qty in Production Plan Summary (backport [#44112](#44112)) ([#44113](#44113)) ([bce7acf](bce7acf))
* item mapping from modal to batch form ([#44090](#44090)) ([9ac54f6](9ac54f6))
* item not set in the batch quick entry form (backport [#44028](#44028)) ([#44031](#44031)) ([6dcd015](6dcd015))
* Negative stock validation against inventory dimension (backport [#43834](#43834)) ([#43846](#43846)) ([b314f38](b314f38))
* NoneType while updating ordered_qty in SO for removed items ([978a007](978a007))
* not able to cancel DN (backport [#44108](#44108)) ([#44109](#44109)) ([290bdde](290bdde))
* not able to reconcile expired batches ([#44012](#44012)) ([4ba07a4](4ba07a4))
* patch ([107d53b](107d53b))
* populate payment schedule from payment terms (backport [#44082](#44082)) ([#44083](#44083)) ([363f151](363f151))
* purchase receipt creation from SCR ([#44095](#44095)) ([e3d7468](e3d7468))
* slow reposting due to SABB update ([3e29ae8](3e29ae8))
* sort by ascending to get the first period closing voucher (backport [#44029](#44029)) ([#44035](#44035)) ([56f25ae](56f25ae))
* task path (backport [#44073](#44073)) ([#44078](#44078)) ([34b5639](34b5639))
* tyeerror while saving pick list ([7d09832](7d09832))
* update payment amount for partial pos return ([61559be](61559be))
* update per_billed value in Purchase Receipt while creating Debit Note ([#43977](#43977)) ([a833dd6](a833dd6))
* when company is created with other company template Chart of Account  the Create Taxe Template failed ([#42755](#42755)) ([e6894b9](e6894b9))

### Features

* Add item group filtering for search results ([2754793](2754793))
* add template taxe for charts of account France - Plan Comptable General avec code ([#42757](#42757)) ([865786e](865786e))
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.

1 participant