diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index f4b3894fc91..a1e37d8c749 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -808,7 +808,7 @@ if ($action == 'validate' && $permissiontoadd && $objectclass !== null) { } else { $idwarehouse = 0; } - if ($objecttmp->valid($user, $idwarehouse)) { + if ($objecttmp->valid($user, $idwarehouse) > 0) { setEventMessages($langs->trans('hasBeenValidated', $objecttmp->ref), null, 'mesgs'); } else { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index af0dcbac277..9401154cefa 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -132,7 +132,7 @@ class box_graph_invoices_permonth extends ModeleBoxes $HEIGHT = '192'; $stats = new FactureStats($this->db, $socid, $mode, 0); - $stats->where = "f.fk_statut > 0"; + $stats->where = "f.entity IN (".getEntity('invoice').") AND f.fk_statut > 0"; $px1 = null; $px2 = null; diff --git a/htdocs/core/boxes/box_graph_invoices_peryear.php b/htdocs/core/boxes/box_graph_invoices_peryear.php index fccfa5b7530..b52fb20adfd 100644 --- a/htdocs/core/boxes/box_graph_invoices_peryear.php +++ b/htdocs/core/boxes/box_graph_invoices_peryear.php @@ -126,7 +126,7 @@ class box_graph_invoices_peryear extends ModeleBoxes $HEIGHT = '192'; $stats = new FactureStats($this->db, $socid, $mode, 0); - $stats->where = "f.fk_statut > 0"; + $stats->where = "f.entity IN (".getEntity('invoice').") AND f.fk_statut > 0"; // Build graphic amount of object. $data = array(array('Lib',val1,val2,val3),...) $data2 = $stats->getAmountByYear($numberyears); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 6a0b263d096..4d1c14add77 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -798,7 +798,7 @@ abstract class CommonObject public $labelStatusShort = array(); /** - * @var array Array to store lists of tpl + * @var array Array to store lists of tpl */ public $tpl; diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 667d575e1de..dd83895cd5d 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -346,6 +346,8 @@ class Conf extends stdClass * @var stdClass */ public $productbatch; + public $api; + /** * @var ?stdClass * @deprecated Use project @@ -516,6 +518,7 @@ class Conf extends stdClass $this->notification = new stdClass(); $this->expensereport = new stdClass(); $this->productbatch = new stdClass(); + $this->api = new stdClass(); // Common arrays $this->cache = array(); @@ -785,6 +788,10 @@ class Conf extends stdClass $this->admin->dir_output = $rootfordata.'/admin'; $this->admin->dir_temp = $rootfortemp.'/admin/temp'; + // For api storage + $this->api->dir_output = $rootfordata.'/api'; + $this->api->dir_temp = $rootfortemp.'/api/temp'; + // For user storage $this->user->multidir_output = array($this->entity => $rootfordata."/users"); $this->user->multidir_temp = array($this->entity => $rootfortemp."/users/temp"); diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 782259dee09..3dd0254de36 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1674,7 +1674,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl // Address - Phone - Email if (!empty($arrayfields['t.address']['checked'])) { $addresstoshow = $contactstatic->getBannerAddress('contact', $object); - print ''; + print ''; print $addresstoshow; print ''; } diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 9beff073ec1..d4427085312 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -1399,7 +1399,7 @@ class ProductFournisseur extends Product $label .= '
'.$langs->trans('ProductAccountancyBuyExportCode').': '.length_accountg($this->accountancy_code_buy_export); } - $logPrices = $this->listProductFournisseurPriceLog($this->product_fourn_price_id, 'pfpl.datec', 'DESC'); // set sort order here + $logPrices = $this->listProductFournisseurPriceLog($this->product_fourn_price_id, 'pfpl.datec', 'DESC', getDolGlobalInt('MAIN_TOOLTIP_PRICELOG_HISTORY_LIMIT', 10)); // set sort order here if (is_array($logPrices) && count($logPrices) > 0) { $label .= '

'; $label .= ''.$langs->trans("History").''; diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 25b5733b467..990b2e40314 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -206,13 +206,13 @@ class modMyModule extends DolibarrModules // 'group' to add a tab in group view // 'intervention' to add a tab in intervention view // 'invoice' to add a tab in customer invoice view - // 'invoice_supplier' to add a tab in supplier invoice view + // 'supplier_invoice' to add a tab in supplier invoice view // 'member' to add a tab in foundation member view // 'opensurveypoll' to add a tab in opensurvey poll view // 'order' to add a tab in sale order view - // 'order_supplier' to add a tab in supplier order view + // 'supplier_order' to add a tab in supplier order view // 'payment' to add a tab in payment view - // 'payment_supplier' to add a tab in supplier payment view + // 'supplier_payment' to add a tab in supplier payment view // 'product' to add a tab in product view // 'propal' to add a tab in propal view // 'project' to add a tab in project view