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
6aa10a84
Commit
6aa10a84
authored
9 years ago
by
Philippe Grand
Browse files
Options
Downloads
Plain Diff
Merge branch '3.9' of
https://github.com/Dolibarr/dolibarr.git
into 3.9
parents
44d71c2b
c907ca85
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/commande/orderstoinvoice.php
+9
-7
9 additions, 7 deletions
htdocs/commande/orderstoinvoice.php
htdocs/societe/consumption.php
+84
-44
84 additions, 44 deletions
htdocs/societe/consumption.php
with
93 additions
and
51 deletions
htdocs/commande/orderstoinvoice.php
+
9
−
7
View file @
6aa10a84
...
...
@@ -604,10 +604,11 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
//REF
print
'<input class="flat" size="10" type="text" name="sref" value="'
.
$sref
.
'">'
;
print
'</td>'
;
//print '<td class="liste_titre">';
print
'<td class="liste_titre" align="left">'
;
print
'<input class="flat" type="text" size="10" name="sref_client" value="'
.
$sref_client
.
'">'
;
print
'</td>'
;
//DATE ORDER
print
'<td class="liste_titre" align="center">'
;
print
$period
;
...
...
@@ -619,15 +620,16 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
print
'</td>'
;
//SEARCH BUTTON
print
'<
/td><
td align="right" class="liste_titre">'
;
print
'<td align="right" class="liste_titre">'
;
print
'<input type="image" class="liste_titre" name="button_search" 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>'
;
//ALL/NONE
print
'<td class="liste_titre"
align="center"
>'
;
print
'<td
align="center"
class="liste_titre">'
;
if
(
$conf
->
use_javascript_ajax
)
print
'<a href="#" id="checkall">'
.
$langs
->
trans
(
"All"
)
.
'</a> / <a href="#" id="checknone">'
.
$langs
->
trans
(
"None"
)
.
'</a>'
;
print
'</td>'
;
print
'</
td></
tr>'
;
print
'</tr>'
;
print
'</form>'
;
print
'<form name="orders2invoice" action="orderstoinvoice.php" method="GET">'
;
...
...
@@ -697,7 +699,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
/*
* Boutons actions
*/
print
'<br><div class="center"><input type="checkbox"
checked
name="autocloseorders"> '
.
$langs
->
trans
(
"CloseProcessedOrdersAutomatically"
);
print
'<br><div class="center"><input type="checkbox"
'
.
(
empty
(
$conf
->
global
->
INVOICE_CLOSE_ORDERS_OFF_BY_DEFAULT_FORMASSINVOICE
)
?
' checked="checked"'
:
''
)
.
'
name="autocloseorders"> '
.
$langs
->
trans
(
"CloseProcessedOrdersAutomatically"
);
print
'<div align="right">'
;
print
'<input type="hidden" name="socid" value="'
.
$socid
.
'">'
;
print
'<input type="hidden" name="action" value="create">'
;
...
...
This diff is collapsed.
Click to expand it.
htdocs/societe/consumption.php
+
84
−
44
View file @
6aa10a84
...
...
@@ -42,16 +42,16 @@ $object = new Societe($db);
if
(
$socid
>
0
)
$object
->
fetch
(
$socid
);
// Sort & Order fields
$limit
=
GETPOST
(
'limit'
)
?
GETPOST
(
'limit'
,
'int'
)
:
$conf
->
liste_limit
;
$sortfield
=
GETPOST
(
"sortfield"
,
'alpha'
);
$sortorder
=
GETPOST
(
"sortorder"
,
'alpha'
);
$page
=
GETPOST
(
"page"
,
'int'
);
if
(
$page
==
-
1
)
{
$page
=
0
;
}
$
offset
=
$conf
->
liste_limi
t
*
$page
;
if
(
$page
==
-
1
)
{
$page
=
0
;
}
$offset
=
$limit
*
$page
;
$pageprev
=
$page
-
1
;
$
pagenex
t
=
$page
+
1
;
if
(
!
$sortorder
)
$sortorder
=
'DESC'
;
if
(
!
$sortfield
)
$sortfield
=
'dateprint'
;
$limit
=
GETPOST
(
'limit'
)
?
GETPOST
(
'limit'
,
'int'
)
:
$conf
->
liste_limit
;
// Search fields
$sref
=
GETPOST
(
"sref"
);
...
...
@@ -124,7 +124,7 @@ print '<div class="underbanner clearboth"></div>';
print
'<table class="border" width="100%">'
;
// Alias names (commercial, trademark or alias names)
print
'<tr id="name_alias"><td class="titlefield"
width="25%"
><label for="name_alias_input">'
.
$langs
->
trans
(
'AliasNames'
)
.
'</label></td>'
;
print
'<tr id="name_alias"><td class="titlefield"><label for="name_alias_input">'
.
$langs
->
trans
(
'AliasNames'
)
.
'</label></td>'
;
print
'<td colspan="3">'
.
$object
->
name_alias
.
'</td></tr>'
;
if
(
!
empty
(
$conf
->
global
->
SOCIETE_USEPREFIX
))
// Old not used prefix field
...
...
@@ -306,8 +306,18 @@ if ($month > 0) {
$sql
.
=
" AND "
.
$dateprint
.
" BETWEEN '"
.
$db
->
idate
(
$start
)
.
"' AND '"
.
$db
->
idate
(
$end
)
.
"'"
;
}
if
(
$sref
)
$sql
.
=
" AND "
.
$doc_number
.
" LIKE '%"
.
$sref
.
"%'"
;
if
(
$sprod_fulldescr
)
$sql
.
=
" AND (d.description LIKE '%"
.
$sprod_fulldescr
.
"%' OR p.label LIKE '%"
.
$sprod_fulldescr
.
"%')"
;
if
(
$sprod_fulldescr
)
{
$sql
.
=
" AND (d.description LIKE '%"
.
$db
->
escape
(
$sprod_fulldescr
)
.
"%'"
;
if
(
GETPOST
(
'type_element'
)
!=
'fichinter'
)
$sql
.
=
" OR p.ref LIKE '%"
.
$db
->
escape
(
$sprod_fulldescr
)
.
"%'"
;
if
(
GETPOST
(
'type_element'
)
!=
'fichinter'
)
$sql
.
=
" OR p.label LIKE '%"
.
$db
->
escape
(
$sprod_fulldescr
)
.
"%'"
;
$sql
.
=
")"
;
}
$sql
.
=
$db
->
order
(
$sortfield
,
$sortorder
);
$resql
=
$db
->
query
(
$sql
);
$totalnboflines
=
$db
->
num_rows
(
$resql
);
$sql
.
=
$db
->
plimit
(
$limit
+
1
,
$offset
);
//print $sql;
...
...
@@ -316,49 +326,57 @@ $typeElementString = $form->selectarray("type_element", $elementTypeArray, GETPO
$button
=
'<input type="submit" class="button" name="button_third" value="'
.
dol_escape_htmltag
(
$langs
->
trans
(
"Search"
))
.
'" title="'
.
dol_escape_htmltag
(
$langs
->
trans
(
"Search"
))
.
'">'
;
$param
=
"&sref="
.
$sref
.
"&month="
.
$month
.
"&year="
.
$year
.
"&sprod_fulldescr="
.
$sprod_fulldescr
.
"&socid="
.
$socid
.
"&type_element="
.
$type_element
;
print_barre_liste
(
$langs
->
trans
(
'ProductsIntoElements'
)
.
' '
.
$typeElementString
.
' '
.
$button
,
$page
,
$_SERVER
[
"PHP_SELF"
],
$param
,
$sortfield
,
$sortorder
,
''
,
$num
,
''
,
''
);
if
(
$sql_select
)
{
$resql
=
$db
->
query
(
$sql
);
if
(
!
$resql
)
dol_print_error
(
$db
);
}
print
'<table class="liste" width="100%">'
.
"
\n
"
;
// Titles with sort buttons
print
'<tr class="liste_titre">'
;
print_liste_field_titre
(
$langs
->
trans
(
'Ref'
),
$_SERVER
[
'PHP_SELF'
],
'doc_number'
,
''
,
$param
,
'align="left"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
'Date'
),
$_SERVER
[
'PHP_SELF'
],
'dateprint'
,
''
,
$param
,
'align="center" width="150"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
'Status'
),
$_SERVER
[
'PHP_SELF'
],
'fk_status'
,
''
,
$param
,
'align="center"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
'Product'
),
$_SERVER
[
'PHP_SELF'
],
''
,
''
,
$param
,
'align="left"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
'Quantity'
),
$_SERVER
[
'PHP_SELF'
],
'prod_qty'
,
''
,
$param
,
'align="right"'
,
$sortfield
,
$sortorder
);
print
"</tr>
\n
"
;
// Filters
print
'<tr class="liste_titre">'
;
print
'<td class="liste_titre" align="left">'
;
print
'<input class="flat" type="text" name="sref" size="8" value="'
.
$sref
.
'">'
;
print
'</td>'
;
print
'<td class="liste_titre nowrap">'
;
// date
print
$formother
->
select_month
(
$month
?
$month
:-
1
,
'month'
,
1
);
$formother
->
select_year
(
$year
?
$year
:-
1
,
'year'
,
1
,
20
,
1
);
print
'</td>'
;
print
'<td class="liste_titre" align="center">'
;
print
'</td>'
;
print
'<td class="liste_titre" align="left">'
;
print
'<input class="flat" type="text" name="sprod_fulldescr" size="15" value="'
.
dol_escape_htmltag
(
$sprod_fulldescr
)
.
'">'
;
print
'</td>'
;
print
'<td class="liste_titre" align="right">'
;
print
'<input type="image" class="liste_titre" name="button_search" src="'
.
img_picto
(
$langs
->
trans
(
"Search"
),
'search.png'
,
''
,
''
,
1
)
.
'" value="'
.
dol_escape_htmltag
(
$langs
->
trans
(
"Search"
))
.
'" title="'
.
dol_escape_htmltag
(
$langs
->
trans
(
"Search"
))
.
'">'
;
print
'<input type="image" class="liste_titre" name="button_removefilter" src="'
.
img_picto
(
$langs
->
trans
(
"Search"
),
'searchclear.png'
,
''
,
''
,
1
)
.
'" value="'
.
dol_escape_htmltag
(
$langs
->
trans
(
"resetFilters"
))
.
'" title="'
.
dol_escape_htmltag
(
$langs
->
trans
(
"resetFilters"
))
.
'">'
;
print
'</td>'
;
print
'</tr>'
;
if
(
$sql_select
)
{
$var
=
true
;
$num
=
$db
->
num_rows
(
$resql
);
$param
=
"&socid="
.
$socid
.
"&type_element="
.
$type_element
;
if
(
$limit
>
0
&&
$limit
!=
$conf
->
liste_limit
)
$param
.
=
'&limit='
.
$limit
;
if
(
$sprod_fulldescr
)
$param
.
=
"&sprod_fulldescr="
.
urlencode
(
$sprod_fulldescr
);
if
(
$sref
)
$param
.
=
"&sref="
.
urlencode
(
$sref
);
if
(
$month
)
$param
.
=
"&month="
.
$month
;
if
(
$year
)
$param
.
=
"&year="
.
$year
;
if
(
$optioncss
!=
''
)
$param
.
=
'&optioncss='
.
$optioncss
;
print_barre_liste
(
$langs
->
trans
(
'ProductsIntoElements'
)
.
' '
.
$typeElementString
.
' '
.
$button
,
$page
,
$_SERVER
[
"PHP_SELF"
],
$param
,
$sortfield
,
$sortorder
,
''
,
$num
,
$totalnboflines
,
''
,
0
,
''
,
''
,
$limit
);
print
'<table class="liste" width="100%">'
.
"
\n
"
;
// Titles with sort buttons
print
'<tr class="liste_titre">'
;
print_liste_field_titre
(
$langs
->
trans
(
'Ref'
),
$_SERVER
[
'PHP_SELF'
],
'doc_number'
,
''
,
$param
,
'align="left"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
'Date'
),
$_SERVER
[
'PHP_SELF'
],
'dateprint'
,
''
,
$param
,
'align="center" width="150"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
'Status'
),
$_SERVER
[
'PHP_SELF'
],
'fk_status'
,
''
,
$param
,
'align="center"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
'Product'
),
$_SERVER
[
'PHP_SELF'
],
''
,
''
,
$param
,
'align="left"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
'Quantity'
),
$_SERVER
[
'PHP_SELF'
],
'prod_qty'
,
''
,
$param
,
'align="right"'
,
$sortfield
,
$sortorder
);
print
"</tr>
\n
"
;
// Filters
print
'<tr class="liste_titre">'
;
print
'<td class="liste_titre" align="left">'
;
print
'<input class="flat" type="text" name="sref" size="8" value="'
.
$sref
.
'">'
;
print
'</td>'
;
print
'<td class="liste_titre nowrap">'
;
// date
print
$formother
->
select_month
(
$month
?
$month
:-
1
,
'month'
,
1
);
$formother
->
select_year
(
$year
?
$year
:-
1
,
'year'
,
1
,
20
,
1
);
print
'</td>'
;
print
'<td class="liste_titre" align="center">'
;
print
'</td>'
;
print
'<td class="liste_titre" align="left">'
;
print
'<input class="flat" type="text" name="sprod_fulldescr" size="15" value="'
.
dol_escape_htmltag
(
$sprod_fulldescr
)
.
'">'
;
print
'</td>'
;
print
'<td class="liste_titre" align="right">'
;
print
'<input type="image" class="liste_titre" name="button_search" src="'
.
img_picto
(
$langs
->
trans
(
"Search"
),
'search.png'
,
''
,
''
,
1
)
.
'" value="'
.
dol_escape_htmltag
(
$langs
->
trans
(
"Search"
))
.
'" title="'
.
dol_escape_htmltag
(
$langs
->
trans
(
"Search"
))
.
'">'
;
print
'<input type="image" class="liste_titre" name="button_removefilter" src="'
.
img_picto
(
$langs
->
trans
(
"Search"
),
'searchclear.png'
,
''
,
''
,
1
)
.
'" value="'
.
dol_escape_htmltag
(
$langs
->
trans
(
"resetFilters"
))
.
'" title="'
.
dol_escape_htmltag
(
$langs
->
trans
(
"resetFilters"
))
.
'">'
;
print
'</td>'
;
print
'</tr>'
;
$i
=
0
;
while
((
$objp
=
$db
->
fetch_object
(
$resql
))
&&
$i
<
$conf
->
liste_
limit
)
while
((
$objp
=
$db
->
fetch_object
(
$resql
))
&&
$i
<
min
(
$num
,
$
limit
)
)
{
$documentstatic
->
id
=
$objp
->
doc_id
;
$documentstatic
->
ref
=
$objp
->
doc_number
;
...
...
@@ -532,20 +550,42 @@ if ($sql_select)
print
"</tr>
\n
"
;
$i
++
;
}
if
(
$num
>
$conf
->
liste_limit
)
{
print
"</table>"
;
if
(
$num
>
$limit
)
{
print_barre_liste
(
''
,
$page
,
$_SERVER
[
"PHP_SELF"
],
$param
,
$sortfield
,
$sortorder
,
''
,
$num
);
}
$db
->
free
(
$resql
);
}
else
if
(
empty
(
$type_element
)
||
$type_element
==
-
1
)
{
print_barre_liste
(
$langs
->
trans
(
'ProductsIntoElements'
)
.
' '
.
$typeElementString
.
' '
.
$button
,
$page
,
$_SERVER
[
"PHP_SELF"
],
$param
,
$sortfield
,
$sortorder
,
''
,
$num
,
''
,
''
);
print
'<table class="liste" width="100%">'
.
"
\n
"
;
// Titles with sort buttons
print
'<tr class="liste_titre">'
;
print_liste_field_titre
(
$langs
->
trans
(
'Ref'
),
$_SERVER
[
'PHP_SELF'
],
'doc_number'
,
''
,
$param
,
'align="left"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
'Date'
),
$_SERVER
[
'PHP_SELF'
],
'dateprint'
,
''
,
$param
,
'align="center" width="150"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
'Status'
),
$_SERVER
[
'PHP_SELF'
],
'fk_status'
,
''
,
$param
,
'align="center"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
'Product'
),
$_SERVER
[
'PHP_SELF'
],
''
,
''
,
$param
,
'align="left"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
'Quantity'
),
$_SERVER
[
'PHP_SELF'
],
'prod_qty'
,
''
,
$param
,
'align="right"'
,
$sortfield
,
$sortorder
);
print
"</tr>
\n
"
;
print
'<tr '
.
$bc
[
0
]
.
'><td colspan="5">'
.
$langs
->
trans
(
"SelectElementAndClickRefresh"
)
.
'</td></tr>'
;
print
"</table>"
;
}
else
{
print_barre_liste
(
$langs
->
trans
(
'ProductsIntoElements'
)
.
' '
.
$typeElementString
.
' '
.
$button
,
$page
,
$_SERVER
[
"PHP_SELF"
],
$param
,
$sortfield
,
$sortorder
,
''
,
$num
,
''
,
''
);
print
'<table class="liste" width="100%">'
.
"
\n
"
;
print
'<tr '
.
$bc
[
0
]
.
'><td colspan="5">'
.
$langs
->
trans
(
"FeatureNotYetAvailable"
)
.
'</td></tr>'
;
print
"</table>"
;
}
print
"</table>"
;
print
"</form>"
;
llxFooter
();
...
...
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