];
protected $fillable = ['company'];
+ public $timestamps = false;
protected $_optionsForUserInfo = [];
public function setFields()
{
+ parent::setFields();
+
$tabOrder = 'Commande';
$this->addField(['name' => 'company',
'column' => true,
]);
- $this->addField(['name' => 'id',
- 'label' => 'Commande #',
- 'type' => 'Text',
- 'attributes' => [
- 'readonly'=>'readonly',
- 'disabled'=>'disabled',
- ],
- ]);
-
foreach ($this->fields as $fields) {
if ($fields['name'] === 'products') {
$fields = ['name' => 'products',
'type' => 'Table',
'columns' => ['id' => '#', 'ref' => 'Référence options', 'reference' => 'Référence produit', 'name' => 'Nom de produit', 'quantity' => 'Quantité'],
'tab' => $tabOrder];
-
$this->addField($fields);
}
if ($fields['name'] === 'total') {
$fields['tab'] = $tabOrder;
-
$this->addField($fields);
}
-
}
$this->addField(['name' => 'status',
$this->addField($fields);
}
- parent::setFields();
+ $this->addField(['name' => 'id',
+ 'label' => 'Commande #',
+ 'type' => 'Text',
+ 'attributes' => [
+ 'readonly'=>'readonly',
+ 'disabled'=>'disabled',
+ ],
+ ]);
}
public static function getOptionValue($key) {