diff --git a/ChangeLog b/ChangeLog index d83555879b3..bf9ac07542f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -46,6 +46,7 @@ For users: - New: [ task #1016 ] Can define a specific numbering for deposits - New: [ task #918 ] Stock replenishment - Fix: [ bug #992 ] Proforma invoices don't have a separated numeric count +- New : Add pdf link into supplier invoice list and supplier order list For translators: diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index ef8422a7dbc..43a06fead4e 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -144,7 +144,7 @@ class FormActions global $bc; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; - + $listofactions=ActionComm::getActions($this->db, $socid, $object->id, $typeelement); if (! is_array($listofactions)) dol_print_error($this->db,'FailedToGetActions'); diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 38558c2e5fe..428cddcf0ca 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1451,47 +1451,63 @@ function dolGetElementUrl($objectid,$objecttype,$withpicto=0,$option='') // To work with non standard path if ($objecttype == 'facture' || $objecttype == 'invoice') { - $classpath = 'compta/facture/class'; $module='facture'; $subelement='facture'; + $classpath = 'compta/facture/class'; + $module='facture'; + $subelement='facture'; } if ($objecttype == 'commande' || $objecttype == 'order') { - $classpath = 'commande/class'; $module='commande'; $subelement='commande'; + $classpath = 'commande/class'; + $module='commande'; + $subelement='commande'; } if ($objecttype == 'propal') { $classpath = 'comm/propal/class'; } if ($objecttype == 'shipping') { - $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; + $classpath = 'expedition/class'; + $subelement = 'expedition'; + $module = 'expedition_bon'; } if ($objecttype == 'delivery') { - $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; - } - if ($objecttype == 'invoice_supplier') { - $classpath = 'fourn/class'; - } - if ($objecttype == 'order_supplier') { - $classpath = 'fourn/class'; + $classpath = 'livraison/class'; + $subelement = 'livraison'; + $module = 'livraison_bon'; } if ($objecttype == 'contract') { - $classpath = 'contrat/class'; $module='contrat'; $subelement='contrat'; + $classpath = 'contrat/class'; + $module='contrat'; + $subelement='contrat'; } if ($objecttype == 'member') { - $classpath = 'adherents/class'; $module='adherent'; $subelement='adherent'; + $classpath = 'adherents/class'; + $module='adherent'; + $subelement='adherent'; } if ($objecttype == 'cabinetmed_cons') { - $classpath = 'cabinetmed/class'; $module='cabinetmed'; $subelement='cabinetmedcons'; + $classpath = 'cabinetmed/class'; + $module='cabinetmed'; + $subelement='cabinetmedcons'; } if ($objecttype == 'fichinter') { - $classpath = 'fichinter/class'; $module='ficheinter'; $subelement='fichinter'; + $classpath = 'fichinter/class'; + $module='ficheinter'; + $subelement='fichinter'; } //print "objecttype=".$objecttype." module=".$module." subelement=".$subelement; $classfile = strtolower($subelement); $classname = ucfirst($subelement); if ($objecttype == 'invoice_supplier') { - $classfile = 'fournisseur.facture'; $classname='FactureFournisseur'; + $classfile = 'fournisseur.facture'; + $classname='FactureFournisseur'; + $classpath = 'fourn/class'; + $module='fournisseur'; } if ($objecttype == 'order_supplier') { - $classfile = 'fournisseur.commande'; $classname='CommandeFournisseur'; + $classfile = 'fournisseur.commande'; + $classname='CommandeFournisseur'; + $classpath = 'fourn/class'; + $module='fournisseur'; } if (! empty($conf->$module->enabled)) diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 1e932d64827..1876d181339 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1812,6 +1812,16 @@ elseif (! empty($object->id)) * Linked object block */ $somethingshown=$object->showLinkedObjectBlock(); + + print '