From 5b2c2335b00e095814073989c2cfb35c95d53787 Mon Sep 17 00:00:00 2001 From: Christian Humpel Date: Thu, 5 Jan 2023 11:55:37 +0100 Subject: [PATCH] strtolower for keyword 'auto' --- htdocs/bom/class/api_boms.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/bom/class/api_boms.class.php b/htdocs/bom/class/api_boms.class.php index e0e6cfd69dd..e199650be30 100644 --- a/htdocs/bom/class/api_boms.class.php +++ b/htdocs/bom/class/api_boms.class.php @@ -554,7 +554,7 @@ class Boms extends DolibarrApi throw new RestException(400, "Wrong naming scheme '(PROV%)' is only allowed on 'DRAFT' status. For automatic increment use 'auto' on the 'ref' field."); } - if ($this->bom->ref == 'auto') { + if (strtolower($this->bom->ref) == 'auto') { if (empty($this->bom->id) && $this->bom->status == 0) { $this->bom->ref = ''; // 'ref' will auto incremented with '(PROV' + newID + ')' } else {