Debug v18

This commit is contained in:
Laurent Destailleur 2023-04-21 14:26:39 +02:00
parent ec83fe478f
commit 3999f87fd2
4 changed files with 14 additions and 18 deletions

View File

@ -720,7 +720,7 @@ if (!empty($moreforfilter)) {
}
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
if ($massactionbutton) {
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
}

View File

@ -2380,12 +2380,8 @@ class Task extends CommonObjectLine
if (property_exists($this, 'budget_amount')) {
//$return .= '<br><span class="info-box-label amount">'.$langs->trans("Budget").' : '.price($this->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).'</span>';
}
if (property_exists($this, 'fk_statut')) {
$return .= '<br><span class="info-box-status ">'.$this->fk_statut.'</span>';
//$return .= ' <span class="info-box-label amount">'.$this->progress.'%</span>';
}
if (property_exists($this, 'duration_effective')) {
$return .= '<div class="info-box-label progressinkanban">'.getTaskProgressView($this, false, true).'</div>';
$return .= '<br><br><div class="info-box-label progressinkanban">'.getTaskProgressView($this, false, true).'</div>';
}
$return .= '</div>';
$return .= '</div>';

View File

@ -425,7 +425,7 @@ if (count($listofprojectcontacttypeexternal) == 0) {
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$distinct = 'DISTINCT'; // We add distinct until we have added a protection to be sure a contact of a project and task is only once.
$distinct = 'DISTINCT'; // We add distinct until filter on contact of project or task is implemented with AND EXISTS
$sql = "SELECT ".$distinct." p.rowid as id, p.ref, p.title, p.fk_statut as status, p.fk_opp_status, p.public, p.fk_user_creat,";
$sql .= " p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, (p.opp_amount*p.opp_percent/100) as opp_weighted_amount, p.tms as date_update, p.budget_amount,";
$sql .= " p.usage_opportunity, p.usage_task, p.usage_bill_time, p.usage_organize_event,";
@ -1028,7 +1028,7 @@ if (!empty($moreforfilter)) {
}
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
@ -1253,7 +1253,7 @@ $totalarray['nbfield'] = 0;
// --------------------------------------------------------------------
print '<tr class="liste_titre">';
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
$totalarray['nbfield']++;
}
if (!empty($arrayfields['p.ref']['checked'])) {
@ -1376,7 +1376,7 @@ if (!empty($arrayfields['p.fk_statut']['checked'])) {
}
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
$totalarray['nbfield']++;
}
print '</tr>'."\n";
@ -1409,7 +1409,7 @@ while ($i < $imaxinloop) {
$object->opp_percent = $obj->opp_percent;
$object->opp_status = $obj->fk_opp_status;
$object->opp_status_code = $obj->opp_status_code;
$object->opp_amount = !empty($obj->opp_ammount) ? $obj->opp_ammount : "";
$object->opp_amount = !empty($obj->opp_amount) ? $obj->opp_amount : "";
$object->opp_weighted_amount = $obj->opp_weighted_amount;
$object->budget_amount = $obj->budget_amount;
$object->usage_opportunity = $obj->usage_opportunity;

View File

@ -162,8 +162,8 @@ $arrayfields = array(
't.datee'=>array('label'=>"Deadline", 'checked'=>1, 'position'=>101),
'p.ref'=>array('label'=>"ProjectRef", 'checked'=>1),
'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0),
's.nom'=>array('label'=>"ThirdParty", 'checked'=>0),
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1),
's.nom'=>array('label'=>"ThirdParty", 'checked'=>0, 'csslist'=>'tdoverflowmax125'),
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1, 'csslist'=>'tdoverflowmax125'),
'p.fk_statut'=>array('label'=>"ProjectStatus", 'checked'=>1),
't.planned_workload'=>array('label'=>"PlannedWorkload", 'checked'=>1, 'position'=>102),
't.duration_effective'=>array('label'=>"TimeSpent", 'checked'=>1, 'position'=>103),
@ -1166,7 +1166,7 @@ while ($i < $imaxinloop) {
}
}
$object->fk_statut = $projectstatic->getLibStatut(1);
$arraydata = array();
$arraydata['projectlink'] = $projectstatic->getNomUrl(1);
print $object->getKanbanView('', $arraydata);
if ($i == ($imaxinloop - 1)) {
@ -1278,8 +1278,8 @@ while ($i < $imaxinloop) {
}
// Project title
if (!empty($arrayfields['p.title']['checked'])) {
print '<td>';
print dol_trunc($obj->projecttitle, 80);
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->projecttitle).'">';
print dol_escape_htmltag($obj->projecttitle);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@ -1287,7 +1287,7 @@ while ($i < $imaxinloop) {
}
// Third party
if (!empty($arrayfields['s.nom']['checked'])) {
print '<td>';
print '<td class="tdoverflowmax125">';
if ($obj->socid) {
print $socstatic->getNomUrl(1, '', 0, 0, -1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
} else {
@ -1300,7 +1300,7 @@ while ($i < $imaxinloop) {
}
// Alias
if (!empty($arrayfields['s.name_alias']['checked'])) {
print '<td>';
print '<td class="tdoverflowmax125">';
if ($obj->socid) {
print $socstatic->name_alias;
} else {