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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
7658a86b
Commit
7658a86b
authored
9 years ago
by
Alexis Algoud
Browse files
Options
Downloads
Patches
Plain Diff
NEW show detail per warehouse into reassort
parent
c73f4e5d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/product/reassort.php
+56
-36
56 additions, 36 deletions
htdocs/product/reassort.php
with
56 additions
and
36 deletions
htdocs/product/reassort.php
+
56
−
36
View file @
7658a86b
...
@@ -29,6 +29,7 @@ require '../main.inc.php';
...
@@ -29,6 +29,7 @@ require '../main.inc.php';
require_once
DOL_DOCUMENT_ROOT
.
'/product/class/product.class.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/product/class/product.class.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/core/class/html.formother.class.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/core/class/html.formother.class.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/categories/class/categorie.class.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/categories/class/categorie.class.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/product/class/html.formproduct.class.php'
;
$langs
->
load
(
"products"
);
$langs
->
load
(
"products"
);
$langs
->
load
(
"stocks"
);
$langs
->
load
(
"stocks"
);
...
@@ -242,6 +243,12 @@ if ($resql)
...
@@ -242,6 +243,12 @@ if ($resql)
$param
=
"&tosell=
$tosell
&tobuy=
$tobuy
"
.
(
isset
(
$type
)
?
"&type=
$type
"
:
""
)
.
"&fourn_id=
$fourn_id
&snom=
$snom
&sref=
$sref
"
;
$param
=
"&tosell=
$tosell
&tobuy=
$tobuy
"
.
(
isset
(
$type
)
?
"&type=
$type
"
:
""
)
.
"&fourn_id=
$fourn_id
&snom=
$snom
&sref=
$sref
"
;
$formProduct
=
new
FormProduct
(
$db
);
$formProduct
->
loadWarehouses
();
$warehouses_list
=
$formProduct
->
cache_warehouses
;
$nb_warehouse
=
count
(
$warehouses_list
);
$colspan_warehouse
=
$nb_warehouse
>
1
?
$nb_warehouse
+
1
:
1
;
print
'<table class="tagtable liste'
.
(
$moreforfilter
?
" listwithfilterbefore"
:
""
)
.
'">'
;
print
'<table class="tagtable liste'
.
(
$moreforfilter
?
" listwithfilterbefore"
:
""
)
.
'">'
;
// Lignes des titres
// Lignes des titres
...
@@ -252,6 +259,19 @@ if ($resql)
...
@@ -252,6 +259,19 @@ if ($resql)
print_liste_field_titre
(
$langs
->
trans
(
"StockLimit"
),
$_SERVER
[
"PHP_SELF"
],
"p.seuil_stock_alerte"
,
$param
,
""
,
'align="right"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
"StockLimit"
),
$_SERVER
[
"PHP_SELF"
],
"p.seuil_stock_alerte"
,
$param
,
""
,
'align="right"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
"DesiredStock"
),
$_SERVER
[
"PHP_SELF"
],
"p.desiredstock"
,
$param
,
""
,
'align="right"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
"DesiredStock"
),
$_SERVER
[
"PHP_SELF"
],
"p.desiredstock"
,
$param
,
""
,
'align="right"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
"PhysicalStock"
),
$_SERVER
[
"PHP_SELF"
],
"stock_physique"
,
$param
,
""
,
'align="right"'
,
$sortfield
,
$sortorder
);
print_liste_field_titre
(
$langs
->
trans
(
"PhysicalStock"
),
$_SERVER
[
"PHP_SELF"
],
"stock_physique"
,
$param
,
""
,
'align="right"'
,
$sortfield
,
$sortorder
);
/*
* Details per warehouse
*/
if
(
$nb_warehouse
>
1
)
{
foreach
(
$warehouses_list
as
&
$wh
)
{
print_liste_field_titre
(
$wh
[
'label'
],
''
,
''
,
''
,
''
,
'align="right"'
);
}
}
// TODO Add info of running suppliers/customers orders
// TODO Add info of running suppliers/customers orders
//print_liste_field_titre($langs->trans("TheoreticalStock"),$_SERVER["PHP_SELF"], "stock_theorique",$param,"",'align="right"',$sortfield,$sortorder);
//print_liste_field_titre($langs->trans("TheoreticalStock"),$_SERVER["PHP_SELF"], "stock_theorique",$param,"",'align="right"',$sortfield,$sortorder);
print_liste_field_titre
(
''
);
print_liste_field_titre
(
''
);
...
@@ -278,48 +298,29 @@ if ($resql)
...
@@ -278,48 +298,29 @@ if ($resql)
print
'<td class="liste_titre" align="right"> </td>'
;
print
'<td class="liste_titre" align="right"> </td>'
;
print
'<td class="liste_titre"> </td>'
;
print
'<td class="liste_titre"> </td>'
;
print
'<td class="liste_titre"> </td>'
;
print
'<td class="liste_titre"> </td>'
;
print
'<td class="liste_titre"> </td>'
;
print
'<td class="liste_titre"
colspan="'
.
$colspan_warehouse
.
'"
> </td>'
;
print
'<td class="liste_titre" align="right">'
;
print
'<td class="liste_titre" align="right">'
;
$searchpitco
=
$form
->
showFilterAndCheckAddButtons
(
0
);
$searchpitco
=
$form
->
showFilterAndCheckAddButtons
(
0
);
print
$searchpitco
;
print
$searchpitco
;
print
'</td>'
;
print
'</td>'
;
print
'</tr>'
;
print
'</tr>'
;
$product_static
=
new
Product
(
$db
);
$var
=
True
;
$var
=
True
;
while
(
$i
<
min
(
$num
,
$limit
))
while
(
$i
<
min
(
$num
,
$limit
))
{
{
$objp
=
$db
->
fetch_object
(
$resql
);
$objp
=
$db
->
fetch_object
(
$resql
);
// Multilangs
if
(
!
empty
(
$conf
->
global
->
MAIN_MULTILANGS
))
// si l'option est active
{
$sql
=
"SELECT label"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"product_lang"
;
$sql
.
=
" WHERE fk_product="
.
$objp
->
rowid
;
$sql
.
=
" AND lang='"
.
$langs
->
getDefaultLang
()
.
"'"
;
$sql
.
=
" LIMIT 1"
;
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$objtp
=
$db
->
fetch_object
(
$result
);
if
(
!
empty
(
$objtp
->
label
))
$objp
->
label
=
$objtp
->
label
;
}
}
$var
=!
$var
;
$var
=!
$var
;
print
'<tr '
.
$bc
[
$var
]
.
'><td class="nowrap">'
;
print
'<tr '
.
$bc
[
$var
]
.
'><td class="nowrap">'
;
$product_static
->
ref
=
$objp
->
ref
;
$product
_static
->
id
=
$objp
->
rowid
;
$product
=
new
Product
(
$db
)
;
$product_static
->
label
=
$objp
->
label
;
$product
->
fetch
(
$objp
->
rowid
)
;
$product
_static
->
type
=
$objp
->
fk_product_type
;
$product
->
load_stock
()
;
$product_static
->
entity
=
$objp
->
entity
;
print
$product
_static
->
getNomUrl
(
1
,
''
,
16
);
print
$product
->
getNomUrl
(
1
,
''
,
16
);
//if ($objp->stock_theorique < $objp->seuil_stock_alerte) print ' '.img_warning($langs->trans("StockTooLow"));
//if ($objp->stock_theorique < $objp->seuil_stock_alerte) print ' '.img_warning($langs->trans("StockTooLow"));
print
'</td>'
;
print
'</td>'
;
print
'<td>'
.
$
objp
->
label
.
'</td>'
;
print
'<td>'
.
$
product
->
label
.
'</td>'
;
if
(
!
empty
(
$conf
->
service
->
enabled
)
&&
$type
==
1
)
if
(
!
empty
(
$conf
->
service
->
enabled
)
&&
$type
==
1
)
{
{
...
@@ -335,11 +336,30 @@ if ($resql)
...
@@ -335,11 +336,30 @@ if ($resql)
print
'<td align="right">'
.
$objp
->
desiredstock
.
'</td>'
;
print
'<td align="right">'
.
$objp
->
desiredstock
.
'</td>'
;
print
'<td align="right">'
;
print
'<td align="right">'
;
if
(
$objp
->
seuil_stock_alerte
&&
(
$objp
->
stock_physique
<
$objp
->
seuil_stock_alerte
))
print
img_warning
(
$langs
->
trans
(
"StockTooLow"
))
.
' '
;
if
(
$objp
->
seuil_stock_alerte
&&
(
$objp
->
stock_physique
<
$objp
->
seuil_stock_alerte
))
print
img_warning
(
$langs
->
trans
(
"StockTooLow"
))
.
' '
;
print
$
objp
->
stock_
physique
;
print
$
product
->
stock_
reel
;
print
'</td>'
;
print
'</td>'
;
print
'<td align="right"><a href="'
.
DOL_URL_ROOT
.
'/product/stock/mouvement.php?idproduct='
.
$product_static
->
id
.
'">'
.
$langs
->
trans
(
"Movements"
)
.
'</a></td>'
;
print
'<td align="right" class="nowrap">'
.
$product_static
->
LibStatut
(
$objp
->
statut
,
5
,
0
)
.
'</td>'
;
/*
print
'<td align="right" class="nowrap">'
.
$product_static
->
LibStatut
(
$objp
->
tobuy
,
5
,
1
)
.
'</td>'
;
* Details per warehouse
*/
if
(
$nb_warehouse
>
1
)
{
foreach
(
$warehouses_list
as
&
$wh
)
{
print
'<td align="right">'
;
print
empty
(
$product
->
stock_warehouse
[
$wh
[
'id'
]]
->
real
)
?
'0'
:
$product
->
stock_warehouse
[
$wh
[
'id'
]]
->
real
;
print
'</td>'
;
}
}
print
'<td align="right"><a href="'
.
DOL_URL_ROOT
.
'/product/stock/mouvement.php?idproduct='
.
$product
->
id
.
'">'
.
$langs
->
trans
(
"Movements"
)
.
'</a></td>'
;
print
'<td align="right" class="nowrap">'
.
$product
->
LibStatut
(
$objp
->
statut
,
5
,
0
)
.
'</td>'
;
print
'<td align="right" class="nowrap">'
.
$product
->
LibStatut
(
$objp
->
tobuy
,
5
,
1
)
.
'</td>'
;
print
"</tr>
\n
"
;
print
"</tr>
\n
"
;
$i
++
;
$i
++
;
}
}
...
...
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