| '.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).' | '.$langs->trans("AllOrders").' '.$num.' | ';
+ print '| '.$langs->trans("LastCustomerOrders",($num<=$MAXLIST?"":$MAXLIST)).' | '.$langs->trans("AllOrders").' '.$num.' | ';
print ''.img_picto($langs->trans("Statistics"),'stats').' | ';
//if($num2 > 0) print ''.img_picto($langs->trans("CreateInvoiceForThisCustomer"),'object_bill').' | ';
//else print ''.img_picto($langs->trans("NoOrdersToInvoice"),'object_bill').' | ';
diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php
index a35ab95a24a..87e22ac8cc9 100644
--- a/htdocs/core/lib/product.lib.php
+++ b/htdocs/core/lib/product.lib.php
@@ -93,7 +93,7 @@ function product_prepare_head($object)
$head[$h][2] = 'referers';
$h++;
- if($object->isproduct()) // Si produit stockable
+ if ($object->isproduct() || ($object->isservice() && ! empty($conf->global->STOCK_SUPPORTS_SERVICES))) // If physical product we can stock (or service with option)
{
if (! empty($conf->stock->enabled) && $user->rights->stock->lire)
{
diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php
index 97004783ae6..3794fa1e184 100644
--- a/htdocs/fourn/card.php
+++ b/htdocs/fourn/card.php
@@ -364,7 +364,7 @@ if ($object->id > 0)
/*
- * Last orders
+ * Last supplier orders
*/
$orderstatic = new CommandeFournisseur($db);
@@ -409,7 +409,7 @@ if ($object->id > 0)
print ' ';
print '';
- print '| '.$langs->trans("LastOrders",($num<$MAXLIST?"":$MAXLIST)).' | ';
+ print '';
@@ -455,7 +455,7 @@ if ($object->id > 0)
}
/*
- * Last invoices
+ * Last supplier invoices
*/
$MAXLIST=5;
diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang
index 278fb39f0ee..088e239d955 100644
--- a/htdocs/langs/en_US/orders.lang
+++ b/htdocs/langs/en_US/orders.lang
@@ -79,7 +79,9 @@ NoOpenedOrders=No opened orders
NoOtherOpenedOrders=No other opened orders
NoDraftOrders=No draft orders
OtherOrders=Other orders
-LastOrders=Last %s orders
+LastOrders=Last %s customer orders
+LastCustomerOrders=Last %s customer orders
+LastSupplierOrders=Last %s supplier orders
LastModifiedOrders=Last %s modified orders
LastClosedOrders=Last %s closed orders
AllOrders=All orders
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 397f06ce156..c3f8cf5994d 100755
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -3689,7 +3689,7 @@ class Product extends CommonObject
*/
function isproduct()
{
- return ($this->type != Product::TYPE_PRODUCT ? true : false);
+ return ($this->type == Product::TYPE_PRODUCT ? true : false);
}
/**
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index b5639228325..39a81abe86d 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -821,8 +821,9 @@ if (empty($action) && $product->id)
/*
- * Stock detail
+ * Stock detail (by warehouse). Do not go down into batch.
*/
+
print '
';
print '| '.$langs->trans("Warehouse").' | ';
print ''.$langs->trans("NumberOfUnit").' | ';
@@ -870,9 +871,9 @@ if ($resql)
print ''.$entrepotstatic->getNomUrl(1).' | ';
print ''.$obj->reel.($obj->reel<0?' '.img_warning():'').' | ';
// PMP
- print ''.(price2num($product->pmp)?price2num($product->pmp,'MU'):'').' | '; // Ditto : Show PMP from movement or from product
+ print ''.(price2num($product->pmp)?price2num($product->pmp,'MU'):'').' | ';
// Value purchase
- print ''.(price2num($product->pmp)?price(price2num($product->pmp*$obj->reel,'MT')):'').' | '; // Ditto : Show PMP from movement or from product
+ print ''.(price2num($product->pmp)?price(price2num($product->pmp*$obj->reel,'MT')):'').' | ';
// Sell price
print '';
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price,'MU'),1);
@@ -880,13 +881,13 @@ if ($resql)
print ' | ';
// Value sell
print '';
- if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price*$obj->reel,'MT'),1).' | '; // Ditto : Show PMP from movement or from product
+ if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price*$obj->reel,'MT'),1).'';
else print $langs->trans("Variable");
print ' '; ;
$total += $obj->reel;
if (price2num($product->pmp)) $totalwithpmp += $obj->reel;
- $totalvalue = $totalvalue + ($product->pmp*$obj->reel); // Ditto : Show PMP from movement or from product
- $totalvaluesell = $totalvaluesell + ($product->price*$obj->reel); // Ditto : Show PMP from movement or from product
+ $totalvalue = $totalvalue + ($product->pmp*$obj->reel);
+ $totalvaluesell = $totalvaluesell + ($product->price*$obj->reel);
//Batch Detail
if ((! empty($conf->productbatch->enabled)) && $product->hasbatch())
{
|
|