diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index b726d39231a48..b8b4c209cb37f 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -749,7 +749,7 @@ { $mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); // Must not contain " setEventMessage($mesg); - + $error=0; // Initialisation donnees @@ -1177,7 +1177,8 @@ if (1==2 && ! empty($conf->global->PRODUCT_SHOW_WHEN_CREATE)) { print ''; - print ' '.$langs->trans('Label').''; + print ' '; + print ''.$langs->trans('Label').''; print ''.$langs->trans('PriceUHT').''; print ''.$langs->trans('VAT').''; print ''.$langs->trans('Qty').''; @@ -1201,7 +1202,7 @@ } // Other options - $parameters=array(); + $parameters=array('colspan' => ' colspan="6"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook // Bouton "Create Draft" @@ -1571,7 +1572,7 @@ } // Other options - $parameters=array('colspan' => ' colspan="3"'); + $parameters=array('colspan' => ' colspan="4"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print ''; @@ -1736,6 +1737,12 @@ // Show range print_date_range($date_start,$date_end); } + + if (is_object($hookmanager)) + { + $parameters=array('fk_parent_line'=>$line->fk_parent_line, 'line'=>$object->lines[$i],'var'=>$var,'num'=>$num,'i'=>$i); + $reshook=$hookmanager->executeHooks('formViewProductSupplierOptions',$parameters,$object,$action); + } print ''; // VAT @@ -1808,7 +1815,7 @@ if (is_object($hookmanager)) { $parameters=array(); - $reshook=$hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action); + $reshook=$hookmanager->executeHooks('formCreateSupplierProductOptions',$parameters,$object,$action); } // Editor wysiwyg @@ -2036,7 +2043,7 @@ * Show mail form */ if ($action == 'presend') - { + { $ref = dol_sanitizeFileName($object->ref); include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $fileparams = dol_most_recent_file($conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id,2).$ref, preg_quote($object->ref,'/')); @@ -2092,12 +2099,12 @@ $formmail->substit['__SIGNATURE__']=$user->signature; $formmail->substit['__PERSONALIZED__']=''; $formmail->substit['__CONTACTCIVNAME__']=''; - + //Find the good contact adress $custcontact=''; $contactarr=array(); $contactarr=$object->liste_contact(-1,'external'); - + if (is_array($contactarr) && count($contactarr)>0) { foreach($contactarr as $contact) { if ($contact['libelle']==$langs->trans('TypeContact_invoice_supplier_external_BILLING')) { @@ -2107,12 +2114,12 @@ $custcontact=$contactstatic->getFullName($langs,1); } } - + if (!empty($custcontact)) { $formmail->substit['__CONTACTCIVNAME__']=$custcontact; } } - + // Tableau des parametres complementaires $formmail->param['action']='send'; $formmail->param['models']='invoice_supplier_send';