From e5e1a0b07da0cc4ea83b866b6ad7d7261a125a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 28 Feb 2019 19:15:50 +0100 Subject: [PATCH] The property $fk_doc was declared of type integer --- htdocs/accountancy/class/bookkeeping.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index bf3594e967d..8f8c9599c8e 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -167,10 +167,10 @@ class BookKeeping extends CommonObject $this->doc_ref = trim($this->doc_ref); } if (isset($this->fk_doc)) { - $this->fk_doc = trim($this->fk_doc); + $this->fk_doc = (int) $this->fk_doc; } if (isset($this->fk_docdet)) { - $this->fk_docdet = trim($this->fk_docdet); + $this->fk_docdet = (int) $this->fk_docdet; } if (isset($this->thirdparty_code)) { $this->thirdparty_code = trim($this->thirdparty_code); @@ -487,10 +487,10 @@ class BookKeeping extends CommonObject $this->doc_ref = trim($this->doc_ref); } if (isset($this->fk_doc)) { - $this->fk_doc = trim($this->fk_doc); + $this->fk_doc = (int) $this->fk_doc; } if (isset($this->fk_docdet)) { - $this->fk_docdet = trim($this->fk_docdet); + $this->fk_docdet = (int) $this->fk_docdet; } if (isset($this->thirdparty_code)) { $this->thirdparty_code = trim($this->thirdparty_code); @@ -1104,10 +1104,10 @@ class BookKeeping extends CommonObject $this->doc_ref = trim($this->doc_ref); } if (isset($this->fk_doc)) { - $this->fk_doc = trim($this->fk_doc); + $this->fk_doc = (int) $this->fk_doc; } if (isset($this->fk_docdet)) { - $this->fk_docdet = trim($this->fk_docdet); + $this->fk_docdet = (int) $this->fk_docdet; } if (isset($this->thirdparty_code)) { $this->thirdparty_code = trim($this->thirdparty_code); @@ -1473,8 +1473,8 @@ class BookKeeping extends CommonObject $this->doc_date = $now; $this->doc_type = ''; $this->doc_ref = ''; - $this->fk_doc = ''; - $this->fk_docdet = ''; + $this->fk_doc = 0; + $this->fk_docdet = 0; $this->thirdparty_code = 'CU001'; $this->subledger_account = '41100001'; $this->subledger_label = 'My customer company';