diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 14bf6e42fe8..beaa179cb60 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -627,7 +627,7 @@ if ($id > 0) print ''; print ''; - print '
'; + print '
'.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' '.$num.''; print ''; //if($num2 > 0) print ''; //else print ''; 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 '
'.$langs->trans("LastCustomerOrders",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').''.img_picto($langs->trans("CreateInvoiceForThisCustomer"),'object_bill').''.img_picto($langs->trans("NoOrdersToInvoice"),'object_bill').'
'; - print ''; + print '
'.$langs->trans("LastOrders",($num<$MAXLIST?"":$MAXLIST)).'
'; print ''; print ''; print '
'.$langs->trans("LastSupplierOrders",($num<$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').'
'; @@ -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 ''; print ''; @@ -870,9 +871,9 @@ if ($resql) print ''; print ''; // PMP - print ''; // Ditto : Show PMP from movement or from product + print ''; // Value purchase - print ''; // Ditto : Show PMP from movement or from product + print ''; // Sell price print ''; // Value sell print ''; // 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()) {
'.$langs->trans("Warehouse").''.$langs->trans("NumberOfUnit").''.$entrepotstatic->getNomUrl(1).''.$obj->reel.($obj->reel<0?' '.img_warning():'').''.(price2num($product->pmp)?price2num($product->pmp,'MU'):'').''.(price2num($product->pmp)?price2num($product->pmp,'MU'):'').''.(price2num($product->pmp)?price(price2num($product->pmp*$obj->reel,'MT')):'').''.(price2num($product->pmp)?price(price2num($product->pmp*$obj->reel,'MT')):'').''; if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price,'MU'),1); @@ -880,13 +881,13 @@ if ($resql) print ''; - if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price*$obj->reel,'MT'),1).'