Fix upload of doc for purchase orders
This commit is contained in:
parent
8de9d63f7d
commit
134113db64
@ -597,6 +597,16 @@ class Documents extends DolibarrApi
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||||
$object = new FactureFournisseur($this->db);
|
$object = new FactureFournisseur($this->db);
|
||||||
|
} elseif ($modulepart == 'commande' || $modulepart == 'order') {
|
||||||
|
$modulepart = 'commande';
|
||||||
|
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||||
|
$object = new Commande($this->db);
|
||||||
|
} elseif ($modulepart == 'commande_fournisseur' || $modulepart == 'supplier_order') {
|
||||||
|
$modulepart = 'supplier_order';
|
||||||
|
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||||
|
$object = new CommandeFournisseur($this->db);
|
||||||
} elseif ($modulepart == 'project') {
|
} elseif ($modulepart == 'project') {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
$object = new Project($this->db);
|
$object = new Project($this->db);
|
||||||
@ -655,7 +665,7 @@ class Documents extends DolibarrApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Special cases that need to use get_exdir to get real dir of object
|
// Special cases that need to use get_exdir to get real dir of object
|
||||||
// If future, all object should use this to define path of documents.
|
// In future, all object should use this to define path of documents.
|
||||||
if ($modulepart == 'supplier_invoice') {
|
if ($modulepart == 'supplier_invoice') {
|
||||||
$tmpreldir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier');
|
$tmpreldir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user