From b86ae8d32d5c94863de7e304170c5b5138c87fc5 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Tue, 13 Jun 2017 20:11:24 +0630 Subject: [PATCH 1/5] customer search --- app/controllers/crm/customers_controller.rb | 9 ++-- .../origami/customers_controller.rb | 11 +++-- app/models/customer.rb | 7 ++- app/views/crm/customers/index.html.erb | 43 ++++++++++--------- app/views/layouts/CRM.html.erb | 2 +- app/views/origami/customers/index.html.erb | 29 +++++++------ 6 files changed, 61 insertions(+), 40 deletions(-) diff --git a/app/controllers/crm/customers_controller.rb b/app/controllers/crm/customers_controller.rb index 57f4eafc..f3a1fdf1 100644 --- a/app/controllers/crm/customers_controller.rb +++ b/app/controllers/crm/customers_controller.rb @@ -10,9 +10,12 @@ class Crm::CustomersController < BaseCrmController @crm_customers = Customer.order("customer_id").page(params[:page]) #@products = Product.order("name").page(params[:page]).per(5) else - @crm_customers = Customer.where("name LIKE ?", "%#{filter}%").order("name").page(params[:page]) end + @crm_customers = Customer.search(filter) + + end #@crm_customers = Customer.all - @crm_customer = Customer.new + @crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(50) + @crm_customer = Customer.new if flash["errors"] @crm_customer.valid? @@ -52,7 +55,7 @@ class Crm::CustomersController < BaseCrmController membership = MembershipSetting.find_by_membership_type("paypar_url") memberaction = MembershipAction.find_by_membership_type("get_all_member_account") - merchant_uid = memberaction.merchant_account_id.to_s + merchant_uid = memberaction.merchant_account_id.to_s auth_token = memberaction.auth_token.to_s url = membership.gateway_url.to_s + memberaction.gateway_url.to_s diff --git a/app/controllers/origami/customers_controller.rb b/app/controllers/origami/customers_controller.rb index 7d0b5502..e3fc7378 100644 --- a/app/controllers/origami/customers_controller.rb +++ b/app/controllers/origami/customers_controller.rb @@ -17,12 +17,17 @@ class Origami::CustomersController < BaseOrigamiController @sale_id = params[:sale_id] filter = params[:filter] + filter = params[:filter] + if filter.nil? - @crm_customers = Customer.order("name").page params[:page] + @crm_customers = Customer.order("customer_id").page(params[:page]) + #@products = Product.order("name").page(params[:page]).per(5) else - @crm_customers = Customer.where("name LIKE ?", "%#{filter}%").order("name").page params[:page] + @crm_customers = Customer.search(filter) + end - # @crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(2) + #@crm_customers = Customer.all + @crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(50) @crm_customer = Customer.new if flash["errors"] diff --git a/app/models/customer.rb b/app/models/customer.rb index b5e101cb..93834b43 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -34,12 +34,17 @@ class Customer < ApplicationRecord def self.search(search) if search - find(:all, :conditions => ['name LIKE ?', "%#{search}%"]) + # find(:all, :conditions => ['name LIKE ? OR contact_no LIKE ?', "%#{search}%", "%#{search}%"]) + where("name LIKE ? OR contact_no LIKE ?", "%#{search}%", "%#{search}%",) else find(:all) end end + # def self.search(search) + # where("name LIKE ? OR contact_no LIKE ?", "%#{search}%", "%#{search}%",) + # end + def lastest_invoices sales.where(:customer_id => self.id).order("created_at desc").limit(5) end diff --git a/app/views/crm/customers/index.html.erb b/app/views/crm/customers/index.html.erb index d72c6a38..17f207c3 100644 --- a/app/views/crm/customers/index.html.erb +++ b/app/views/crm/customers/index.html.erb @@ -14,7 +14,7 @@
-
+
@@ -42,20 +42,21 @@ - <% @crm_customers.each do |crm_customer| %> - - - - <%= crm_customer.name %> - <%= crm_customer.company %> - <%= crm_customer.contact_no %> - <%= crm_customer.email %> - - <%= link_to 'Show', crm_customer_path(crm_customer) %> - - - - + <% if @crm_customers.count > 0 %> + <% @crm_customers.each do |crm_customer| %> + + + + <%= crm_customer.name %> + <%= crm_customer.company rescue '-' %> + <%= crm_customer.contact_no %> + <%= crm_customer.email %> + <%= link_to 'Show', crm_customer_path(crm_customer) %> + + + <% end %> + <%else%> +

There are no record for your search

<% end %> @@ -66,7 +67,7 @@
-
+
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %> @@ -115,6 +116,11 @@
<%end%>
+
@@ -216,7 +222,4 @@ $(function() { } - - - - + \ No newline at end of file diff --git a/app/views/layouts/CRM.html.erb b/app/views/layouts/CRM.html.erb index 42b559e2..f1a43726 100644 --- a/app/views/layouts/CRM.html.erb +++ b/app/views/layouts/CRM.html.erb @@ -21,7 +21,7 @@ <% if !flash["errors"]%> - <%=message%> + <%=message%> <% end %>
<% end %> diff --git a/app/views/origami/customers/index.html.erb b/app/views/origami/customers/index.html.erb index 6fa5ae03..ba6ff75c 100644 --- a/app/views/origami/customers/index.html.erb +++ b/app/views/origami/customers/index.html.erb @@ -24,7 +24,8 @@ - <%= form_tag crm_customers_path, :method => :get do %> + <% path ="/origami/#{@sale_id}/customers" %> + <%= form_tag path, :method => :get do %>
@@ -42,17 +43,21 @@ - <% @crm_customers.each do |crm_customer| %> - - - - <%= crm_customer.name %> - <%= crm_customer.company rescue '-' %> - <%= crm_customer.contact_no %> - <%= crm_customer.email %> - - - + <% if @crm_customers.count > 0 %> + <% @crm_customers.each do |crm_customer| %> + + + + <%= crm_customer.name %> + <%= crm_customer.company rescue '-' %> + <%= crm_customer.contact_no %> + <%= crm_customer.email %> + + + + <% end %> + <%else%> +

There are no record for your search

<% end %> From 27971f406b16e23700fbc820582bba232afce31d Mon Sep 17 00:00:00 2001 From: Moe Su Date: Tue, 13 Jun 2017 20:22:28 +0630 Subject: [PATCH 2/5] Seed --- db/seeds.rb | 14 +++++++------- dump.rdb | Bin 22762 -> 23048 bytes 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index 9db92184..a7fdc416 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -145,13 +145,13 @@ crm_order_printer=PrintSetting.create({name: "CRM Order", unique_code: "CrmOrder member_setting = MembershipSetting.create({membership_type:"paypar_url",gateway_url: "http://192.168.1.47:3006",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}) -member_actions= MembershipAction.create([{membership_type:"get_account_balance",gateway_url:"/api/membership_campaigns/get_correspond_account_data",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}, - {membership_type:"redeem",gateway_url:"/api/membership_campaigns/redeem",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}, - {membership_type:"create_membership_customer",gateway_url:"/api/generic_customer/create_membership_customer",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}, - {membership_type:"update_membership_customer",gateway_url:"/api/generic_customer/update_membership_customer",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}, - {membership_type:"get_all_member_group",gateway_url:"/api/member_group/get_all_member_group",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}, - {membership_type:"rebate",gateway_url:"/api/membership_campaigns/rebate",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}, - {membership_type:"get_all_member_account",gateway_url:"/api/generic_customer/get_membership_data",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"} +member_actions= MembershipAction.create([{membership_type:"get_account_balance",gateway_url:"/api/membership_campaigns/get_correspond_account_data",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"}, + {membership_type:"redeem",gateway_url:"/api/membership_campaigns/redeem",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"}, + {membership_type:"create_membership_customer",gateway_url:"/api/generic_customer/create_membership_customer",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"}, + {membership_type:"update_membership_customer",gateway_url:"/api/generic_customer/update_membership_customer",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"}, + {membership_type:"get_all_member_group",gateway_url:"/api/member_group/get_all_member_group",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"}, + {membership_type:"rebate",gateway_url:"/api/membership_campaigns/rebate",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"}, + {membership_type:"get_all_member_account",gateway_url:"/api/generic_customer/get_membership_data",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"} ]) payment_methods = PaymentMethodSetting.create({payment_method:"MPU",gateway_url: "http//192.168.1.47:3006"}) diff --git a/dump.rdb b/dump.rdb index 9ce916eda38f8373c8dd26cf3de8976b140fd4ee..4f89d45d97d6e100481b552a620caeae3e319d8b 100644 GIT binary patch delta 800 zcmW-c+iFx-06_PdGr3L1#HiTVU}sJy13}!=eZS;E4V3!Qszo2XBsKf0RN{kL=t~F` zguWCi$2UbR#7kO^X{+D`1ltcNNIyUiM`P$0h!3HmAFvi{{rh|J!=vOUGq9|^53j$9KiyiqE6>a2HCwy&3sqAoS+>4p7(l-t&BxBCSq zYH9Pg*|qA!f7D!R!LyYHwiL36G__pG5LHIYSSt?1}MOPzF58Mo0qpZ!=zxJUKW7*N&l-0P$TWLAU* zxLd8v4PfnqGahBP66>;}&r_(3-nVP_kVKB!7`0=ccm8jCk{?Sa780(f&)11$5^Xfk zZP`-3v{_WEr$1)KGZ!?5Oau!V@dRpaA`HPFew7ByY<1xDdhhWlGggx5i6U6&$l1QB ky0(Jyx6PqJp1({Fr5i9j+*SYk#NaB6}h#R)W~sSXyUUu&@y;!6KONFZdpOX#INEdPK$+f1J7guY2!q@OU+>e!cwg zaq)Eg{LRIwbSgpURu`cmgo>ACc50&ha`<9-zc+g_HI_ydt-vzZfQ9A)10y-smU+v4 zXy-Yj%IDnOxwTTza7(DlaX~qqoFS3ZTsNlPPy6nDyXqnDv+)@zZ5D%OyFU~`D#&HFl~BvEhy<|Zvnxq%jV3BYV6He;FANZ`@gUKP zn<%2THlKwN%bjvc8|UgHgASoR4s&BjH>3TmdY&S+zZ?`5deLn4hbj2rj3?Q%mUUS* z;jeM54Fs$daoolTPKa!>UZ@b;Z%*s+AdHBd=R_LmoG>aHd#)MjACLg^Nk<7qSbeD4 zMQK}Z>{Z21v%Qp-uRF(kK~WkGP+^3441z< XXWI>4de07izuNtC<=fiaiT22Uo}#5* From e9d3ca30595c6f35c850abf0e58e4beb3f2706f1 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Tue, 13 Jun 2017 20:22:33 +0630 Subject: [PATCH 3/5] pull master for membership --- app/controllers/crm/customers_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/crm/customers_controller.rb b/app/controllers/crm/customers_controller.rb index f3a1fdf1..eac87e1e 100644 --- a/app/controllers/crm/customers_controller.rb +++ b/app/controllers/crm/customers_controller.rb @@ -107,7 +107,7 @@ class Crm::CustomersController < BaseCrmController membership = MembershipSetting.find_by_membership_type("paypar_url") memberaction = MembershipAction.find_by_membership_type("create_membership_customer") - merchant_uid = memberaction.merchant_account_id.to_s + merchant_uid = memberaction.merchant_account_id.to_s auth_token = memberaction.auth_token.to_s url = membership.gateway_url.to_s + memberaction.gateway_url.to_s From 3db625230428429e4456debdb161ce3661acc352 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Wed, 14 Jun 2017 00:09:54 +0630 Subject: [PATCH 4/5] update search and crm --- app/assets/javascripts/application.js | 3 +- app/assets/stylesheets/application.css | 0 app/assets/stylesheets/application.scss | 2 + .../origami/customers_controller.rb | 2 - app/controllers/settings/orders_controller.rb | 32 --- app/controllers/settings/sales_controller.rb | 32 --- .../transactions/sales_controller.rb | 24 +- app/models/order.rb | 9 + app/models/sale.rb | 3 +- app/views/crm/customers/index.html.erb | 25 +- app/views/crm/customers/show.html.erb | 218 +++++++++--------- app/views/layouts/_header.html.erb | 4 +- app/views/origami/customers/index.html.erb | 23 +- app/views/settings/orders/index.html.erb | 68 ------ app/views/settings/orders/show.html.erb | 85 ------- app/views/settings/sales/index.html.erb | 84 ------- app/views/settings/sales/show.html.erb | 103 --------- app/views/transactions/sales/index.html.erb | 133 ++++++----- app/views/transactions/sales/show.html.erb | 174 +++++++------- config/routes.rb | 5 +- 20 files changed, 352 insertions(+), 677 deletions(-) delete mode 100644 app/assets/stylesheets/application.css delete mode 100644 app/controllers/settings/orders_controller.rb delete mode 100644 app/controllers/settings/sales_controller.rb delete mode 100644 app/views/settings/orders/index.html.erb delete mode 100644 app/views/settings/orders/show.html.erb delete mode 100644 app/views/settings/sales/index.html.erb delete mode 100644 app/views/settings/sales/show.html.erb diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index b0937554..202d4387 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -17,6 +17,8 @@ //= require turbolinks //= require cable //= require settings/processing_items +//= require jquery-ui +//= require bootstrap-datepicker $(document).on("focus", "[data-behaviour~='datepicker']", function(e){ $(this).datepicker({"format": "yyyy-M-dd", "weekStart": 1, "autoclose": true}); @@ -153,4 +155,3 @@ $(function(){ } }); */ ->>>>>>> d54fd19d1c18384ee6b21c43ca51587fb7fa843f diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css deleted file mode 100644 index e69de29b..00000000 diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index bed2e04f..a4fa6b9f 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -2,6 +2,8 @@ @import "bootstrap"; @import "font-awesome"; @import "theme"; +@import "jquery-ui"; +@import "bootstrap-datepicker3"; /* Show it is fixed to the top */ diff --git a/app/controllers/origami/customers_controller.rb b/app/controllers/origami/customers_controller.rb index e3fc7378..3215f9e6 100644 --- a/app/controllers/origami/customers_controller.rb +++ b/app/controllers/origami/customers_controller.rb @@ -10,8 +10,6 @@ class Origami::CustomersController < BaseOrigamiController def show end - - def add_customer @sale_id = params[:sale_id] diff --git a/app/controllers/settings/orders_controller.rb b/app/controllers/settings/orders_controller.rb deleted file mode 100644 index b5bbdc1c..00000000 --- a/app/controllers/settings/orders_controller.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Settings::OrdersController < ApplicationController - def index - - filter = params[:filter] - if filter.nil? - orders = Order.order("order_id desc").limit(1000) - else - order = Order.where("order_id LIKE ?", "%#{filter}%").order("order_id desc").limit(1000).page(params[:page]) - if order.count > 0 - orders = order - else - orders = Order.order("order_id desc").limit(1000) - flash[:notice] = "There is no data." - end - end - @orders = Kaminari.paginate_array(orders).page(params[:page]).per(50) - respond_to do |format| - format.html # index.html.erb - format.json { render json: @orders } - end - end - def show - - @order = Order.find(params[:id]) - - respond_to do |format| - format.html # show.html.erb - format.json { render json: @order } - end - end - -end diff --git a/app/controllers/settings/sales_controller.rb b/app/controllers/settings/sales_controller.rb deleted file mode 100644 index aabc2282..00000000 --- a/app/controllers/settings/sales_controller.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Settings::SalesController < ApplicationController - def index - - search_date = params[:date] - receipt_no = params[:receipt_no] - today = Date.today - - if receipt_no.nil? - @sales = Sale.order("sale_id").page(params[:page]) - #@products = Product.order("name").page(params[:page]).per(5) - else - @sales = Sale.where("receipt_no LIKE ?", "%#{receipt_no}%").order("receipt_no").page(params[:page]) - end - #@sales = Kaminari.paginate_array(@sales).page(params[:page]).per(50) - respond_to do |format| - format.html # index.html.erb - format.json { render json: @sales } - end - end - - def show - - @sale = Sale.find(params[:id]) - # @sale_receivables = SaleReceivable.where('sale_id = ?', @sale.id) - respond_to do |format| - format.html # show.html.erb - format.json { render json: @sale } - end - end - - -end \ No newline at end of file diff --git a/app/controllers/transactions/sales_controller.rb b/app/controllers/transactions/sales_controller.rb index ea9e8ccd..edafb1db 100644 --- a/app/controllers/transactions/sales_controller.rb +++ b/app/controllers/transactions/sales_controller.rb @@ -4,12 +4,34 @@ class Transactions::SalesController < ApplicationController # GET /transactions/sales # GET /transactions/sales.json def index - @transactions_sales = Sale.all + + search_date = params[:date] + receipt_no = params[:receipt_no] + today = Date.today + + if receipt_no.nil? + @sales = Sale.order("sale_id").page(params[:page]) + #@products = Product.order("name").page(params[:page]).per(5) + else + @sales = Sale.search(receipt_no) + end + @sales = Kaminari.paginate_array(@sales).page(params[:page]).per(50) + respond_to do |format| + format.html # index.html.erb + format.json { render json: @sales } + end end # GET /transactions/sales/1 # GET /transactions/sales/1.json def show + + @sale = Sale.find(params[:id]) + # @sale_receivables = SaleReceivable.where('sale_id = ?', @sale.id) + respond_to do |format| + format.html # show.html.erb + format.json { render json: @sale } + end end # GET /transactions/sales/new diff --git a/app/models/order.rb b/app/models/order.rb index 21c00580..10c1a6c2 100644 --- a/app/models/order.rb +++ b/app/models/order.rb @@ -292,6 +292,15 @@ class Order < ApplicationRecord end + def self.search(search) + if search + # find(:all, :conditions => ['name LIKE ? OR contact_no LIKE ?', "%#{search}%", "%#{search}%"]) + where("order_id LIKE ?", "%#{search}%") + else + find(:all) + end + end + private def generate_custom_id diff --git a/app/models/sale.rb b/app/models/sale.rb index c0a73f3d..681bed64 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -261,7 +261,8 @@ class Sale < ApplicationRecord def self.search(search) if search - find(:all, :conditions => ['receipt_no LIKE ?', "%#{search}%"]) + # find(:all, :conditions => ['name LIKE ? OR contact_no LIKE ?', "%#{search}%", "%#{search}%"]) + where("receipt_no LIKE ?", "%#{search}%",) else find(:all) end diff --git a/app/views/crm/customers/index.html.erb b/app/views/crm/customers/index.html.erb index 17f207c3..f3819466 100644 --- a/app/views/crm/customers/index.html.erb +++ b/app/views/crm/customers/index.html.erb @@ -25,8 +25,8 @@ <%= form_tag crm_customers_path, :method => :get do %> -
- +
+
<% end %> @@ -44,9 +44,9 @@ <% if @crm_customers.count > 0 %> <% @crm_customers.each do |crm_customer| %> - + - + <%= crm_customer.name %> <%= crm_customer.company rescue '-' %> <%= crm_customer.contact_no %> @@ -117,8 +117,9 @@ <%end%>
@@ -135,11 +136,10 @@ $(function() { $('.datepicker').css('cursor','pointer'); }); - $(document).on('click',".checkbox_check",function(){ - if(this.checked){ - + $(document).on('click',".customer_tr",function(){ + // if(this.checked){ var sale_id = $("#sale_id").val() || 0; - var customer_id = $(this).val(); + var customer_id = $(this).attr('data-ref'); if(sale_id != 0){ // var url = "/"+customer_id; @@ -178,9 +178,9 @@ $(function() { //$(".edit_customer").attr('method', 'PATCH'); } }); - }else{ + // }else{ - } + // } }) function update_sale(customer_id,sale_id) { @@ -205,7 +205,6 @@ $(function() { success: function(data) { if(data.status == true) { - alert('Customer has assigned'); window.location.href = '/origami' }else{ alert('Record not found!'); diff --git a/app/views/crm/customers/show.html.erb b/app/views/crm/customers/show.html.erb index 62ebf9c0..e3530017 100644 --- a/app/views/crm/customers/show.html.erb +++ b/app/views/crm/customers/show.html.erb @@ -1,120 +1,130 @@
-
- -
-
+
+ + + + -
-
- -
-
-
- - - - - - - - - - - - - +
-
- - - - - - - - - <% -puts "hhhhhhhhhhhhhhhhhhhhh" - puts @member_data.to_json %> - - -
NameEmailContact noCompanyDate Of BirthMembership AccountBalanceType
<%= @crm_customer.name %><%= @crm_customer.email %><%= @crm_customer.contact_no %><%= @crm_customer.company %><%= @crm_customer.date_of_birth %> <%= @balance %> <%= @type %>
-
-

Order Items

+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Name<%= @crm_customer.name %>
Email<%= @crm_customer.email %>
Contact no<%= @crm_customer.contact_no %>
Company<%= @crm_customer.company %>
Date Of Birth<%= @crm_customer.date_of_birth %>
+
+
- - - - - - - - - - - - +
+

Order Details

+
+
Created at Menu ItemQTYUnit Price OptionStatusWaiter
+ + + + + + + + + + + + - - <% @order_items.each do |order_item| %> - - - - - - - - - - <% end %> - -
Order IDMenu ItemQTYUnit Price OptionStatusWaiterCreated at
<%= order_item.created_at %><%= order_item.item_name %><%= order_item.qty %><%= order_item.price %><%= order_item.options %><%= order_item.order_item_status %><%= order_item.item_order_by %>
+ + <% @order_items.each do |order_item| %> + + <%= order_item.order_id %> + <%= order_item.item_name %> + <%= order_item.qty %> + <%= order_item.price %> + <%= order_item.options %> + <%= order_item.order_item_status %> + <%= order_item.item_order_by %> + <%= order_item.created_at.strftime("%d-%m-%y") %> + + <% end %> + + +
+
-

Sale Items

+
+

Sale Details

+
+ + + + + + + + + + + -
Sale ID Menu ItemQTYUnit Price Tax PriceCreated At
- - - - - - - - - - + + <% @sale_items.each do |sale_item| %> + + + + + + + + + + <% end %> + +
Sale ID Menu ItemQTYUnit Price Tax PriceCreated At
<%= sale_item.sale_id %><%= sale_item.product_name %><%= sale_item.qty %><%= sale_item.unit_price %><%= sale_item.taxable_price %><%= sale_item.created_at %>
+
+
- - <% @sale_items.each do |sale_item| %> - - <%= sale_item.sale_id %> - <%= sale_item.product_name %> - <%= sale_item.qty %> - <%= sale_item.unit_price %> - - <%= sale_item.taxable_price %> - <%= sale_item.created_at %> - - <% end %> - -
-
-
+
+
+

+ + Back + +
- - - diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 4a74c7b1..58ecd9b5 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -28,8 +28,8 @@