From 82abb0e8ed804b0d27258027960ef2dffda69ae3 Mon Sep 17 00:00:00 2001 From: atm-irvine <165771178+atm-irvine@users.noreply.github.com> Date: Wed, 25 Jun 2025 19:19:16 +0200 Subject: [PATCH] fix(bookkeeping): doc_ref too long (#34628) --- htdocs/accountancy/class/bookkeeping.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 501b689fd9a..e63334650fd 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -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;