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
1d2c8bbd
Commit
1d2c8bbd
authored
10 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fixed: Prices visible into stock tab.
parent
be4c5cf9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/product/price.php
+8
-7
8 additions, 7 deletions
htdocs/product/price.php
htdocs/product/stock/product.php
+48
-7
48 additions, 7 deletions
htdocs/product/stock/product.php
test/soapui/Dolibarr-soapui-project.xml
+371
-1
371 additions, 1 deletion
test/soapui/Dolibarr-soapui-project.xml
with
427 additions
and
15 deletions
htdocs/product/price.php
+
8
−
7
View file @
1d2c8bbd
...
@@ -351,28 +351,29 @@ print '</tr>';
...
@@ -351,28 +351,29 @@ print '</tr>';
// MultiPrix
// MultiPrix
if
(
!
empty
(
$conf
->
global
->
PRODUIT_MULTIPRICES
))
if
(
!
empty
(
$conf
->
global
->
PRODUIT_MULTIPRICES
))
{
{
// Price and min price are variable (depends on level of company).
if
(
!
empty
(
$socid
))
if
(
!
empty
(
$socid
))
{
{
$soc
=
new
Societe
(
$db
);
$soc
=
new
Societe
(
$db
);
$soc
->
id
=
$socid
;
$soc
->
id
=
$socid
;
$soc
->
fetch
(
$socid
);
$soc
->
fetch
(
$socid
);
// Selling price
print
'<tr><td>'
.
$langs
->
trans
(
"SellingPrice"
)
.
'</td>'
;
print
'<tr><td>'
.
$langs
->
trans
(
"SellingPrice"
)
.
'</td>'
;
print
'<td>'
;
if
(
$object
->
multiprices_base_type
[
"
$soc->price_level
"
]
==
'TTC'
)
{
if
(
$object
->
multiprices_base_type
[
"
$soc->price_level
"
]
==
'TTC'
)
{
print
'<td>'
.
price
(
$object
->
multiprices_ttc
[
"
$soc->price_level
"
]);
print
price
(
$object
->
multiprices_ttc
[
"
$soc->price_level
"
]);
}
else
{
}
else
{
print
'<td>'
.
price
(
$object
->
multiprices
[
"
$soc->price_level
"
]);
print
price
(
$object
->
multiprices
[
"
$soc->price_level
"
]);
}
}
if
(
$object
->
multiprices_base_type
[
"
$soc->price_level
"
])
{
if
(
$object
->
multiprices_base_type
[
"
$soc->price_level
"
])
{
print
' '
.
$langs
->
trans
(
$object
->
multiprices_base_type
[
"
$soc->price_level
"
]);
print
' '
.
$langs
->
trans
(
$object
->
multiprices_base_type
[
"
$soc->price_level
"
]);
}
else
{
}
else
{
print
' '
.
$langs
->
trans
(
$object
->
price_base_type
);
print
' '
.
$langs
->
trans
(
$object
->
price_base_type
);
}
}
print
'</td></tr>'
;
print
'</td></tr>'
;
// Pri
x
min
i
// Pri
ce
min
print
'<tr><td>'
.
$langs
->
trans
(
"MinPrice"
)
.
'</td><td>'
;
print
'<tr><td>'
.
$langs
->
trans
(
"MinPrice"
)
.
'</td><td>'
;
if
(
$object
->
multiprices_base_type
[
"
$soc->price_level
"
]
==
'TTC'
)
if
(
$object
->
multiprices_base_type
[
"
$soc->price_level
"
]
==
'TTC'
)
{
{
...
@@ -390,7 +391,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES))
...
@@ -390,7 +391,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES))
for
(
$i
=
1
;
$i
<=
$conf
->
global
->
PRODUIT_MULTIPRICES_LIMIT
;
$i
++
)
for
(
$i
=
1
;
$i
<=
$conf
->
global
->
PRODUIT_MULTIPRICES_LIMIT
;
$i
++
)
{
{
// TVA
// TVA
if
(
$i
==
1
)
// We show only
price
for level 1
if
(
$i
==
1
)
// We show only
vat
for level 1
{
{
print
'<tr><td>'
.
$langs
->
trans
(
"VATRate"
)
.
'</td><td>'
.
vatrate
(
$object
->
multiprices_tva_tx
[
1
],
true
)
.
'</td></tr>'
;
print
'<tr><td>'
.
$langs
->
trans
(
"VATRate"
)
.
'</td><td>'
.
vatrate
(
$object
->
multiprices_tva_tx
[
1
],
true
)
.
'</td></tr>'
;
}
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/product/stock/product.php
+
48
−
7
View file @
1d2c8bbd
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
require
'../../main.inc.php'
;
require
'../../main.inc.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/product/stock/class/entrepot.class.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/product/stock/class/entrepot.class.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
.
'/fourn/class/fournisseur.product.class.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/core/lib/product.lib.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/core/lib/product.lib.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/product/class/html.formproduct.class.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/product/class/html.formproduct.class.php'
;
if
(
!
empty
(
$conf
->
productbatch
->
enabled
))
require_once
DOL_DOCUMENT_ROOT
.
'/product/class/productbatch.class.php'
;
if
(
!
empty
(
$conf
->
productbatch
->
enabled
))
require_once
DOL_DOCUMENT_ROOT
.
'/product/class/productbatch.class.php'
;
...
@@ -310,6 +311,9 @@ if ($action == 'updateline' && GETPOST('save') == $langs->trans('Save'))
...
@@ -310,6 +311,9 @@ if ($action == 'updateline' && GETPOST('save') == $langs->trans('Save'))
header
(
"Location: product.php?id="
.
$id
);
header
(
"Location: product.php?id="
.
$id
);
exit
;
exit
;
}
}
/*
/*
* View
* View
*/
*/
...
@@ -379,13 +383,50 @@ if ($id > 0 || $ref)
...
@@ -379,13 +383,50 @@ if ($id > 0 || $ref)
print
'<td>'
.
price
(
$product
->
pmp
)
.
' '
.
$langs
->
trans
(
"HT"
)
.
'</td>'
;
print
'<td>'
.
price
(
$product
->
pmp
)
.
' '
.
$langs
->
trans
(
"HT"
)
.
'</td>'
;
print
'</tr>'
;
print
'</tr>'
;
// Sell price
// Minimum Price
print
'<tr><td>'
.
$langs
->
trans
(
"SellPriceMin"
)
.
'</td>'
;
print
'<tr><td>'
.
$langs
->
trans
(
"BuyingPriceMin"
)
.
'</td>'
;
print
'<td>'
;
print
'<td colspan="2">'
;
if
(
empty
(
$conf
->
global
->
PRODUIT_MULTIPRICES
))
print
price
(
$product
->
price
)
.
' '
.
$langs
->
trans
(
"HT"
);
$product_fourn
=
new
ProductFournisseur
(
$db
);
else
print
$langs
->
trans
(
"Variable"
);
if
(
$product_fourn
->
find_min_price_product_fournisseur
(
$product
->
id
)
>
0
)
print
'</td>'
;
{
print
'</tr>'
;
if
(
$product_fourn
->
product_fourn_price_id
>
0
)
print
$product_fourn
->
display_price_product_fournisseur
();
else
print
$langs
->
trans
(
"NotDefined"
);
}
print
'</td></tr>'
;
$object
=
$product
;
if
(
empty
(
$conf
->
global
->
PRODUIT_MULTIPRICES
))
{
// Price
print
'<tr><td>'
.
$langs
->
trans
(
"SellingPrice"
)
.
'</td><td>'
;
if
(
$object
->
price_base_type
==
'TTC'
)
{
print
price
(
$object
->
price_ttc
)
.
' '
.
$langs
->
trans
(
$object
->
price_base_type
);
}
else
{
print
price
(
$object
->
price
)
.
' '
.
$langs
->
trans
(
$object
->
price_base_type
);
}
print
'</td></tr>'
;
// Price minimum
print
'<tr><td>'
.
$langs
->
trans
(
"MinPrice"
)
.
'</td><td>'
;
if
(
$object
->
price_base_type
==
'TTC'
)
{
print
price
(
$object
->
price_min_ttc
)
.
' '
.
$langs
->
trans
(
$object
->
price_base_type
);
}
else
{
print
price
(
$object
->
price_min
)
.
' '
.
$langs
->
trans
(
$object
->
price_base_type
);
}
print
'</td></tr>'
;
}
else
{
// Price
print
'<tr><td>'
.
$langs
->
trans
(
"SellingPrice"
)
.
'</td><td>'
;
print
$langs
->
trans
(
"Variable"
);
print
'</td></tr>'
;
// Price minimum
print
'<tr><td>'
.
$langs
->
trans
(
"MinPrice"
)
.
'</td><td>'
;
print
$langs
->
trans
(
"Variable"
);
print
'</td></tr>'
;
}
// Stock
// Stock
print
'<tr><td>'
.
$form
->
editfieldkey
(
"StockLimit"
,
'stocklimit'
,
$product
->
seuil_stock_alerte
,
$product
,
$user
->
rights
->
produit
->
creer
)
.
'</td><td colspan="2">'
;
print
'<tr><td>'
.
$form
->
editfieldkey
(
"StockLimit"
,
'stocklimit'
,
$product
->
seuil_stock_alerte
,
$product
,
$user
->
rights
->
produit
->
creer
)
.
'</td><td colspan="2">'
;
...
...
This diff is collapsed.
Click to expand it.
test/soapui/Dolibarr-soapui-project.xml
+
371
−
1
View file @
1d2c8bbd
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