* [FIX] Fixed issue when filtering by customer/category. The select component didn't show the filtered item when returning from another view.

This commit is contained in:
nuxsmin
2017-02-14 11:35:38 +01:00
parent 18983d60c4
commit abbdffa808

View File

@@ -49,7 +49,7 @@
<option value=""><?php echo __('Seleccionar Cliente'); ?></option>
<?php foreach ($customers as $customer): ?>
<option
value="<?php echo $customer->id; ?>" <?php echo ($customer->id === $searchCustomer) ? 'selected' : ''; ?>><?php echo $customer->name; ?></option>
value="<?php echo $customer->id; ?>" <?php echo ((int)$customer->id === $searchCustomer) ? 'selected' : ''; ?>><?php echo $customer->name; ?></option>
<?php endforeach; ?>
</select>
@@ -57,7 +57,7 @@
<option value=""><?php echo __('Seleccionar Categoría'); ?></option>
<?php foreach ($categories as $category): ?>
<option
value="<?php echo $category->id; ?>" <?php echo ($category->id === $searchCategory) ? 'selected' : ''; ?>><?php echo $category->name; ?></option>
value="<?php echo $category->id; ?>" <?php echo ((int)$category->id === $searchCategory) ? 'selected' : ''; ?>><?php echo $category->name; ?></option>
<?php endforeach; ?>
</select>