New: List of documents fo customer invoices if ecm module
This commit is contained in:
parent
53966de3ab
commit
c3a95f3161
@ -610,6 +610,11 @@ class FormFile
|
||||
print_liste_field_titre('','','');
|
||||
print '</tr>';
|
||||
|
||||
if ($modulepart == 'invoice')
|
||||
{
|
||||
include_once(DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php');
|
||||
$object_static=new Facture($this->db);
|
||||
}
|
||||
if ($modulepart == 'invoice_supplier')
|
||||
{
|
||||
include_once(DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php');
|
||||
@ -633,6 +638,14 @@ class FormFile
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>';
|
||||
$id='';$ref='';
|
||||
if ($modulepart == 'invoice')
|
||||
{
|
||||
preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg);
|
||||
$ref=$reg[1];
|
||||
$object_static->fetch('',$ref);
|
||||
//print $relativefile.'rr'.$id;
|
||||
print $object_static->getNomUrl(1,'document');
|
||||
}
|
||||
if ($modulepart == 'invoice_supplier')
|
||||
{
|
||||
preg_match('/(\d+)\/[^\/]+$/',$relativefile,$reg);
|
||||
|
||||
@ -423,7 +423,7 @@ else
|
||||
}
|
||||
//}
|
||||
// Show button to refresh listing
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=refreshmanual'.($section?'&section='.$section:'').'" title="'.dol_escape_htmltag($langs->trans('Refresh')).'">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=refreshmanual'.($module?'&module='.$module:'').($section?'&section='.$section:'').'" title="'.dol_escape_htmltag($langs->trans('Refresh')).'">';
|
||||
print '<img width="32" height="32" border="0" src="'.DOL_URL_ROOT.'/theme/common/view-refresh.png">';
|
||||
print '</a>';
|
||||
|
||||
@ -812,7 +812,17 @@ if ($module == 'invoice_supplier') // Auto area for suppliers invoices
|
||||
{
|
||||
$relativepath='facture';
|
||||
$upload_dir = $conf->fournisseur->dir_output.'/'.$relativepath;
|
||||
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^\.','\.meta$','^temp$','^CVS$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
|
||||
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^CVS$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
|
||||
|
||||
$param='&module='.$module;
|
||||
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection")));
|
||||
|
||||
$formfile->list_of_autoecmfiles($upload_dir,$filearray,$module,$param,1,'',$user->rights->ecm->upload,1,$textifempty,40);
|
||||
}
|
||||
else if ($module == 'invoice') // Auto area for suppliers invoices
|
||||
{
|
||||
$upload_dir = $conf->facture->dir_output;
|
||||
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^payments$','^CVS$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
|
||||
|
||||
$param='&module='.$module;
|
||||
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection")));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user