From f7c9f20b16297c41c002a3cb1e915a98a4f83c9b Mon Sep 17 00:00:00 2001 From: Your Name <user@domain.com> Date: Mon, 16 May 2016 17:21:32 +0200 Subject: [PATCH] Fix: Expensereport not compatible with multicompany. --- htdocs/expensereport/class/expensereport.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 7de680d02f3..cc32f08b0ac 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2,6 +2,7 @@ /* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com> * Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -149,6 +150,7 @@ class ExpenseReport extends CommonObject $sql.= ",paid"; $sql.= ",note_public"; $sql.= ",note_private"; + $sql.= ",entity"; $sql.= ") VALUES("; $sql.= "'(PROV)'"; $sql.= ", ".$this->total_ht; @@ -165,6 +167,7 @@ class ExpenseReport extends CommonObject $sql.= ", 0"; $sql.= ", ".($this->note_public?"'".$this->db->escape($this->note_public)."'":"null"); $sql.= ", ".($this->note_private?"'".$this->db->escape($this->note_private)."'":"null"); + $sql.= ", ".$conf->entity; $sql.= ")"; dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); -- GitLab