2
0
forked from Wavyzz/dolibarr

Add pdf link into supplier invoice list and supplier order list

This commit is contained in:
Florian Henry
2013-08-09 13:48:44 +02:00
parent 057df6df85
commit 3cf3dbeb51
6 changed files with 59 additions and 18 deletions

View File

@@ -1812,6 +1812,16 @@ elseif (! empty($object->id))
* Linked object block
*/
$somethingshown=$object->showLinkedObjectBlock();
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
$somethingshown=$formactions->showactions($object,'order_supplier',$socid);
print '</div></div></div>';
//print '</td><td valign="top" width="50%">';
print '</div><div class="fichehalfright"><div class="ficheaddleft">';

View File

@@ -23,9 +23,11 @@
* \brief List of suppliers orders
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
$langs->load("orders");
@@ -65,6 +67,7 @@ if ($socid > 0)
llxHeader('',$title);
$commandestatic=new CommandeFournisseur($db);
$formfile = new FormFile($db);
if ($sortorder == "") $sortorder="DESC";
@@ -154,6 +157,7 @@ if ($resql)
$var=true;
$userstatic = new User($db);
$objectstatic=new CommandeFournisseur($db);
while ($i < min($num,$conf->liste_limit))
{
@@ -163,7 +167,11 @@ if ($resql)
print "<tr ".$bc[$var].">";
// Ref
print '<td><a href="'.DOL_URL_ROOT.'/fourn/commande/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.'</a></td>'."\n";
print '<td><a href="'.DOL_URL_ROOT.'/fourn/commande/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.'</a>';
$filename=dol_sanitizeFileName($obj->ref);
$filedir=$conf->fournisseur->dir_output.'/commande' . '/' . dol_sanitizeFileName($obj->ref);
print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
print '</td>'."\n";
// Company
print '<td><a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' ';