Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0

This commit is contained in:
Laurent Destailleur 2022-12-21 21:15:00 +01:00
commit e06bad5112
6 changed files with 21 additions and 8 deletions

View File

@ -9600,6 +9600,12 @@ abstract class CommonObject
}
}
// Delete linked object
$res = $this->deleteObjectLinked();
if ($res < 0) {
$error++;
}
if (!$error && !empty($this->isextrafieldmanaged)) {
$result = $this->deleteExtraFields();
if ($result < 0) {

View File

@ -498,7 +498,7 @@ $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfi
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
print '<div class="div-table-responsive">';
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
// Fields title search
// --------------------------------------------------------------------
@ -865,6 +865,9 @@ while ($i < $imaxinloop) {
if (!$i) {
$totalarray['type'][$totalarray['nbfield']] = 'duration';
}
if (!$i) {
$totalarray['pos'][$totalarray['nbfield']] = 'fd.duree';
}
$totalarray['val']['fd.duree'] += $obj->duree;
}
// Action column

View File

@ -55,6 +55,9 @@ global $langs, $user;
// Libraries
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
require_once '../lib/mymodule.lib.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
//require_once "../class/myclass.class.php";
// Translations

View File

@ -500,11 +500,11 @@ llxHeader("", $title, $help_url);
$titleboth = $langs->trans("LeadsOrProjects");
$titlenew = $langs->trans("NewLeadOrProject"); // Leads and opportunities by default
if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
if (!getDolGlobalInt('PROJECT_USE_OPPORTUNITIES')) {
$titleboth = $langs->trans("Projects");
$titlenew = $langs->trans("NewProject");
}
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 2) { // 2 = leads only
if (getDolGlobalInt('PROJECT_USE_OPPORTUNITIES') == 2) { // 2 = leads only
$titleboth = $langs->trans("Leads");
$titlenew = $langs->trans("NewLead");
}

View File

@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
include_once DOL_DOCUMENT_ROOT.'/core/class/stats.class.php';
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
@ -195,7 +196,7 @@ class TaskStats extends Stats
}
/**
/**
* Return the Task amount by month for a year
*
* @param int $year Year to scan
@ -208,7 +209,7 @@ class TaskStats extends Stats
return array();
}
/**
/**
* Return average of entity by month
* @param int $year year number
* @return int value

View File

@ -191,7 +191,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
$search_project_ref = '';
$search_project_label = '';
$search_task_label = '';
$search_user = 0;
$search_user = -1;
$search_valuebilled = '';
$search_product_ref = '';
$toselect = array();
@ -1446,7 +1446,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
print $langs->trans('InvoiceToUse');
print '</td>';
print '<td>';
$form->selectInvoice('invoice', '', 'invoiceid', 24, 0, $langs->trans('NewInvoice'), 1, 0, 0, 'maxwidth500', '', 'all');
$form->selectInvoice($projectstatic->thirdparty->id, '', 'invoiceid', 24, 0, $langs->trans('NewInvoice'), 1, 0, 0, 'maxwidth500', '', 'all');
print '</td>';
print '</tr>';
/*print '<tr>';
@ -1561,7 +1561,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
if (empty($search_user)) {
$search_user = $user->id;
}
$sql .= " AND t.fk_user = ".((int) $search_user);
if ($search_user > 0) $sql .= " AND t.fk_user = ".((int) $search_user);
}
if ($search_note) {