Debug v17
This commit is contained in:
parent
f34253796f
commit
3b87aadc48
@ -555,7 +555,7 @@ foreach ($object->fields as $key => $val) {
|
||||
if (!empty($arrayfields['t.'.$key]['checked'])) {
|
||||
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
|
||||
if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
|
||||
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1);
|
||||
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100'.($key == 'status' ? ' search_status onrightofpage' : ''), 1);
|
||||
} elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) {
|
||||
print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', 'maxwidth125', 1);
|
||||
} elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
|
||||
|
||||
@ -572,7 +572,7 @@ foreach ($object->fields as $key => $val) {
|
||||
if (!empty($arrayfields['t.'.$key]['checked'])) {
|
||||
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
|
||||
if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
|
||||
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1);
|
||||
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100'.($key == 'status' ? ' search_status onrightofpage' : ''), 1);
|
||||
} elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) {
|
||||
print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', $cssforfield.' maxwidth250', 1);
|
||||
} elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
|
||||
|
||||
@ -123,7 +123,7 @@ foreach ($object->fields as $key => $val) {
|
||||
$visible = (int) dol_eval($val['visible'], 1);
|
||||
$arrayfields['t.'.$key] = array(
|
||||
'label'=>$val['label'],
|
||||
'checked'=>(($visible < 0) ? 0 : 1),
|
||||
'checked'=>(($visible <= 0) ? 0 : 1),
|
||||
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
|
||||
'position'=>$val['position'],
|
||||
'help'=> isset($val['help']) ? $val['help'] : ''
|
||||
|
||||
@ -1143,12 +1143,12 @@ if (!empty($arrayfields['p.tms']['checked'])) {
|
||||
}
|
||||
if (!empty($arrayfields['p.tosell']['checked'])) {
|
||||
print '<td class="liste_titre center">';
|
||||
print $form->selectarray('search_tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'), '1'=>$langs->trans('ProductStatusOnSellShort')), $search_tosell, 1);
|
||||
print $form->selectarray('search_tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'), '1'=>$langs->trans('ProductStatusOnSellShort')), $search_tosell, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage');
|
||||
print '</td >';
|
||||
}
|
||||
if (!empty($arrayfields['p.tobuy']['checked'])) {
|
||||
print '<td class="liste_titre center">';
|
||||
print $form->selectarray('search_tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'), '1'=>$langs->trans('ProductStatusOnBuyShort')), $search_tobuy, 1);
|
||||
print $form->selectarray('search_tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'), '1'=>$langs->trans('ProductStatusOnBuyShort')), $search_tobuy, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage');
|
||||
print '</td>';
|
||||
}
|
||||
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||
|
||||
@ -485,7 +485,7 @@ $formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.
|
||||
print '</div>';
|
||||
print ' ';
|
||||
print $formcompany->selectTypeContact($object, '', 'type', 'internal', 'rowid', 0, 'maxwidth150onsmartphone');
|
||||
print '<input type="submit" class="button valignmiddle smallonsmartphone" name="assigntask" value="'.dol_escape_htmltag($titleassigntask).'">';
|
||||
print '<input type="submit" class="button valignmiddle smallonsmartphone small" name="assigntask" value="'.dol_escape_htmltag($titleassigntask).'">';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth" style="padding-bottom: 20px;"></div>';
|
||||
|
||||
@ -397,7 +397,7 @@ $formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.
|
||||
print '</div>';
|
||||
print ' ';
|
||||
print $formcompany->selectTypeContact($object, '', 'type', 'internal', 'rowid', 0, 'maxwidth150onsmartphone');
|
||||
print '<input type="submit" class="button valignmiddle smallonsmartphone" name="assigntask" value="'.dol_escape_htmltag($titleassigntask).'">';
|
||||
print '<input type="submit" class="button valignmiddle smallonsmartphone small" name="assigntask" value="'.dol_escape_htmltag($titleassigntask).'">';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth" style="padding-bottom: 20px;"></div>';
|
||||
|
||||
@ -498,7 +498,7 @@ $formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.
|
||||
print '</div>';
|
||||
print ' ';
|
||||
print $formcompany->selectTypeContact($object, '', 'type', 'internal', 'rowid', 0, 'maxwidth150onsmartphone');
|
||||
print '<input type="submit" class="button valignmiddle smallonsmartphone" name="assigntask" value="'.dol_escape_htmltag($titleassigntask).'">';
|
||||
print '<input type="submit" class="button valignmiddle smallonsmartphone small" name="assigntask" value="'.dol_escape_htmltag($titleassigntask).'">';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth" style="padding-bottom: 20px;"></div>';
|
||||
|
||||
@ -1542,7 +1542,11 @@ while ($i < $imaxinloop) {
|
||||
//if ($obj->opp_status_code)
|
||||
if (strcmp($obj->opp_amount, '')) {
|
||||
print '<span class="amount">'.price($obj->opp_amount, 1, $langs, 1, -1, -1, '').'</span>';
|
||||
$totalarray['val']['p.opp_amount'] += $obj->opp_amount;
|
||||
if (empty($totalarray['val']['p.opp_amount'])) {
|
||||
$totalarray['val']['p.opp_amount'] = $obj->opp_amount;
|
||||
} else {
|
||||
$totalarray['val']['p.opp_amount'] += $obj->opp_amount;
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
@ -1571,7 +1575,11 @@ while ($i < $imaxinloop) {
|
||||
print '<td align="right">';
|
||||
if ($obj->opp_weighted_amount) {
|
||||
print '<span class="amount">'.price($obj->opp_weighted_amount, 1, $langs, 1, -1, -1, '').'</span>';
|
||||
$totalarray['val']['opp_weighted_amount'] += $obj->opp_weighted_amount;
|
||||
if (empty($totalarray['val']['opp_weighted_amount'])) {
|
||||
$totalarray['val']['opp_weighted_amount'] = $obj->opp_weighted_amount;
|
||||
} else {
|
||||
$totalarray['val']['opp_weighted_amount'] += $obj->opp_weighted_amount;
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
@ -1586,7 +1594,11 @@ while ($i < $imaxinloop) {
|
||||
print '<td class="right">';
|
||||
if ($obj->budget_amount != '') {
|
||||
print '<span class="amount">'.price($obj->budget_amount, 1, $langs, 1, -1, -1).'</span>';
|
||||
$totalarray['val']['p.budget_amount'] += $obj->budget_amount;
|
||||
if (empty($totalarray['val']['p.budget_amount'])) {
|
||||
$totalarray['val']['p.budget_amount'] = $obj->budget_amount;
|
||||
} else {
|
||||
$totalarray['val']['p.budget_amount'] += $obj->budget_amount;
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
|
||||
@ -1239,7 +1239,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
}
|
||||
|
||||
// Call Hook formConfirm
|
||||
$parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid, "projectstatic" => $projectstatic, "withproject" => $withproject);
|
||||
$parameters = array('formConfirm' => $formconfirm, "projectstatic" => $projectstatic, "withproject" => $withproject);
|
||||
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
$formconfirm .= $hookmanager->resPrint;
|
||||
@ -1265,7 +1265,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
}
|
||||
$arrayfields['author'] = array('label'=>$langs->trans("By"), 'checked'=>1);
|
||||
$arrayfields['t.note'] = array('label'=>$langs->trans("Note"), 'checked'=>1);
|
||||
if ($conf->service->enabled && $projectstatic->thirdparty->id > 0 && $projectstatic->usage_bill_time) {
|
||||
if (isModEnabled('service') && !empty($projectstatic->thirdparty) && $projectstatic->thirdparty->id > 0 && $projectstatic->usage_bill_time) {
|
||||
$arrayfields['t.fk_product'] = array('label' => $langs->trans("Product"), 'checked' => 1);
|
||||
}
|
||||
$arrayfields['t.task_duration'] = array('label'=>$langs->trans("Duration"), 'checked'=>1);
|
||||
@ -1971,7 +1971,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
|
||||
$total = 0;
|
||||
$totalvalue = 0;
|
||||
$totalarray = array();
|
||||
$totalarray = array('nbfield'=>0);
|
||||
foreach ($tasks as $task_time) {
|
||||
if ($i >= $limit) {
|
||||
break;
|
||||
@ -2168,11 +2168,19 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
if (!$i) {
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 't.task_duration';
|
||||
}
|
||||
$totalarray['val']['t.task_duration'] += $task_time->task_duration;
|
||||
if (empty($totalarray['val']['t.task_duration'])) {
|
||||
$totalarray['val']['t.task_duration'] = $task_time->task_duration;
|
||||
} else {
|
||||
$totalarray['val']['t.task_duration'] += $task_time->task_duration;
|
||||
}
|
||||
if (!$i) {
|
||||
$totalarray['totaldurationfield'] = $totalarray['nbfield'];
|
||||
}
|
||||
$totalarray['totalduration'] += $task_time->task_duration;
|
||||
if (empty($totalarray['totalduration'])) {
|
||||
$totalarray['totalduration'] = $task_time->task_duration;
|
||||
} else {
|
||||
$totalarray['totalduration'] += $task_time->task_duration;
|
||||
}
|
||||
}
|
||||
|
||||
//Product
|
||||
@ -2208,11 +2216,19 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
if (!$i) {
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 'value';
|
||||
}
|
||||
$totalarray['val']['value'] += $value;
|
||||
if (empty($totalarray['val']['value'])) {
|
||||
$totalarray['val']['value'] = $value;
|
||||
} else {
|
||||
$totalarray['val']['value'] += $value;
|
||||
}
|
||||
if (!$i) {
|
||||
$totalarray['totalvaluefield'] = $totalarray['nbfield'];
|
||||
}
|
||||
$totalarray['totalvalue'] += $value;
|
||||
if (empty($totalarray['totalvalue'])) {
|
||||
$totalarray['totalvalue'] = $value;
|
||||
} else {
|
||||
$totalarray['totalvalue'] += $value;
|
||||
}
|
||||
}
|
||||
|
||||
// Invoiced
|
||||
|
||||
@ -927,7 +927,7 @@ if (!empty($arrayfields['e.date_delivery']['checked'])) {
|
||||
if (!empty($arrayfields['l.ref']['checked'])) {
|
||||
// Delivery ref
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="10" type="text" name="search_ref_liv" value="'.$search_ref_liv.'"';
|
||||
print '<input class="flat" type="text" name="search_ref_liv" value="'.dol_escape_htmltag($search_ref_liv).'"';
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['l.date_delivery']['checked'])) {
|
||||
@ -960,7 +960,7 @@ if (!empty($arrayfields['e.tms']['checked'])) {
|
||||
// Status
|
||||
if (!empty($arrayfields['e.fk_statut']['checked'])) {
|
||||
print '<td class="liste_titre maxwidthonsmartphone right">';
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans('StatusReceptionDraftShort'), '1'=>$langs->trans('StatusReceptionValidatedShort'), '2'=>$langs->trans('StatusReceptionProcessedShort')), $search_status, 1);
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans('StatusReceptionDraftShort'), '1'=>$langs->trans('StatusReceptionValidatedShort'), '2'=>$langs->trans('StatusReceptionProcessedShort')), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status onrightofpage');
|
||||
print '</td>';
|
||||
}
|
||||
// Status billed
|
||||
|
||||
@ -1308,7 +1308,7 @@ if (!empty($arrayfields['s.tms']['checked'])) {
|
||||
// Status
|
||||
if (!empty($arrayfields['s.status']['checked'])) {
|
||||
print '<td class="liste_titre center minwidth75imp">';
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), $search_status, 1, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status minwidth75 maxwidth125 onrightofpage', 1);
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['s.import_key']['checked'])) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user