* New options for withdraw control
Add a new option "WITHDRAW_STRICT_CHECK_AMOUNT"
Transfer request control is based solely on the supplier invoice amount:
By default, once a request is made, even if its amount is less than the invoice amount, no additional requests can be made until the original request is validated (integrated into a transfer slip).
With this option, the control is applied to the sum of all requests, even if they are not integrated into a SEPA transfer slip.
The control verifies that the total sum of the requests never exceeds the invoice total.
By default, one or more requests exceeding the invoice amount can be entered; this option prevents this behavior.
This behavior is more logical and user-friendly, especially when transfer requests are made by technicians or buyers and the SEPA files are created by the accounting department.
* fix
* Update commoninvoice.class.php
* fichier lang
* Cast remaining amounts to float for precision
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Fix: key is never 'PAYMENT_CUSTOMER_CREATE'
* Fix: Update include path and formatting
- Update include path for versionmod.inc.php
- Apply code formatting
* Qual: Ignore phpstan notice
# Qual: Ignore phpstan notice
- Country code is already FR, but test can be useful in the future, so ignoring the notice.
- Code formatting
* Qual: Try exact match to suppress phpstan notice
# Qual: Try exact match to suppress phpstan notice
* Debug savedemo
* Fix mention
* FIX upload of files with multiple spaces via drag'n'drop flow
Currently there are two ways to upload files to products, orders, etc. via the "old" way and the document tab and the "new" flow via drag'n'drop on the main tab of the object.
Both ways triggering completely different code paths. In the end the new way uses dol_sanitzieFileName to sanitize the name of the file and the old way uses dol_string_nohtmltag (both from functions.lib.php).
One of the main difference between the two mentioned functions is that in the old way multiple spaces behind each other are replaced by a single space. E.g. "A␠␠B␠␠␠C␠␠D" is tranformed to "A␠B␠C␠D".
This is needed to make sure that the files are properly uploaded and can be later also downloaded correctly.
How to reproduce?
Upload a file like "test␠␠test.txt" via the drag'n'drop flow and try to download it from the document tab. This is not working. You can see the file but cannot download it. The same flow via the input field of the document tab is working correctly.
* typo in comment
* FIX Phan warnings (unrelated to feature)
* FIX Phan warnings (unrelated to feature)
* FIX Phan warnings (unrelated to feature)
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* fix: use ob_end_clean() instead of ob_end_flush() in readfileLowMemory() (fixes#37239)
* fix: use robust ob level cleanup loop per hregis review
---------
Co-authored-by: f-hoedl <hoefla14@htl-kaindorf.ac.at>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Clean filenames with double spaces
If a filename contains double spaces, it can get uploaded in Dolibarr exactly as it is.
When listing the file or trying to download it, the dolibarr functions clear double spaces in the filename. In particular the alpha parameter for GETPOST.
This results in files being uploaded (e.g. attachments for invoices) than can get listed but remain inaccessible and even cannot get deleted via UI.
We either need to fix all these places to accept double spaces or we change a single location, when we sanitize filenames.
* removed white space
* Add missing CSRF tokens in bank left menu links
* clean QUAL
* Update eldy.lib.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* FIX#37147 Limit account fetch to active chart of accounts in PDF exports
When multiple chart of accounts have the same account number, the PDF
exports (balance and ledger) could retrieve the wrong account label.
* FIX#37147 Decode HTML entities in balance PDF account group labels
The balance PDF export was displaying HTML entities (like &EACUTE;) instead
of properly decoded characters (like É) in account group labels.