This commit is contained in:
Laurent Destailleur 2022-06-23 13:07:53 +02:00
parent 5627d7ff9d
commit 3179fd13d8

View File

@ -32,6 +32,8 @@ class ActionsCardProduct
public $canvas; public $canvas;
public $card; public $card;
public $object;
//! Template container //! Template container
public $tpl = array(); public $tpl = array();
@ -98,13 +100,13 @@ class ActionsCardProduct
$this->tpl['canvas'] = $this->canvas; $this->tpl['canvas'] = $this->canvas;
// id // id
$this->tpl['id'] = $this->id; $this->tpl['id'] = $this->object->id;
// Ref // Ref
$this->tpl['ref'] = $this->ref; $this->tpl['ref'] = $this->object->ref;
// Label // Label
$this->tpl['label'] = $this->label; $this->tpl['label'] = $this->object->label;
// Description // Description
$this->tpl['description'] = nl2br($this->description); $this->tpl['description'] = nl2br($this->description);
@ -113,12 +115,12 @@ class ActionsCardProduct
$this->tpl['status'] = $this->object->getLibStatut(2); $this->tpl['status'] = $this->object->getLibStatut(2);
// Note // Note
$this->tpl['note'] = nl2br($this->note); $this->tpl['note'] = nl2br($this->object->note_private);
if ($action == 'create') { if ($action == 'create') {
// Price // Price
$this->tpl['price'] = $this->price; $this->tpl['price'] = $this->object->price;
$this->tpl['price_min'] = $this->price_min; $this->tpl['price_min'] = $this->object->price_min;
$this->tpl['price_base_type'] = $form->selectPriceBaseType($this->price_base_type, "price_base_type"); $this->tpl['price_base_type'] = $form->selectPriceBaseType($this->price_base_type, "price_base_type");
// VAT // VAT
@ -149,7 +151,7 @@ class ActionsCardProduct
$this->tpl['label'] = $this->object->label; $this->tpl['label'] = $this->object->label;
$this->tpl['id'] = $this->object->id; $this->tpl['id'] = $this->object->id;
$this->tpl['type'] = $this->object->type; $this->tpl['type'] = $this->object->type;
$this->tpl['note'] = $this->object->note; $this->tpl['note'] = $this->object->note_private;
$this->tpl['seuil_stock_alerte'] = $this->object->seuil_stock_alerte; $this->tpl['seuil_stock_alerte'] = $this->object->seuil_stock_alerte;
if ($action == 'create') { if ($action == 'create') {
@ -169,8 +171,8 @@ class ActionsCardProduct
$statutarray = array('1' => $langs->trans("ProductStatusOnBuy"), '0' => $langs->trans("ProductStatusNotOnBuy")); $statutarray = array('1' => $langs->trans("ProductStatusOnBuy"), '0' => $langs->trans("ProductStatusNotOnBuy"));
$this->tpl['status_buy'] = $form->selectarray('statut_buy', $statutarray, $this->object->status_buy); $this->tpl['status_buy'] = $form->selectarray('statut_buy', $statutarray, $this->object->status_buy);
$this->tpl['description'] = $this->description; $this->tpl['description'] = $this->object->description;
$this->tpl['note'] = $this->note; $this->tpl['note'] = $this->object->note;
// Finished // Finished
$statutarray = array('1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial")); $statutarray = array('1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial"));