Compact the method just a little
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
19fb45f488
commit
9abf3029ef
1 changed files with 3 additions and 6 deletions
|
@ -413,15 +413,12 @@ class Asset extends Depreciable
|
|||
return $this->rules;
|
||||
}
|
||||
|
||||
public function customFieldsForCheckinCheckout($type) {
|
||||
public function customFieldsForCheckinCheckout($checkin_checkout) {
|
||||
// Check to see if any of the custom fields were included on the form and if they have any values
|
||||
if (($this->model) && ($this->model->fieldset) && ($this->model->fieldset->fields)) {
|
||||
foreach ($this->model->fieldset->fields as $field) {
|
||||
|
||||
if ($field->{$type} == 1) {
|
||||
if (request()->has($field->db_column)) {
|
||||
$this->{$field->db_column} = request()->get($field->db_column);
|
||||
}
|
||||
if (($field->{$checkin_checkout} == 1) && (request()->has($field->db_column))){
|
||||
$this->{$field->db_column} = request()->get($field->db_column);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue