Merge pull request #3403 from defrance/patch-76

NEW add in get_origin function generic origintype
This commit is contained in:
Juanjo Menent 2015-08-28 16:28:59 +02:00
commit c09b130644

View File

@ -660,9 +660,16 @@ class MouvementStock extends CommonObject
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
$origin = new FactureFournisseur($this->db);
break;
default:
return '';
if ($origintype)
{
dol_include_once ('/'.$origintype.'/class/'.$origintype.'.class.php');
$classname = ucfirst($origintype);
$origin = new $classname($this->db);
}
else
return '';
break;
}