update
This commit is contained in:
@@ -322,8 +322,7 @@ class Order < ApplicationRecord
|
||||
|
||||
def self.search(search)
|
||||
if search
|
||||
# find(:all, :conditions => ['name LIKE ? OR contact_no LIKE ?', "%#{search}%", "%#{search}%"])
|
||||
where("order_id LIKE ?", "%#{search}%")
|
||||
where("order_id LIKE ? OR item_count ='#{search}'","%#{search}%",)
|
||||
else
|
||||
find(:all)
|
||||
end
|
||||
|
||||
@@ -393,7 +393,7 @@ $( document ).ready(function() {
|
||||
$('#pay').text("Pay")
|
||||
$.confirm({
|
||||
title: 'Infomation!',
|
||||
content: 'Thank you !',
|
||||
content: 'Thank you ! '+msg,
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'Ok',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<%= crm_root_path %>">Home</a></li>
|
||||
<li><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="active">
|
||||
<a href="<%= transactions_orders_path %>">Order</a>
|
||||
</li>
|
||||
@@ -9,24 +9,19 @@
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<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">
|
||||
<table class="table table-striped">
|
||||
<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>
|
||||
<th>Order ID </th>
|
||||
<th>Type</th>
|
||||
|
||||
Reference in New Issue
Block a user