Skip to content

Wrong error message when adding negative qty on invoice #32078

@bos4711

Description

@bos4711

Bug

For an invoice we need to truncate the amount by removing decimals. We add a line with price -0.25 and qty 1, and this works.

However, if we do the opposite (0.25 / -1) we get an error message saying "Fields Unit price and Qty can't be both negative" which is incorrect.

2024-11-23_152137

v19.0.3

Dolibarr Version

19.0, probably all versions

Environment PHP

No response

Environment Database

No response

Steps to reproduce the behavior and expected behavior

No response

Attached files

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugThis is a bug (something does not work as expected)Issue Stale (automatic label)This issue is stale because it has been open 1 year with no activity. Remove this label to keep open

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions