forked from Wavyzz/dolibarr
Fix: Sort on ref for supplier invoice into ged
This commit is contained in:
@@ -774,7 +774,7 @@ class FormFile
|
||||
print '<table width="100%" class="nobordernopadding">';
|
||||
print '<tr class="liste_titre">';
|
||||
$sortref="fullname";
|
||||
if ($modulepart == 'invoice_supplier') $sortref=''; // No sort for supplier invoices as path name is not
|
||||
if ($modulepart == 'invoice_supplier') $sortref='level1name';
|
||||
print_liste_field_titre($langs->trans("Ref"),$url,$sortref,"",$param,'align="left"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Documents2"),$url,"name","",$param,'align="left"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Size"),$url,"size","",$param,'align="right"',$sortfield,$sortorder);
|
||||
|
||||
@@ -135,8 +135,11 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
|
||||
|
||||
if (! $filter || preg_match('/'.$filter.'/i',$file)) // We do not search key $filter into $path, only into $file
|
||||
{
|
||||
preg_match('/([^\/]+)\/[^\/]+$/',$path.'/'.$file,$reg);
|
||||
$level1name=(isset($reg[1])?$reg[1]:'');
|
||||
$file_list[] = array(
|
||||
"name" => $file,
|
||||
"level1name" => $level1name,
|
||||
"fullname" => $path.'/'.$file,
|
||||
"date" => $filedate,
|
||||
"size" => $filesize,
|
||||
@@ -159,8 +162,11 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
|
||||
|
||||
if (! $filter || preg_match('/'.$filter.'/i',$file)) // We do not search key $filter into $path, only into $file
|
||||
{
|
||||
preg_match('/([^\/]+)\/[^\/]+$/',$path.'/'.$file,$reg);
|
||||
$level1name=(isset($reg[1])?$reg[1]:'');
|
||||
$file_list[] = array(
|
||||
"name" => $file,
|
||||
"level1name" => $level1name,
|
||||
"fullname" => $path.'/'.$file,
|
||||
"date" => $filedate,
|
||||
"size" => $filesize,
|
||||
|
||||
Reference in New Issue
Block a user