fix(bookkeeping): doc_ref too long (#34628)

This commit is contained in:
atm-irvine 2025-06-25 19:19:16 +02:00 committed by GitHub
parent 42c7868fdb
commit 82abb0e8ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -232,6 +232,7 @@ class BookKeeping extends CommonObject
}
if (isset($this->doc_ref)) {
$this->doc_ref = trim($this->doc_ref);
$this->doc_ref = dol_trunc($this->doc_ref, 300); // We limit to 300 chars to avoid problems with too long ref in DB
}
if (isset($this->fk_doc)) {
$this->fk_doc = (int) $this->fk_doc;