Skip to content

Enhance payment form submission by disabling empty fields#37915

Open
AW-95 wants to merge 16 commits intoDolibarr:developfrom
CONCORDE-De-Conseil:develop
Open

Enhance payment form submission by disabling empty fields#37915
AW-95 wants to merge 16 commits intoDolibarr:developfrom
CONCORDE-De-Conseil:develop

Conversation

@AW-95
Copy link
Copy Markdown

@AW-95 AW-95 commented Apr 17, 2026

FIX|Fix submission of empty payment amounts in payment form

When submitting the payment form, all input fields (including empty invoice amounts) are sent to the server.
This can lead to unnecessary or incorrect processing of empty values, especially in cases with multiple invoices or multicurrency fields.

This patch ensures that:

  • "remain" and "multicurrency_remain" fields are always disabled before submission
  • "amount" and "multicurrency_amount" fields are disabled if they are empty

As a result, only relevant (non-empty) invoice payment amounts are submitted.

Technical details

A jQuery handler is added on form submission to disable unnecessary inputs:

  • Prevents empty values from being posted
  • Reduces payload size
  • Avoids potential backend inconsistencies

Before

All fields were submitted, including empty ones.

After

Only non-empty amount fields are submitted.

@eldy eldy added the PR not sync and branch locked PR not sync with branch. Can't sync because branch seems forbidden to external contributions label Apr 23, 2026
@ALIT95
Copy link
Copy Markdown

ALIT95 commented Apr 27, 2026

@eldy done please check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR not sync and branch locked PR not sync with branch. Can't sync because branch seems forbidden to external contributions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants