Skip to content

Commit

Permalink
Merge pull request #207 from OrifInformatique/fix_item_creation
Browse files Browse the repository at this point in the history
  • Loading branch information
DidierViret committed Dec 21, 2023
2 parents ea99c96 + 6b6f184 commit 4662c66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion orif/stock/Controllers/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public function create($entity_id, $item_common_id = null) {
foreach ($_POST as $key => $value) {
if (substr($key, -4, null) == "tags") {
// Stock links to be created when the item will exist
$linkArray[] = $value;
array_push($linkArray, ...$value);
} else {
if (substr($key, 0, 11) == 'item_common' && is_null($item_common_id)) {
$itemCommonArray[substr($key, 12, null)] = $value;
Expand Down
4 changes: 2 additions & 2 deletions orif/stock/Views/item/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<?= form_label(lang('MY_application.field_group'), 'item_common_group_id'); ?>
</div>
<div class="col-8">
<?= form_dropdown('item_common_item_group_id', $item_groups, isset($item_common_item_group) ? $item_common_item_group : (isset($item_common['item_group_id']) ? $item_common['item_group_id'] : set_value('item_common_item_group_id')), [
<?= form_dropdown('item_common_item_group_id', $item_groups, isset($item_common_item_group_id) ? $item_common_item_group_id : (isset($item_common['item_group_id']) ? $item_common['item_group_id'] : set_value('item_common_item_group_id')), [
'class' => 'form-control',
'id' => 'item_common_group_id'
]);
Expand Down Expand Up @@ -212,7 +212,7 @@
<?= form_label(lang('MY_application.field_remarks'), 'remarks') ?>
</div>
<div class="col-md-8">
<?= form_textarea('remarks', isset($supplier_ref) ? $supplier_ref : (isset($item['remarks']) ? $item['remarks'] : set_value('remarks')), [
<?= form_textarea('remarks', isset($remarks) ? $remarks : (isset($item['remarks']) ? $item['remarks'] : set_value('remarks')), [
'class' => 'form-control',
'rows' => '2'
]) ?>
Expand Down

0 comments on commit 4662c66

Please sign in to comment.