Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
e6a40f69
Commit
e6a40f69
authored
19 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
La recherche raccourci sur les stocks regarde aussi dans le label et descirption de l'entrepot.
parent
51b8ef37
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/product/stock/index.php
+8
-11
8 additions, 11 deletions
htdocs/product/stock/index.php
htdocs/product/stock/liste.php
+18
-9
18 additions, 9 deletions
htdocs/product/stock/liste.php
with
26 additions
and
20 deletions
htdocs/product/stock/index.php
+
8
−
11
View file @
e6a40f69
...
...
@@ -18,7 +18,6 @@
*
* $Id$
* $Source$
*
*/
/**
...
...
@@ -40,28 +39,26 @@ if (!$user->rights->stock->lire)
llxHeader
(
""
,
""
,
$langs
->
trans
(
"Stocks"
));
print_titre
(
$langs
->
trans
(
"StocksArea"
));
print
'<br>'
;
print_fiche_titre
(
$langs
->
trans
(
"StocksArea"
));
print
'<table
class="no
border" width="100%">'
;
print
'<tr><td valign="top" width="30%">'
;
print
'<table border
="0
" width="100%"
class="notopnoleftnoright"
>'
;
print
'<tr><td valign="top" width="30%"
class="notopnoleft"
>'
;
/*
* Zone recherche entrepot
*/
print
'<form method="post" action="liste.php">'
;
print
'<form method="post" action="
'
.
DOL_URL_ROOT
.
'/product/stock/
liste.php">'
;
print
'<table class="noborder" width="100%">'
;
print
"<tr class=
\"
liste_titre
\"
>"
;
print
'<td colspan="3">'
.
$langs
->
trans
(
"Search"
)
.
'</td></tr>'
;
print
"<tr
$bc[0]
><td>"
;
print
$langs
->
trans
(
"Ref"
)
.
' :</td><td><input class="flat" type="text" size="20" name="sf_ref"></td><td><input type="submit" value="'
.
$langs
->
trans
(
"Search"
)
.
'" class="button"></td></tr>'
;
print
$langs
->
trans
(
"Ref"
)
.
':</td><td><input class="flat" type="text" size="18" name="sf_ref"></td><td rowspan="2"><input type="submit" value="'
.
$langs
->
trans
(
"Search"
)
.
'" class="button"></td></tr>'
;
print
"<tr
$bc[0]
><td>"
.
$langs
->
trans
(
"Other"
)
.
':</td><td><input type="text" name="sall" class="flat" size="18"></td>'
;
print
"</table></form><br>"
;
$sql
=
"SELECT e.label, e.rowid, e.statut FROM "
.
MAIN_DB_PREFIX
.
"entrepot as e"
;
$sql
.
=
" ORDER BY e.statut DESC "
;
$sql
.
=
$db
->
plimit
(
15
,
0
);
...
...
@@ -101,12 +98,12 @@ else
dolibarr_print_error
(
$db
);
}
print
'</td><td valign="top" width="70%">'
;
print
'</td><td valign="top" width="70%"
class="notopnoleft"
>'
;
print
'</td></tr></table>'
;
$db
->
close
();
llxFooter
(
"<em>Dernière modification
$Date
$ révision
$Revision
$
</em>"
);
llxFooter
(
'$Date$ -
$Revision$
'
);
?>
This diff is collapsed.
Click to expand it.
htdocs/product/stock/liste.php
+
18
−
9
View file @
e6a40f69
...
...
@@ -18,7 +18,6 @@
*
* $Id$
* $Source$
*
*/
/**
...
...
@@ -37,25 +36,35 @@ $langs->load("stocks");
if
(
!
$user
->
rights
->
stock
->
lire
)
accessforbidden
();
$sref
=
isset
(
$_GET
[
"sref"
])
?
$_GET
[
"sref"
]
:
$_POST
[
"sref"
];
$snom
=
isset
(
$_GET
[
"snom"
])
?
$_GET
[
"snom"
]
:
$_POST
[
"snom"
];
$sall
=
isset
(
$_GET
[
"sall"
])
?
$_GET
[
"sall"
]
:
$_POST
[
"sall"
];
$sortfield
=
isset
(
$_GET
[
"sortfield"
])
?
$_GET
[
"sortfield"
]
:
$_POST
[
"sortfield"
];
$sortorder
=
isset
(
$_GET
[
"sortorder"
])
?
$_GET
[
"sortorder"
]
:
$_POST
[
"sortorder"
];
if
(
!
$sortfield
)
$sortfield
=
"e.label"
;
if
(
!
$sortorder
)
$sortorder
=
"ASC"
;
$page
=
$_GET
[
"page"
];
$sortfield
=
$_GET
[
"sortfield"
];
$sortorder
=
$_GET
[
"sortorder"
];
if
(
$page
<
0
)
$page
=
0
;
$limit
=
$conf
->
liste_limit
;
$offset
=
$limit
*
$page
;
if
(
!
$sortfield
)
$sortfield
=
"e.label"
;
if
(
!
$sortorder
)
$sortorder
=
"ASC"
;
$sql
=
"SELECT e.rowid as ref, e.label, e.statut, e.lieu, e.address, e.cp, e.ville, e.fk_pays"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"entrepot as e"
;
$sql
.
=
" WHERE 1=1"
;
if
(
$sref
)
{
$sql
.
=
" AND e.ref like '%"
.
$sref
.
"%'"
;
}
if
(
$sall
)
{
$sql
.
=
" AND (e.label like '%"
.
$sall
.
"%' OR e.description like '%"
.
$sall
.
"%' OR e.lieu like '%"
.
$sall
.
"%' OR e.address like '%"
.
$sall
.
"%' OR e.ville like '%"
.
$sall
.
"%')"
;
}
$sql
.
=
" ORDER BY
$sortfield
$sortorder
"
;
$sql
.
=
$db
->
plimit
(
$limit
+
1
,
$offset
);
$result
=
$db
->
query
(
$sql
)
;
$result
=
$db
->
query
(
$sql
)
;
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
@@ -104,5 +113,5 @@ else
$db
->
close
();
llxFooter
(
"<em>Dernière modification
$Date
$ révision
$Revision
$
</em>"
);
llxFooter
(
'$Date$ -
$Revision$
'
);
?>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment