mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
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 '<table width="100%" class="nobordernopadding">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
$sortref="fullname";
|
$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("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("Documents2"),$url,"name","",$param,'align="left"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Size"),$url,"size","",$param,'align="right"',$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
|
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(
|
$file_list[] = array(
|
||||||
"name" => $file,
|
"name" => $file,
|
||||||
|
"level1name" => $level1name,
|
||||||
"fullname" => $path.'/'.$file,
|
"fullname" => $path.'/'.$file,
|
||||||
"date" => $filedate,
|
"date" => $filedate,
|
||||||
"size" => $filesize,
|
"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
|
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(
|
$file_list[] = array(
|
||||||
"name" => $file,
|
"name" => $file,
|
||||||
|
"level1name" => $level1name,
|
||||||
"fullname" => $path.'/'.$file,
|
"fullname" => $path.'/'.$file,
|
||||||
"date" => $filedate,
|
"date" => $filedate,
|
||||||
"size" => $filesize,
|
"size" => $filesize,
|
||||||
|
|||||||
Reference in New Issue
Block a user