Skip to content

Commit

Permalink
Merge pull request #3403 from defrance/patch-76
Browse files Browse the repository at this point in the history
NEW add in get_origin function generic origintype
  • Loading branch information
Juanjo Menent committed Aug 28, 2015
2 parents b058d39 + af7302f commit c09b130
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions htdocs/product/stock/class/mouvementstock.class.php
Expand Up @@ -660,9 +660,16 @@ function get_origin($fk_origin, $origintype)
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;
}

Expand Down

0 comments on commit c09b130

Please sign in to comment.