Merge branch 'develop' of gitlab.antadis.net:dev-antadis/bebeboutik into develop
This commit is contained in:
commit
dfd057333e
@ -75,6 +75,19 @@ class AdminAntReturnprocess extends AdminTab
|
||||
}
|
||||
}
|
||||
|
||||
if($return_order = Tools::getValue('return_order')) {
|
||||
if($returns = Db::getInstance()->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'order_return`
|
||||
WHERE `id_order` = "'.(int)($return_order).'"
|
||||
')) {
|
||||
if($returns && count($returns) ==1) {
|
||||
header('Location: /adm/index.php?tab=AdminAntReturnprocess&id_order_return='.(int) $returns[0]['id_order_return'].'&updateorder_return&token='.Tools::getValue('token'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET['updateorder_return']))
|
||||
{
|
||||
|
||||
@ -432,9 +445,9 @@ class AdminAntReturnprocess extends AdminTab
|
||||
<div class="panel-content">
|
||||
<form>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="Search for...">
|
||||
<input id="return_order_input" type="text" class="form-control form-control-sm" placeholder="Search for...">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button"><i class="glyphicon glyphicon-search"></i> Search</button>
|
||||
<button class="btn btn-default" id="return_order_submit" type="button"><i class="glyphicon glyphicon-search"></i> Search</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
@ -465,7 +478,7 @@ class AdminAntReturnprocess extends AdminTab
|
||||
<tbody>';
|
||||
foreach ($order_returns as $key => $return) {
|
||||
$html .= '
|
||||
<tr>
|
||||
<tr '.(Tools::getValue('return_order') == $return['id_order']? 'class="info"':'').'>
|
||||
<td><strong>'.$return['id_order_return'].'</strong></td>
|
||||
<td><strong>n° '.$return['id_order'].'</strong></td>
|
||||
<td><strong>'.$return['id_customer'].'</strong></td>
|
||||
@ -497,6 +510,12 @@ class AdminAntReturnprocess extends AdminTab
|
||||
document.location.href = "/adm/index.php?tab=AdminAntReturnprocess&token='.Tools::getValue('token').'&return_number=" + val;
|
||||
}
|
||||
}
|
||||
function getReturnByOrder() {
|
||||
var val = $("#return_order_input").val().trim();
|
||||
if(val != "") {
|
||||
document.location.href = "/adm/index.php?tab=AdminAntReturnprocess&token='.Tools::getValue('token').'&return_order=" + val;
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$("#return_number_input").bind("keydown", function(e) {
|
||||
if(e.which == 13) {
|
||||
@ -504,6 +523,10 @@ class AdminAntReturnprocess extends AdminTab
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$("#return_order_submit").click(function(){
|
||||
getReturnByOrder();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
$html .= $helper->renderScript();
|
||||
|
Loading…
Reference in New Issue
Block a user