fixes #357
This commit is contained in:
parent
f91fcddcd3
commit
a55f1f0d55
@ -35,6 +35,10 @@ class Controller_admin_orders_content extends Crunchbutton_Controller_Account {
|
|||||||
if ($_REQUEST['restaurant']) {
|
if ($_REQUEST['restaurant']) {
|
||||||
$search['restaurant'] = $_REQUEST['restaurant'];
|
$search['restaurant'] = $_REQUEST['restaurant'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($_REQUEST['community']) {
|
||||||
|
$search['community'] = $_REQUEST['community'];
|
||||||
|
}
|
||||||
|
|
||||||
c::view()->orders = Order::find($search);
|
c::view()->orders = Order::find($search);
|
||||||
|
|
||||||
|
|||||||
@ -300,6 +300,10 @@ class Crunchbutton_Order extends Cana_Table {
|
|||||||
$query .= ' and `order`.id_restaurant="'.$search['restaurant'].'" ';
|
$query .= ' and `order`.id_restaurant="'.$search['restaurant'].'" ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($search['community']) {
|
||||||
|
$query .= ' and `order`.id_community="'.$search['community'].'" ';
|
||||||
|
}
|
||||||
|
|
||||||
if ($search['order']) {
|
if ($search['order']) {
|
||||||
$query .= ' and `order`.id_order="'.$search['order'].'" ';
|
$query .= ' and `order`.id_order="'.$search['order'].'" ';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,6 +53,24 @@
|
|||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="label-sub"></td>
|
||||||
|
<td class="content-sub">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td style="width: 100%"></td>
|
||||||
|
<td class="label-sub">COMMUNITY</td>
|
||||||
|
<td class="content-sub" colspan="2">
|
||||||
|
<select name="community">
|
||||||
|
<option value="" selected>[ All ]</option>
|
||||||
|
<? foreach (Community::q('select * from community order by name') as $community) : ?>
|
||||||
|
<option value="<?=$community->id_community?>"><?=$community->name?></option>
|
||||||
|
<? endforeach ; ?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="6">
|
<td colspan="6">
|
||||||
|
|||||||
@ -721,7 +721,8 @@ App.orders = {
|
|||||||
processor: $('select[name="processor"]').val(),
|
processor: $('select[name="processor"]').val(),
|
||||||
limit: $('input[name="limit"]').val(),
|
limit: $('input[name="limit"]').val(),
|
||||||
dates: $('input[name="date-range"]').val(),
|
dates: $('input[name="date-range"]').val(),
|
||||||
restaurant: $('select[name="restaurant"]').val()
|
restaurant: $('select[name="restaurant"]').val(),
|
||||||
|
community: $('select[name="community"]').val()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
load: function() {
|
load: function() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user