Fix: missing class inclusion and origin object id

This commit is contained in:
Regis Houssin 2012-03-11 12:02:22 +01:00
parent 19d4147fcd
commit 2909a80ae2
2 changed files with 8 additions and 3 deletions

View File

@ -38,8 +38,12 @@ require_once(DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php');
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php');
require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php");
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/projet/class/project.class.php');
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/lib/project.lib.php');
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php');
if ($conf->projet->enabled)
{
require_once(DOL_DOCUMENT_ROOT.'/projet/class/project.class.php');
require_once(DOL_DOCUMENT_ROOT.'/lib/project.lib.php');
}
$langs->load('bills');
//print 'ee'.$langs->trans('BillsCustomer');exit;

View File

@ -280,7 +280,8 @@ class Facture extends CommonObject
if ($this->origin == 'commande')
{
// On recupere les differents contact interne et externe
$order = new Commande($this->db, $this->socid, $this->origin_id);
$order = new Commande($this->db);
$order->id = $this->origin_id;
// On recupere le commercial suivi propale
$this->userid = $order->getIdcontact('internal', 'SALESREPFOLL');