diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 8f94f29f7ca..415728cb3e9 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -163,7 +163,7 @@ if (isModEnabled("propal") && $user->hasRight("propal", "lire")) { $obj = $db->fetch_object($resql); if ($i >= $max) { - $othernb += 1; + $othernb++; $i++; $total += (!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT) ? $obj->total_ht : $obj->total_ttc); continue; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index f144b97e922..cdffc5c1961 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -2192,13 +2192,16 @@ function searchTaskInChild(&$inc, $parent, &$lines, &$taskrole) * @param int $status -1=No filter on statut, 0 or 1 = Filter on status * @param array $listofoppstatus List of opportunity status * @param array $hiddenfields List of info to not show ('projectlabel', 'declaredprogress', '...', ) + * @param int $max Max nb of record to show in HTML list * @return void */ -function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks = 0, $status = -1, $listofoppstatus = array(), $hiddenfields = array()) +function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks = 0, $status = -1, $listofoppstatus = array(), $hiddenfields = array(), $max = 0) { global $langs, $conf, $user; global $theme_datacolor; + $maxofloop = (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD); + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $listofstatus = array_keys($listofoppstatus); @@ -2229,8 +2232,6 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $title = $langs->trans("Projects").' '.$langs->trans($projectstatic->statuts_long[$status]); } - $arrayidtypeofcontact = array(); - print ''; print '
| '; + print ''.$langs->trans("More").'...'.($othernb < $maxofloop ? ' ('.$othernb.')' : '').''; + print ' | '; + print "|||||||||||||||||||
| '.$langs->trans("Total")." | "; if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index be215e891eb..ad03c48258b 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1028,17 +1028,17 @@ if (!empty($arrayfields['f.ref_supplier']['checked'])) { if (!empty($arrayfields['f.type']['checked'])) { print ' | '; $listtype = array( - FactureFournisseur::TYPE_STANDARD=>$langs->trans("InvoiceStandard"), - FactureFournisseur::TYPE_REPLACEMENT=>$langs->trans("InvoiceReplacement"), - FactureFournisseur::TYPE_CREDIT_NOTE=>$langs->trans("InvoiceAvoir"), - FactureFournisseur::TYPE_DEPOSIT=>$langs->trans("InvoiceDeposit"), + FactureFournisseur::TYPE_STANDARD=>$langs->trans("InvoiceStandard"), + FactureFournisseur::TYPE_REPLACEMENT=>$langs->trans("InvoiceReplacement"), + FactureFournisseur::TYPE_CREDIT_NOTE=>$langs->trans("InvoiceAvoir"), + FactureFournisseur::TYPE_DEPOSIT=>$langs->trans("InvoiceDeposit"), ); /* - if (!empty($conf->global->INVOICE_USE_SITUATION)) - { - $listtype[Facture::TYPE_SITUATION] = $langs->trans("InvoiceSituation"); - } - */ + if (!empty($conf->global->INVOICE_USE_SITUATION)) + { + $listtype[Facture::TYPE_SITUATION] = $langs->trans("InvoiceSituation"); + } + */ //$listtype[Facture::TYPE_PROFORMA]=$langs->trans("InvoiceProForma"); // A proformat invoice is not an invoice but must be an order. print $form->selectarray('search_type', $listtype, $search_type, 1, 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth100'); print ' | '; @@ -1065,11 +1065,11 @@ if (!empty($arrayfields['f.date_lim_reglement']['checked'])) { print '';
print ' ';
/*
- print $langs->trans('From').' ';
- print $form->selectDate($search_datelimit_start ? $search_datelimit_start : -1, 'search_datelimit_start', 0, 0, 1);
- print ' ';
- print '';
- print $langs->trans('to').' ';*/
+ print $langs->trans('From').' ';
+ print $form->selectDate($search_datelimit_start ? $search_datelimit_start : -1, 'search_datelimit_start', 0, 0, 1);
+ print ' ';
+ print '';
+ print $langs->trans('to').' ';*/
print $form->selectDate($search_datelimit_end ? $search_datelimit_end : -1, 'search_datelimit_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("Before"));
print ' ';
@@ -1487,7 +1487,7 @@ if ($num > 0) {
// Label
if (!empty($arrayfields['f.label']['checked'])) {
print ''.$langs->trans("Alert"); print ' | '; - print $obj->label; + print dol_escape_htmltag($obj->label); print ' | '; if (!$i) { $totalarray['nbfield']++; @@ -1543,7 +1543,7 @@ if ($num > 0) { // Alias if (!empty($arrayfields['s.name_alias']['checked'])) { print ''; - print $thirdparty->name_alias; + print dol_escape_htmltag($thirdparty->name_alias); print ' | '; if (!$i) { $totalarray['nbfield']++; @@ -1551,8 +1551,8 @@ if ($num > 0) { } // Town if (!empty($arrayfields['s.town']['checked'])) { - print ''; - print $obj->town; + print ' | '; + print dol_escape_htmltag($obj->town); print ' | '; if (!$i) { $totalarray['nbfield']++; @@ -1560,7 +1560,7 @@ if ($num > 0) { } // Zip if (!empty($arrayfields['s.zip']['checked'])) { - print ''; + print ' | '; print dol_escape_htmltag($obj->zip); print ' | '; if (!$i) { @@ -1569,7 +1569,9 @@ if ($num > 0) { } // State if (!empty($arrayfields['state.nom']['checked'])) { - print "".$obj->state_name." | \n"; + print ''; + print dol_escape_htmltag($obj->state_name); + print " | \n"; if (!$i) { $totalarray['nbfield']++; } @@ -1620,14 +1622,14 @@ if ($num > 0) { // Amount HT if (!empty($arrayfields['f.total_ht']['checked'])) { - print ''.price($obj->total_ht)." | \n"; + print ''.price($obj->total_ht)." | \n"; if (!$i) { $totalarray['nbfield']++; } if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'f.total_ht'; } - $totalarray['val']['f.total_ht'] += $obj->total_ht; + $totalarray['val']['f.total_ht'] += $obj->total_ht; } // Amount VAT if (!empty($arrayfields['f.total_vat']['checked'])) { @@ -1726,7 +1728,7 @@ if ($num > 0) { // Currency if (!empty($arrayfields['f.multicurrency_code']['checked'])) { - print ''.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)." | \n"; + print ''.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)." | \n"; if (!$i) { $totalarray['nbfield']++; } @@ -1734,16 +1736,16 @@ if ($num > 0) { // Currency rate if (!empty($arrayfields['f.multicurrency_tx']['checked'])) { - print ''; - $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code); - print " | \n"; + print ''; + $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code); + print " | \n"; if (!$i) { $totalarray['nbfield']++; } } // Amount HT if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) { - print ''.price($obj->multicurrency_total_ht)." | \n"; + print ''.price($obj->multicurrency_total_ht)." | \n"; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index e954f429781..4f743cc58f7 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -1102,7 +1102,7 @@ if ($action == 'create' && $user->rights->projet->creer) { print '
| '.$langs->trans("OpportunityStatus").' | '; print '';
print ' ';
- print $formproject->selectOpportunityStatus('opp_status', $object->opp_status, 1, 0, 0, 0, 'inline-block valignmiddle', 1, 1);
+ print $formproject->selectOpportunityStatus('opp_status', $object->opp_status, 1, 0, 0, 0, 'minwidth150 inline-block valignmiddle', 1, 1);
// Opportunity probability
print ' %';
diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php
index 2698a4b1a21..27885de31b9 100644
--- a/htdocs/projet/index.php
+++ b/htdocs/projet/index.php
@@ -193,9 +193,8 @@ print ' ';
*/
include DOL_DOCUMENT_ROOT.'/projet/graph_opportunities.inc.php';
-
// List of draft projects
-print_projecttasks_array($db, $form, $socid, $projectsListId, 0, 0, $listofoppstatus, array('projectlabel', 'plannedworkload', 'declaredprogress', 'prospectionstatus', 'projectstatus'));
+print_projecttasks_array($db, $form, $socid, $projectsListId, 0, 0, $listofoppstatus, array('projectlabel', 'plannedworkload', 'declaredprogress', 'prospectionstatus', 'projectstatus'), $max);
print ' ';
| ||||||||||||||||||