Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
This commit is contained in:
commit
0207f86aa5
@ -3938,6 +3938,9 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$discount = new DiscountAbsolute($db);
|
||||||
|
$result = $discount->fetch(0, $object->id);
|
||||||
|
|
||||||
// Reopen a standard paid invoice
|
// Reopen a standard paid invoice
|
||||||
if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT)
|
if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT)
|
||||||
|| ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id))
|
|| ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id))
|
||||||
|
|||||||
@ -1361,11 +1361,12 @@ function dol_uncompress($inputfile,$outputdir)
|
|||||||
* @param string $regexfilter Regex filter to restrict list. This regex value must be escaped for '/', since this char is used for preg_match function
|
* @param string $regexfilter Regex filter to restrict list. This regex value must be escaped for '/', since this char is used for preg_match function
|
||||||
* @param array $excludefilter Array of Regex for exclude filter (example: array('(\.meta|_preview\.png)$','^\.')). This regex value must be escaped for '/', since this char is used for preg_match function
|
* @param array $excludefilter Array of Regex for exclude filter (example: array('(\.meta|_preview\.png)$','^\.')). This regex value must be escaped for '/', since this char is used for preg_match function
|
||||||
* @param int $nohook Disable all hooks
|
* @param int $nohook Disable all hooks
|
||||||
|
* @param int $mode 0=Return array minimum keys loaded (faster), 1=Force all keys like date and size to be loaded (slower), 2=Force load of date only, 3=Force load of size only
|
||||||
* @return string Full path to most recent file
|
* @return string Full path to most recent file
|
||||||
*/
|
*/
|
||||||
function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('(\.meta|_preview\.png)$','^\.'),$nohook=false)
|
function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('(\.meta|_preview\.png)$','^\.'),$nohook=false,$mode='')
|
||||||
{
|
{
|
||||||
$tmparray=dol_dir_list($dir,'files',0,$regexfilter,$excludefilter,'date',SORT_DESC,'',$nohook);
|
$tmparray=dol_dir_list($dir,'files',0,$regexfilter,$excludefilter,'date',SORT_DESC,$mode,$nohook);
|
||||||
return $tmparray[0];
|
return $tmparray[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -167,9 +167,17 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
$objphoto = new Product($this->db);
|
$objphoto = new Product($this->db);
|
||||||
$objphoto->fetch($object->lines[$i]->fk_product);
|
$objphoto->fetch($object->lines[$i]->fk_product);
|
||||||
|
|
||||||
$pdir = get_exdir($object->lines[$i]->fk_product,2,0,0,$objphoto,'product') . $object->lines[$i]->fk_product ."/photos/";
|
if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO))
|
||||||
$dir = $conf->product->dir_output.'/'.$pdir;
|
{
|
||||||
|
$pdir = get_exdir($object->lines[$i]->fk_product,2,0,0,$objphoto,'product') . $object->lines[$i]->fk_product ."/photos/";
|
||||||
|
$dir = $conf->product->dir_output.'/'.$pdir;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$pdir = get_exdir(0,2,0,0,$objphoto,'product') . dol_sanitizeFileName($objphoto->ref).'/';
|
||||||
|
$dir = $conf->product->dir_output.'/'.$pdir;
|
||||||
|
}
|
||||||
|
|
||||||
$realpath='';
|
$realpath='';
|
||||||
foreach ($objphoto->liste_photos($dir,1) as $key => $obj)
|
foreach ($objphoto->liste_photos($dir,1) as $key => $obj)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user