dolibarr  13.0.2
expensereport_addfile.tpl.php
1 <?php
2 // Add line to upload new file
3 print '<!-- expensereport_addfile.tpl.php -->'."\n";
4 print '<tr class="truploadnewfilenow'.(empty($tredited) ? ' oddeven nohover' : ' '.$tredited).'"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' style="display: none"' : '').'>';
5 print '<td colspan="'.$colspan.'">';
6 
7 $modulepart = 'expensereport';
8 $permission = $user->rights->expensereport->creer;
9 
10 // We define var to enable the feature to add prefix of uploaded files
11 $savingdocmask = '';
12 if (empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_PREFIX))
13 {
14  //var_dump($modulepart);
15  if (in_array($modulepart, array('facture_fournisseur', 'commande_fournisseur', 'facture', 'commande', 'propal', 'supplier_proposal', 'ficheinter', 'contract', 'expedition', 'project', 'project_task', 'expensereport', 'tax', 'produit', 'product_batch')))
16  {
17  $savingdocmask = dol_sanitizeFileName($object->ref).'-__file__';
18  }
19 }
20 
21 // Show upload form (document and links)
22 $formfile->form_attach_new_file(
23  $_SERVER["PHP_SELF"].'?id='.$object->id,
24  'none',
25  0,
26  0,
27  $permission,
28  $conf->browser->layout == 'phone' ? 40 : 60,
29  $object,
30  '',
31  1,
32  $savingdocmask,
33  0,
34  'formuserfile',
35  'accept',
36  '',
37  1
38  );
39 
40 print '</td></tr>';
dol_sanitizeFileName($str, $newstr= '_', $unaccent=1)
Clean a string to use it as a file name.
print $_SERVER["PHP_SELF"]
Edit parameters.
print
Draft customers invoices.
Definition: index.php:89