diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php
index 88cdb7a8585..39e95239bb2 100644
--- a/htdocs/product/stock/class/entrepot.class.php
+++ b/htdocs/product/stock/class/entrepot.class.php
@@ -1044,6 +1044,8 @@ class Entrepot extends CommonObject
*/
public function getKanbanView($option = '', $arraydata = null)
{
+ global $langs;
+
$selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']);
$return = '
';
@@ -1059,9 +1061,12 @@ class Entrepot extends CommonObject
if (property_exists($this, 'lieu') && (!empty($this->lieu))) {
$return .= '
'.$this->lieu.'';
}
- if (property_exists($this, 'sellvalue') && $this->sellvalue != 0) { // @phan-suppress-current-line PhanUndeclaredProperty
- // @phan-suppress-next-line PhanUndeclaredProperty
- $return .= '
'.price($this->sellvalue).'';
+ if ($arraydata['sellvalue'] != 0) {
+ if ($arraydata['isMultiPrices']) {
+ $return .= '
'.$langs->trans("Variable").' '.$langs->trans('EstimatedStockValueSell').'';
+ } else {
+ $return .= '
'.price($arraydata['sellvalue']).'';
+ }
}
if (method_exists($this, 'getLibStatut')) {
$return .= '
'.$this->getLibStatut(3).'
';
diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php
index 9cc5c3841a8..ad37fdf985c 100644
--- a/htdocs/product/stock/list.php
+++ b/htdocs/product/stock/list.php
@@ -714,7 +714,6 @@ while ($i < $imaxinloop) {
$warehouse->setVarsFromFetchObj($obj);
$warehouse->label = $warehouse->ref;
- $warehouse->sellvalue = $obj->sellvalue;
$object = $warehouse;
@@ -731,7 +730,7 @@ while ($i < $imaxinloop) {
$selected = 1;
}
}
- print $object->getKanbanView('', array('selected' => $selected));
+ print $object->getKanbanView('', array('selected' => $selected, 'sellvalue' => $obj->sellvalue, 'isMultiPrices' => getDolGlobalString('PRODUIT_MULTIPRICES')));
if ($i == ($imaxinloop - 1)) {
print '
';
print '';
diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php
index 93af0c5fe59..04fd0678aa3 100644
--- a/htdocs/resource/card.php
+++ b/htdocs/resource/card.php
@@ -251,7 +251,7 @@ if ($action == 'create' || $object->fetch($id, $ref) > 0) {
print '$(document).ready(function () {
$("#selectcountry_id").change(function() {
console.log("selectcountry_id change");
- document.formresource.action.value="create";
+ document.formresource.action.value="' . ($action == 'create' ? 'create' : 'edit') . '";
document.formresource.submit();
});
});';
diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php
index 1a99d1a8dd5..ce5d2b0d0d1 100644
--- a/htdocs/resource/list.php
+++ b/htdocs/resource/list.php
@@ -459,6 +459,12 @@ print '