diff --git a/ChangeLog b/ChangeLog
index 4ba65941254..00962b10419 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -106,6 +106,7 @@ NEW: when multiple order linked to facture, show list into note.
NEW: when we delete several objects with massaction, if somes object has child we must see which objects are concerned and nevertheless delete objects which can be deleted
NEW: Editing a page in website module keep old page with name .back
NEW: External backups can be downloaded from the "About info page".
+NEW: Add massaction to switch status on sale / on purchase of a product.
For developers:
diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php
index 9e393beeacd..8cef3a05cf4 100644
--- a/htdocs/accountancy/admin/export.php
+++ b/htdocs/accountancy/admin/export.php
@@ -142,7 +142,7 @@ $linkback = '';
print load_fiche_titre($langs->trans('ExportOptions'), $linkback, 'accountancy');
-print "\n".'';
// This ajax service is called only when a directory $selecteddir is opened but not when closed.
- //print '';
}
@@ -169,7 +169,7 @@ if (!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_
if (empty($conf->use_javascript_ajax) || !empty($conf->global->MAIN_ECM_DISABLE_JS)) {
print '
';
- // Load full tree from database. We will use it to define nbofsubdir and nboffilesinsubdir
+ // Load full manual tree from database. We will use it to define nbofsubdir and nboffilesinsubdir
if (empty($sqltree)) {
$sqltree = $ecmdirstatic->get_full_arbo(0); // Slow
}
diff --git a/htdocs/core/ajax/objectonoff.php b/htdocs/core/ajax/objectonoff.php
index 05843abed9d..5bac89345ce 100644
--- a/htdocs/core/ajax/objectonoff.php
+++ b/htdocs/core/ajax/objectonoff.php
@@ -65,9 +65,14 @@ if (!empty($user->socid)) {
$socid = $user->socid;
}
-/*if (empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
- accessforbidden('Calling this file is allowed only when MAIN_DIRECT_STATUS_UPDATE is set');
-}*/
+if (in_array($field, array('status'))) {
+ restrictedArea($user, $element, $id);
+} elseif ($element == 'product' && in_array($field, array('tosell', 'tobuy', 'tobatch'))) { // Special case for products
+ restrictedArea($user, 'produit|service', $id, 'product&product', '', '', 'rowid');
+} else {
+ accessforbidden("Bad value for combination of parameters element/field.", 0, 0, 1);
+ exit;
+}
/*
@@ -78,15 +83,6 @@ top_httphead();
print ''."\n";
-if (in_array($field, array('status'))) {
- restrictedArea($user, $element, $id);
-} elseif ($element == 'product' && in_array($field, array('tosell', 'tobuy', 'tobatch'))) { // Special case for products
- restrictedArea($user, 'produit|service', $id, 'product&product', '', '', 'rowid');
-} else {
- accessforbidden("Bad value for combination of parameters element/field.", 0, 0, 1);
- exit;
-}
-
// Registering new values
if (($action == 'set') && !empty($id)) {
$triggerkey = strtoupper($element).'_UPDATE';
diff --git a/htdocs/core/boxes/box_funnel_of_prospection.php b/htdocs/core/boxes/box_funnel_of_prospection.php
index fd89e732937..89ed2215732 100644
--- a/htdocs/core/boxes/box_funnel_of_prospection.php
+++ b/htdocs/core/boxes/box_funnel_of_prospection.php
@@ -237,7 +237,7 @@ class box_funnel_of_prospection extends ModeleBoxes
$dolgraph->setBorderColor(array_values($bordercolorseries));
$dolgraph->setShowLegend(2);
if (!empty($conf->dol_optimize_smallscreen)) {
- $px1->SetWidth(320);
+ $dolgraph->SetWidth(320);
}
$dolgraph->setShowPercent(1);
$dolgraph->setMirrorGraphValues(true);
diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php
index 65498ab6362..8179e134bcf 100644
--- a/htdocs/core/boxes/box_graph_invoices_permonth.php
+++ b/htdocs/core/boxes/box_graph_invoices_permonth.php
@@ -227,7 +227,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
if (!$mesg) {
$stringtoshow = '';
- $stringtoshow .= '';
} else { // Default Header Redirect
diff --git a/htdocs/core/customreports.php b/htdocs/core/customreports.php
index b7f01de0aeb..1cede60f892 100644
--- a/htdocs/core/customreports.php
+++ b/htdocs/core/customreports.php
@@ -351,7 +351,7 @@ print $form->selectarray('objecttype', $newarrayoftype, $objecttype, 0, 0, 0, ''
if (empty($conf->use_javascript_ajax)) {
print '';
} else {
- print ''."\n";
print "\n";
diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php
index da6e347eb5c..5346e37aec4 100644
--- a/htdocs/product/inventory/inventory.php
+++ b/htdocs/product/inventory/inventory.php
@@ -311,7 +311,7 @@ llxHeader('', $langs->trans('Inventory'), $help_url);
// Disable button Generate movement if data were modified and not saved
-print '
-';
+ $sectionwithinvoicelink .= '';
}
}
@@ -905,7 +905,7 @@ if ($action == "valid" || $action == "history" || $action == 'creditnote') {
$form = new Form($db);
?>
-