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 ''."\n"; // Fields title search print ''; +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} if (!empty($arrayfields['t.ref']['checked'])) { print ''; +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} if (!empty($arrayfields['t.ref']['checked'])) { // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['t.ref']['label'], $_SERVER["PHP_SELF"], "t.ref", "", $param, "", $sortfield, $sortorder); @@ -598,6 +607,22 @@ while ($i < $imaxinloop) { print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + if (!empty($arrayfields['t.ref']['checked'])) { print ''; if (!$i) {
'; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print ''; print ''; @@ -532,6 +538,9 @@ $totalarray['nbfield'] = 0; // Fields title label print '
'; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ''.$objectstatic->getNomUrl(5).'