diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 5664c2e3f54..195b04a2ed5 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -369,7 +369,7 @@ if ($object->id > 0) { // Project if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
'.$langs->trans('Project').' '; + $morehtmlref .= '
'; if (0) { $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index 8be48493d08..c9f90b8b240 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -54,10 +54,10 @@ $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortfield) { - $sortfield = 'pl.fk_soc'; + $sortfield = 'pl.rowid'; } if (!$sortorder) { - $sortorder = 'DESC'; + $sortorder = 'ASC'; } $object = new BonPrelevement($db); @@ -343,7 +343,7 @@ if ($id > 0 || $ref) { $sql .= ", ".MAIN_DB_PREFIX."societe as s"; $sql .= " WHERE pl.fk_prelevement_bons = ".((int) $id); $sql .= " AND pl.fk_prelevement_bons = pb.rowid"; - $sql .= " AND pb.entity = ".$conf->entity; + $sql .= " AND pb.entity = ".((int) $conf->entity); // No sharing of entity here $sql .= " AND pl.fk_soc = s.rowid"; if ($socid) { $sql .= " AND s.rowid = ".((int) $socid); @@ -375,7 +375,8 @@ if ($id > 0 || $ref) { $urladd .= '&limit='.urlencode($limit); } - print '
'."\n"; + print ''."\n"; + print ''; print ''; print ''; if (!empty($page)) { @@ -395,9 +396,9 @@ if ($id > 0 || $ref) { print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''; print ''; - print_liste_field_titre("Lines", $_SERVER["PHP_SELF"], "pl.rowid", '', $urladd); - print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $urladd); - print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $urladd, 'class="right"'); + print_liste_field_titre("Lines", $_SERVER["PHP_SELF"], "pl.rowid", '', $urladd, '', $sortfield, $sortorder); + print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $urladd, '', $sortfield, $sortorder); + print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $urladd, 'class="right"', $sortfield, $sortorder); print_liste_field_titre(''); print "\n";