2
0
forked from Wavyzz/dolibarr

Fix issue with Multicompany

Before : can't find photo

Now : ok
This commit is contained in:
Pierre Ardoin
2020-02-17 19:18:22 +01:00
committed by GitHub
parent f1bbe1c64d
commit 29cfd6d857

View File

@@ -3,6 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
*
* 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
@@ -84,7 +85,7 @@ class box_propales extends ModeleBoxes
if ($user->rights->propale->lire)
{
$sql = "SELECT s.nom as name, s.rowid as socid, s.code_client, s.logo,";
$sql = "SELECT s.nom as name, s.rowid as socid, s.code_client, s.logo, s.entity,";
$sql.= " p.rowid, p.ref, p.fk_statut, p.datep as dp, p.datec, p.fin_validite, p.date_cloture, p.total_ht, p.tva as total_tva, p.total as total_ttc, p.tms";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
@@ -121,6 +122,7 @@ class box_propales extends ModeleBoxes
$societestatic->name = $objp->name;
$societestatic->code_client = $objp->code_client;
$societestatic->logo = $objp->logo;
$societestatic->entity = $objp->entity;
$late = '';
if ($objp->fk_statut == 1 && $dateterm < ($now - $conf->propal->cloture->warning_delay)) {