crm customer chagnes
This commit is contained in:
@@ -70,8 +70,8 @@ class Crm::CustomersController < BaseCrmController
|
||||
# GET /crm/customers/1
|
||||
# GET /crm/customers/1.json
|
||||
def show
|
||||
@orders = Order.where("customer_id=?", params[:id])
|
||||
@sales = Sale.where("customer_id=?", params[:id])
|
||||
@orders = Order.where("customer_id=?", params[:id]).limit(20)
|
||||
@sales = Sale.where("customer_id=?", params[:id]).limit(20)
|
||||
|
||||
if @orders
|
||||
@order_items = []
|
||||
|
||||
@@ -97,7 +97,7 @@ class Origami::OrderReservationController < BaseOrigamiController
|
||||
end
|
||||
|
||||
def get_order_info
|
||||
order_reservation = OrderReservation.where("status = 'new' OR status='accepted' OR status='send_to_kitchen' OR status = 'ready_to_delivery'").count()
|
||||
order_reservation = OrderReservation.where("status = 'new'").count()
|
||||
render :json => order_reservation
|
||||
end
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class Booking < ApplicationRecord
|
||||
joins(" LEFT JOIN dining_facilities df ON df.id=bookings.dining_facility_id")
|
||||
.where("booking_id LIKE ? OR checkin_by LIKE ? OR booking_status LIKE? OR checkout_by LIKE? OR sale_id ='#{filter}' OR df.name LIKE ?","%#{filter}%","%#{filter}%","%#{filter}%","%#{filter}%","%#{filter}%")
|
||||
end
|
||||
|
||||
.order("sale_id DESC")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -336,7 +336,7 @@ class Customer < ApplicationRecord
|
||||
def self.search(search)
|
||||
if search
|
||||
# find(:all, :conditions => ['name LIKE ? OR contact_no LIKE ?', "%#{search}%", "%#{search}%"])
|
||||
where("name LIKE ? OR contact_no LIKE ? OR card_no LIKE ? OR paypar_account_no ='#{search}'", "%#{search}%", "%#{search}%", "%#{search}%",)
|
||||
where("name LIKE ? OR customer_type OR contact_no LIKE ? OR card_no LIKE ? OR DATE_FORMAT(date_of_birth,'%Y-%m-%d') LIKE ? OR nrc_no LIKE ? OR gender LIKE ? OR paypar_account_no ='#{search}'", "%#{search}%", "%#{search}%", "%#{search}%", "%#{search}%", "%#{search}%", "%#{search}%", "%#{search}%")
|
||||
else
|
||||
find(:all)
|
||||
end
|
||||
|
||||
@@ -734,7 +734,7 @@ class Sale < ApplicationRecord
|
||||
where("receipt_no LIKE ? OR cashier_name LIKE ? OR sale_status ='#{filter}' and shift_sale_id = ?","%#{filter}%","%#{filter}%",shift.id)
|
||||
end
|
||||
end
|
||||
|
||||
.order("sale_id DESC")
|
||||
end
|
||||
|
||||
def self.search_credit_sales(customer,filter,from,to,order_source="")
|
||||
|
||||
@@ -90,6 +90,31 @@
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12" align="right">
|
||||
<button type="button" class="btn btn-md bg-blue btn-info-full next-step">Next</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" role="tabpanel" id="complete">
|
||||
<!-- <h4>Step 2</h4> -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label><%= t("views.right_panel.detail.customer_photo") %></label>
|
||||
<div class="panel padding-10">
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
||||
<% else %>
|
||||
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label for="customer[gender]" class="control-label"><%= t("views.right_panel.detail.gender") %> :</label><br>
|
||||
@@ -127,31 +152,6 @@
|
||||
<%= f.input :address, :class => "form-control address" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12" align="right">
|
||||
<button type="button" class="btn btn-md bg-blue btn-info-full next-step">Next</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" role="tabpanel" id="complete">
|
||||
<!-- <h4>Step 2</h4> -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label><%= t("views.right_panel.detail.customer_photo") %></label>
|
||||
<div class="panel padding-10">
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
||||
<% else %>
|
||||
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label><%= t("views.right_panel.detail.select_customer_type") %></label>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
|
||||
<div class="page-header">
|
||||
<!-- <div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t :crm %></li>
|
||||
<li class="breadcrumb-item active"><%= t :crm %></li> -->
|
||||
<!-- <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> -->
|
||||
<span class="float-right">
|
||||
<!-- <span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<li class="breadcrumb-item active">CRM</li>
|
||||
<!-- <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> -->
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
<%= link_to 'Back', crm_customers_path %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -34,6 +34,7 @@
|
||||
<div class="tab-content" style="min-height:670px; max-height:670px; ">
|
||||
|
||||
<div class="tab-pane active" id="customer" role="tabpanel" style="min-height:670px; max-height:670px; ">
|
||||
<h5><%= t :customer_details %></h5>
|
||||
<div class="table-responsive">
|
||||
<br><br>
|
||||
<table class="table table-striped">
|
||||
@@ -78,6 +79,7 @@
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<h6><%= t("views.right_panel.detail.paymal_transactions ") %></h6>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -69,13 +69,13 @@
|
||||
</a>
|
||||
</p>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<p class="waves-effect waves-block p-l-30 m-b-5 team_viewer">
|
||||
<i class="material-icons font-7 logout_icon shopinfo">touch_app</i>
|
||||
<span class="font-15 shopinfo" >Team Viewer</span>
|
||||
</p>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<!-- <p class="delete waves-effect waves-block p-l-30 m-b-5" data-ref="<%=logout_path%>" data-method="delete">
|
||||
<i class="material-icons font-10 logout_icon">exit_to_app</i>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<div class="container-fluid">
|
||||
<!-- <div class="container-fluid">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item active">CRM</li>
|
||||
<li class="breadcrumb-item active">CRM</li> -->
|
||||
<!-- <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> -->
|
||||
<span class="float-right">
|
||||
<!-- <span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<div class="row">
|
||||
@@ -56,6 +56,7 @@
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><%= t("views.right_panel.detail.sr_no") %></th>
|
||||
<th><%= t :customer %> <%= t("views.right_panel.detail.type") %></th>
|
||||
<th><%= t("views.right_panel.detail.name") %></th>
|
||||
<th><%= t("views.right_panel.detail.card_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.membership_type") %></th>
|
||||
@@ -80,6 +81,7 @@
|
||||
-
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= crm_customer.customer_type rescue '-' %></td>
|
||||
<td><%= crm_customer.name %></td>
|
||||
<td><%= crm_customer.card_no rescue '-' %></td>
|
||||
<td>
|
||||
@@ -214,6 +216,31 @@
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12" align="right">
|
||||
<button type="button" class="btn btn-md bg-blue btn-info-full next-step">Next</button>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- .end-of-step1 -->
|
||||
<div class="tab-pane" role="tabpanel" id="complete">
|
||||
<!-- <h4>Step 2</h4> -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label><%= t("views.right_panel.detail.customer_photo") %></label>
|
||||
<div class="panel padding-10">
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
||||
<% else %>
|
||||
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label for="customer[gender]" class="control-label"><%= t("views.right_panel.detail.gender") %> :</label><br>
|
||||
@@ -251,31 +278,6 @@
|
||||
<%= f.input :address, :class => "form-control address" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12" align="right">
|
||||
<button type="button" class="btn btn-md bg-blue btn-info-full next-step">Next</button>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- .end-of-step1 -->
|
||||
<div class="tab-pane" role="tabpanel" id="complete">
|
||||
<!-- <h4>Step 2</h4> -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label><%= t("views.right_panel.detail.customer_photo") %></label>
|
||||
<div class="panel padding-10">
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
||||
<% else %>
|
||||
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label><%= t("views.right_panel.detail.select_customer_type") %></label>
|
||||
|
||||
@@ -500,6 +500,7 @@ en:
|
||||
transaction_fee: "Transaction Fee"
|
||||
checked_by: "Checked By"
|
||||
order_source: "Order Source"
|
||||
paymal_transactions: "Paymal Transactions"
|
||||
|
||||
code_txt: "code "
|
||||
charge_txt: "charge"
|
||||
|
||||
@@ -494,6 +494,7 @@ mm:
|
||||
transaction_fee: "Transaction Fee"
|
||||
checked_by: "Checked By"
|
||||
order_source: "Order Source"
|
||||
paymal_transactions: "Paymal Transactions"
|
||||
|
||||
code_txt: "ကုတ်ဒ် "
|
||||
charge_txt: "ကောက်ခံသည်"
|
||||
|
||||
Reference in New Issue
Block a user