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: payment entry voucher_type error #35779

Merged
merged 3 commits into from
Jul 10, 2023

Conversation

rtdany10
Copy link
Contributor

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 66, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 47, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1608, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 28, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 305, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 327, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 259, in insert
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1045, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 914, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1264, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1246, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 911, in fn
    return method_object(*args, **kwargs)
  File "apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py", line 81, in validate
    self.validate_allocated_amount()
  File "apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py", line 154, in validate_allocated_amount
    latest_references = get_outstanding_reference_documents(
  File "apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py", line 1377, in get_outstanding_reference_documents
    orders_to_be_billed = get_orders_to_be_billed(
  File "apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py", line 1487, in get_orders_to_be_billed
    if voucher_type:
UnboundLocalError: local variable 'voucher_type' referenced before assignment
request.js:457:14

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Jun 19, 2023
@deepeshgarg007
Copy link
Member

@rtdany10 Can you please resolve the conflicts and updated with latest changes?

@stale
Copy link

stale bot commented Jul 9, 2023

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Jul 9, 2023
@codecov
Copy link

codecov bot commented Jul 10, 2023

Codecov Report

Merging #35779 (9095dae) into develop (49c61e7) will decrease coverage by 0.01%.
The diff coverage is 76.47%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #35779      +/-   ##
===========================================
- Coverage    64.20%   64.20%   -0.01%     
===========================================
  Files          785      785              
  Lines        60692    60694       +2     
===========================================
+ Hits         38966    38967       +1     
- Misses       21726    21727       +1     
Impacted Files Coverage Δ
...xt/accounts/doctype/payment_entry/payment_entry.py 83.31% <76.47%> (-0.06%) ⬇️

@deepeshgarg007 deepeshgarg007 merged commit 361a357 into frappe:develop Jul 10, 2023
13 checks passed
@stale stale bot removed inactive labels Jul 10, 2023
mergify bot pushed a commit that referenced this pull request Jul 10, 2023
* fix: payment entry `voucher_type` error

* chore: linters

(cherry picked from commit 361a357)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/payment_entry.py
mergify bot pushed a commit that referenced this pull request Jul 10, 2023
* fix: payment entry `voucher_type` error

* chore: linters

(cherry picked from commit 361a357)
deepeshgarg007 pushed a commit that referenced this pull request Jul 10, 2023
fix: payment entry `voucher_type` error (#35779)

* fix: payment entry `voucher_type` error

* chore: linters

(cherry picked from commit 361a357)

Co-authored-by: Dany Robert <danyrt@wahni.com>
deepeshgarg007 added a commit that referenced this pull request Jul 11, 2023
* fix: payment entry `voucher_type` error (#35779)

* fix: payment entry `voucher_type` error

* chore: linters

(cherry picked from commit 361a357)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/payment_entry.py

* chore: resolve conflicts

---------

Co-authored-by: Dany Robert <danyrt@wahni.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
frappe-pr-bot pushed a commit that referenced this pull request Jul 11, 2023
# [14.30.0](v14.29.2...v14.30.0) (2023-07-11)

### Bug Fixes

* accepted warehouse and rejected warehouse can't be same ([5d77e3c](5d77e3c))
* also check on_hold ([#35910](#35910)) ([59b3277](59b3277))
* conflicts ([e55a264](e55a264))
* conflicts ([79f9785](79f9785))
* conflicts ([a178e66](a178e66))
* conflicts ([6459c28](6459c28))
* deferred accounting entries on accounts frozen ([#35978](#35978)) ([573183c](573183c))
* Delivery Note return valuation ([296f312](296f312))
* German translations ([#35990](#35990)) ([b7b864e](b7b864e))
* incorrect status in MR created from PP (backport [#36085](#36085)) ([#36086](#36086)) ([6dc7a19](6dc7a19))
* incorrect TCS amount while customer has advance payment ([#35397](#35397)) ([2a4bbf3](2a4bbf3))
* labels and translations ([#35963](#35963)) ([04b1d45](04b1d45))
* Opening balance in presentation currency in Trial Balance report ([#36036](#36036)) ([39e38bf](39e38bf))
* payment entry `voucher_type` error ([#35779](#35779)) ([f3af0b2](f3af0b2))
* **Payment Entry:** compare rounded amount ([#36011](#36011)) ([d80b0aa](d80b0aa))
* possible type error on ERR creation ([0569899](0569899))
* precision causing outstanding issue on partly paid invoices ([#36030](#36030)) ([3e711e8](3e711e8))
* Share ledger showing cancelled docs ([#35993](#35993)) ([5102d0c](5102d0c))
* Validate for missing expense account ([#36078](#36078)) ([f4f886c](f4f886c))
* Vietnamese translation of "Company" ([#35887](#35887)) ([e443e6c](e443e6c))

### Features

* Closing balance for period closing and reporting ([#34257](#34257)) ([ebf3c01](ebf3c01))
frappe-pr-bot pushed a commit that referenced this pull request Jul 11, 2023
## [13.52.4](v13.52.3...v13.52.4) (2023-07-11)

### Bug Fixes

* also check on_hold ([#35910](#35910)) ([5aa02b8](5aa02b8))
* circular dependency during reposting causing timeout error ([ba69be1](ba69be1))
* **Employee Advance:** check if return amount is set before validating ([#36080](#36080)) ([beaf13e](beaf13e))
* error messages while evaluating formulas and handle line boundaries ([#35989](#35989)) ([4af57a7](4af57a7))
* gst_hsn_code is ambiguous on gst reports ([3a00052](3a00052))
* incorrect status in MR created from PP (backport [#36085](#36085)) ([#36087](#36087)) ([e05bb10](e05bb10))
* payment entry `voucher_type` error ([#35779](#35779)) ([9c3ec41](9c3ec41))
* **Payment Entry:** compare rounded amount ([#36011](#36011)) ([b04c190](b04c190))
* precision causing outstanding issue on partly paid invoices ([#36030](#36030)) ([cf3ec93](cf3ec93))
* single column indexes ([#32425](#32425)) ([53f7764](53f7764))

### Reverts

* Revert "perf: improve item wise register reports (backport #35908) (#35912)" ([b992366](b992366)), closes [#35908](#35908) [#35912](#35912)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-13-hotfix 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.

None yet

2 participants