Skip to content

Commit

Permalink
New: Can filter on status on interventions.
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 6, 2014
1 parent 63bfc09 commit 012643a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -5,6 +5,7 @@ English Dolibarr ChangeLog

***** ChangeLog for 3.7 compared to 3.6.* *****
For users:
- New: Can filter on status on interventions.
- New: Add help info of field type into dictionary of payment types.
- New: Add proposals into referer page of thirdparty.
- New: On contact list can set filter on both active and not active (no more exclusive select).
Expand Down
17 changes: 14 additions & 3 deletions htdocs/fichinter/list.php
Expand Up @@ -31,6 +31,7 @@
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';

$langs->load("companies");
$langs->load("bills");
$langs->load("interventions");

$socid=GETPOST('socid','int');
Expand All @@ -54,12 +55,15 @@
$search_ref=GETPOST('search_ref','alpha');
$search_company=GETPOST('search_company','alpha');
$search_desc=GETPOST('search_desc','alpha');
$search_status=GETPOST('search_status');


/*
* View
*/

$form = new Form($db);

llxHeader();


Expand All @@ -83,11 +87,14 @@
if ($search_desc) {
$sql .= natural_search(array('f.description', 'fd.description'), $search_desc);
}
if ($search_status != '' && $search_status >= 0) {
$sql .= ' AND f.fk_statut = '.$search_status;
}
if (! $user->rights->societe->client->voir && empty($socid))
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($socid)
$sql.= " AND s.rowid = " . $socid;
$sql.= " ORDER BY ".$sortfield." ".$sortorder;
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit+1, $offset);

$result=$db->query($sql);
Expand All @@ -100,7 +107,7 @@
$urlparam="&socid=$socid";
print_barre_liste($langs->trans("ListOfInterventions"), $page, $_SERVER['PHP_SELF'], $urlparam, $sortfield, $sortorder, '', $num);

print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">'."\n";
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
print '<table class="noborder" width="100%">';

print '<tr class="liste_titre">';
Expand Down Expand Up @@ -130,7 +137,11 @@
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
}
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
print '<td class="liste_titre" align="right">';
$liststatus=array('0'=>$langs->trans("Draft"), '1'=>$langs->trans("Validated"), '2'=>$langs->trans("Billed"));
print $form->selectarray('search_status', $liststatus, GETPOST('search_status'), 1);
print '<input class="liste_titre" align="right" type="image" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '</td>';
print "</tr>\n";

$companystatic=new Societe($db);
Expand Down

0 comments on commit 012643a

Please sign in to comment.