2
0
forked from Wavyzz/dolibarr

API to get list of available document is ok for invoice

order, proposal, shipment
This commit is contained in:
Laurent Destailleur
2017-12-22 19:49:31 +01:00
parent f0c8b548f3
commit 57272dc5fe
2 changed files with 69 additions and 5 deletions

View File

@@ -4886,8 +4886,8 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart)
global $conf;
$path = '';
$arrayforoldpath=array('cheque','user','category','holiday','shipment','supplier_invoice','invoice_supplier','mailing','supplier_payment');
$arrayforoldpath=array('cheque','user','category','holiday','supplier_invoice','invoice_supplier','mailing','supplier_payment');
if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) $arrayforoldpath[]='product';
if (! empty($level) && in_array($modulepart, $arrayforoldpath))
{
@@ -4904,7 +4904,7 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart)
// TODO
// We will enhance here a common way of forging path for document storage
// Here, object->id, object->ref and object->modulepart are required.
if (in_array($modulepart, array('thirdparty','contact','member')))
if (in_array($modulepart, array('thirdparty','contact','member','propal','proposal','commande','order','facture','invoice','shipment')))
{
$path=$object->ref?$object->ref:$object->id;
}