diff --git a/htdocs/product/price.php b/htdocs/product/price.php
index bb4690224e8..516a4be9fbd 100644
--- a/htdocs/product/price.php
+++ b/htdocs/product/price.php
@@ -351,28 +351,29 @@ print '';
// MultiPrix
if (! empty($conf->global->PRODUIT_MULTIPRICES))
{
+ // Price and min price are variable (depends on level of company).
if (! empty($socid))
{
$soc = new Societe($db);
$soc->id = $socid;
$soc->fetch($socid);
+ // Selling price
print '
' . $langs->trans("SellingPrice") . ' ';
-
+ print '';
if ($object->multiprices_base_type["$soc->price_level"] == 'TTC') {
- print ' ' . price($object->multiprices_ttc ["$soc->price_level"]);
+ print price($object->multiprices_ttc["$soc->price_level"]);
} else {
- print ' ' . price($object->multiprices ["$soc->price_level"]);
+ print price($object->multiprices["$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 {
print ' ' . $langs->trans($object->price_base_type);
}
print ' ';
- // Prix mini
+ // Price min
print '' . $langs->trans("MinPrice") . ' ';
if ($object->multiprices_base_type["$soc->price_level"] == 'TTC')
{
@@ -390,7 +391,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES))
for($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i ++)
{
// TVA
- if ($i == 1) // We show only price for level 1
+ if ($i == 1) // We show only vat for level 1
{
print ' ' . $langs->trans("VATRate") . ' ' . vatrate($object->multiprices_tva_tx [1], true) . ' ';
}
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index 13a798548d5..1efc3924aa7 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -31,6 +31,7 @@
require '../../main.inc.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.'/fourn/class/fournisseur.product.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.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';
@@ -310,6 +311,9 @@ if ($action == 'updateline' && GETPOST('save') == $langs->trans('Save'))
header("Location: product.php?id=".$id);
exit;
}
+
+
+
/*
* View
*/
@@ -379,13 +383,50 @@ if ($id > 0 || $ref)
print ''.price($product->pmp).' '.$langs->trans("HT").' ';
print '';
- // Sell price
- print ''.$langs->trans("SellPriceMin").' ';
- print '';
- if (empty($conf->global->PRODUIT_MULTIPRICES)) print price($product->price).' '.$langs->trans("HT");
- else print $langs->trans("Variable");
- print ' ';
- print ' ';
+ // Minimum Price
+ print ''.$langs->trans("BuyingPriceMin").' ';
+ print '';
+ $product_fourn = new ProductFournisseur($db);
+ if ($product_fourn->find_min_price_product_fournisseur($product->id) > 0)
+ {
+ if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur();
+ else print $langs->trans("NotDefined");
+ }
+ print ' ';
+
+ $object = $product;
+ if (empty($conf->global->PRODUIT_MULTIPRICES))
+ {
+ // Price
+ print '' . $langs->trans("SellingPrice") . ' ';
+ 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 ' ';
+
+ // Price minimum
+ print '' . $langs->trans("MinPrice") . ' ';
+ 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 ' ';
+ }
+ else
+ {
+ // Price
+ print '' . $langs->trans("SellingPrice") . ' ';
+ print $langs->trans("Variable");
+ print ' ';
+
+ // Price minimum
+ print '' . $langs->trans("MinPrice") . ' ';
+ print $langs->trans("Variable");
+ print ' ';
+ }
// Stock
print ''.$form->editfieldkey("StockLimit",'stocklimit',$product->seuil_stock_alerte,$product,$user->rights->produit->creer).' ';
diff --git a/test/soapui/Dolibarr-soapui-project.xml b/test/soapui/Dolibarr-soapui-project.xml
index 1ffd1ad0e3c..c81b1ac8e1f 100755
--- a/test/soapui/Dolibarr-soapui-project.xml
+++ b/test/soapui/Dolibarr-soapui-project.xml
@@ -27446,4 +27446,374 @@
-]]>
\ No newline at end of file
+]]>http://localhostalias/dolibarr_3.7/webservices/server_order.php?wsdl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ WS to get a particular invoice
+
+
+
+
+ WS to get all orders of a third party
+
+
+
+
+ WS to create an order
+
+
+
+
+ WS to update an order
+
+
+
+
+ WS to valid an order
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]]> http://schemas.xmlsoap.org/wsdl/ http://localhostalias/dolibarr_3.6/webservices/server_order.php http://localhostalias/dolibarr_3.7/webservices/server_order.php UTF-8 http://localhostalias/dolibarr_3.7/webservices/server_order.php
+
+
+
+
+
+ dolibarrkey
+ aaa
+ admin
+ admin
+
+
+
+
+
+ 123ext
+ ?
+ 1
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+
+
+
+
+
+]]> UTF-8 http://localhostalias/dolibarr_3.7/webservices/server_order.php
+
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+ ?
+
+ ?
+ [?]
+ ?
+
+
+]]> UTF-8 http://localhostalias/dolibarr_3.7/webservices/server_order.php
+
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+ ?
+
+ ?
+
+
+]]> UTF-8 http://localhostalias/dolibarr_3.7/webservices/server_order.php
+
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+ ?
+
+ ?
+
+
+]]> UTF-8 http://localhostalias/dolibarr_3.7/webservices/server_order.php
+
+
+
+
+
+ dolibarrkey
+
+ admin
+ admin
+
+
+
+
+ 6
+0
+ 2
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+
+
+
+]]>
\ No newline at end of file