diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php index 25ddfd8c1f8..cdeeaf6c424 100644 --- a/htdocs/cashdesk/facturation_verif.php +++ b/htdocs/cashdesk/facturation_verif.php @@ -1,6 +1,7 @@ * Copyright (C) 2008-2010 Laurent Destailleur + * Copyright (C) 2018 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -150,7 +151,8 @@ switch($action) $obj_facturation->id($ret['rowid']); $obj_facturation->ref($ret['ref']); $obj_facturation->stock($ret['reel']); - $obj_facturation->prix($ret['price']); + //$obj_facturation->prix($ret['price']); + $obj_facturation->prix($pu_ht); $vatrate = $tva_tx; diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index a15598ee82d..77c533b88b8 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Andreu Bisquerra Gaya * Copyright (C) 2012 David Rodriguez Martinez - * Copyright (C) 2012-2017 Juanjo Menent + * Copyright (C) 2012-2018 Juanjo Menent * Copyright (C) 2015 Ferran Marcet * * This program is free software; you can redistribute it and/or modify @@ -285,6 +285,13 @@ if (($action == 'create' || $action == 'add') && !$error) { $fk_parent_line = 0; } + + // Extrafields + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { + $lines[$i]->fetch_optionals($lines[$i]->rowid); + $array_options = $lines[$i]->array_options; + } + $result = $object->addline( $desc, $lines[$i]->subprice, @@ -309,7 +316,8 @@ if (($action == 'create' || $action == 'add') && !$error) $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, - $lines[$i]->label + $lines[$i]->label, + $array_options ); if ($result > 0) { diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 55e8a5dcb51..9219d242151 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -520,7 +520,7 @@ class FormFile $modellist=ModelePDFCards::liste_modeles($this->db); } } - elseif ($modulepart == 'agenda') + elseif ($modulepart == 'agenda' || $modulepart == 'actions') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -560,7 +560,7 @@ class FormFile $modellist=ModelePDFUserGroup::liste_modeles($this->db); } } - else //if ($modulepart != 'agenda') + else { // For normalized standard modules $file=dol_buildpath('/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0);