frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
20.82k stars 7.15k forks source link

Payment Entry: Allocated Amount cannot be greater than outstanding amount #42062

Open Ponyooooo opened 3 months ago

Ponyooooo commented 3 months ago

Information about bug

Payment entry shows pop up message for Allocated Amount cannot be greater than outstanding amount when creating payments for expense claim. Not yet tested if the pop up message also shows up for purchase order and purchase invoice.

image

Module

accounts

Version

ERPNext: v14.70.7 (HEAD) Frappe Framework: v14.77.1 (HEAD)

Installation method

FrappeCloud

Relevant log output / Stack trace / Full Error Message.

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 97, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 48, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1619, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/model/workflow.py", line 131, in apply_workflow
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 310, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 345, in _save
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1061, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 931, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1283, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1265, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 928, in fn
    return method_object(*args, **kwargs)
  File "apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py", line 89, in validate
    self.validate_allocated_amount()
  File "apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py", line 173, in validate_allocated_amount
    frappe.throw(fail_message.format(d.idx))
  File "apps/frappe/frappe/__init__.py", line 548, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 509, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 455, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: Row #1: Allocated Amount cannot be greater than outstanding amount.
Ponyooooo commented 3 months ago

this is a bug from the recent version update. We do not usually experience this one.

quebn commented 3 months ago

Also Experiencing this also on latest version of version-15, message shows up on journal entry as references.

Ponyooooo commented 3 months ago

This is still not resolved

Ponyooooo commented 3 months ago

Any update on this? We cannot process payment entries due to the message :(

Ponyooooo commented 3 months ago

any update on this?

szufisher commented 3 months ago

added precision parameter in flt function solved the problem. image

Ponyooooo commented 2 months ago

how can we add this when using frappecloud? looks like this bug is still not added to the latest version update

Ponyooooo commented 2 months ago

Any update on this?

Ponyooooo commented 2 months ago

@ruthra-kumar how can we fix the bug when using a frappecloud?

ruthra-kumar commented 2 months ago

@Ponyooooo If you are in FrappeCloud, would suggest you to raise a support ticket on this.

Ponyooooo commented 2 months ago

Hi @szufisher how can we integrate your solution using client script or server script since frappecloud does not allow us to edit the backcodes of the erpnext. Our only way is to use client or server script only unless your solution will be included on the next version update. :(

Ramesh-Udhyam commented 2 months ago

It looks like this issue is still not solved. Is this not impacting many people? How come it is not a P0 issue?

Ponyooooo commented 2 months ago

Still no progress on this one

Ponyooooo commented 2 months ago

Any progress? This is not possible to be added on the client script

quebn commented 1 month ago

Found the issue why this Bug happens. in our case it's Because if the Journal Entry has the following Entries shown below: image