update
This commit is contained in:
@@ -322,8 +322,7 @@ class Order < ApplicationRecord
|
|||||||
|
|
||||||
def self.search(search)
|
def self.search(search)
|
||||||
if search
|
if search
|
||||||
# find(:all, :conditions => ['name LIKE ? OR contact_no LIKE ?', "%#{search}%", "%#{search}%"])
|
where("order_id LIKE ? OR item_count ='#{search}'","%#{search}%",)
|
||||||
where("order_id LIKE ?", "%#{search}%")
|
|
||||||
else
|
else
|
||||||
find(:all)
|
find(:all)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -393,7 +393,7 @@ $( document ).ready(function() {
|
|||||||
$('#pay').text("Pay")
|
$('#pay').text("Pay")
|
||||||
$.confirm({
|
$.confirm({
|
||||||
title: 'Infomation!',
|
title: 'Infomation!',
|
||||||
content: 'Thank you !',
|
content: 'Thank you ! '+msg,
|
||||||
buttons: {
|
buttons: {
|
||||||
confirm: {
|
confirm: {
|
||||||
text: 'Ok',
|
text: 'Ok',
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li><a href="<%= crm_root_path %>">Home</a></li>
|
<li><a href="<%= dashboard_path %>">Home</a></li>
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a href="<%= transactions_orders_path %>">Order</a>
|
<a href="<%= transactions_orders_path %>">Order</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -9,24 +9,19 @@
|
|||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div class="main-box-body clearfix">
|
<div class="main-box-body clearfix">
|
||||||
|
<%= form_tag transactions_orders_path, :method => :get do %>
|
||||||
|
<div class="input-append col-md-4 form-group pull-right">
|
||||||
|
<input type="text" name="filter" placeholder="Order ID" class="form-control input-md col-md-8">
|
||||||
|
<button type="submit" class="btn btn-primary btn-md">Search</button>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
|
||||||
<td colspan="6">
|
|
||||||
<%= form_tag transactions_orders_path, :method => :get do %>
|
|
||||||
<div class="input-append form-group pull-right">
|
|
||||||
<input type="text" name="filter" placeholder="Order ID" class="form-control input-sm col-md-8">
|
|
||||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Order ID </th>
|
<th>Order ID </th>
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
|
|||||||
Reference in New Issue
Block a user