diff --git a/app/views/reports/_shift_sale_report_filter.html.erb b/app/views/reports/_shift_sale_report_filter.html.erb
new file mode 100644
index 00000000..1b4082f5
--- /dev/null
+++ b/app/views/reports/_shift_sale_report_filter.html.erb
@@ -0,0 +1,211 @@
+
+
+ <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
+ <% if period_type != false %>
+
+
+ Select Period
+
+ Today
+ Yesterday
+ This week
+ Last week
+ Last 7 days
+ This month
+ Last month
+ Last 30 days
+ This year
+ Last year
+
+
+
+ Select Type
+
+ All Sale Type
+ Revenue Only
+ Discount Only
+ Void Only
+ Taxes Only
+ Other Amount Only
+
+
+
+
+ From
+
+
+
+ To
+
+
+
+
+
+
+ <% end %>
+
+
+
+
+
+ <% if defined? promotions %>
+ <%= select_tag "promotion", options_for_select(@promotions, :selected => params[:promotion_type]), :class => "form-control" %>
+ <% end %>
+
+ <% if defined? menu_types %>
+ <%= select_tag "menu_type", options_for_select(@menu_types, :selected => params[:menu_type]), :class => "form-control" %>
+ <% end %>
+
+ <% if defined? payments %>
+ <%= select_tag "payment_type", options_for_select(@payments, :selected => params[:payment_type]), :class => "form-control" %>
+ <% end %>
+
+ <% if defined? shift_name %>
+
+ <% end %>
+
+ <% if defined? cashiers %>
+ <%= select_tag "cashier", options_from_collection_for_select(@cashiers,"id","name"),:prompt => "All Cashier Stations", :class => "form-control" %>
+ <% end %>
+
+ <% if defined? singer %>
+ <%= select_tag "singer", options_from_collection_for_select(singer,"id","name"),:prompt => "All Vocal List", :class => "form-control" %>
+ <% end %>
+
+ <% if defined? bsm %>
+ <%= select_tag "singer", options_from_collection_for_select(bsm,"id","name"),:prompt => "All BSM List", :class => "form-control" %>
+ <% end %>
+
+ <% if defined? guest_role %>
+ <%= select_tag "guest_role", options_from_collection_for_select(@guest_role,"id","name"),:prompt => "Vocal/BSM List", :class => "form-control" %>
+ <% end %>
+
+ <% if defined? list_by_payment_type %>
+ <%= select_tag "payment_type_list", options_for_select(@payment_list, :selected => params[:payment_type_list]), :class => "form-control" %>
+ <% end %>
+
+ <% if defined? products %>
+ <%= select_tag "product", options_from_collection_for_select(@products,"id","name"),:prompt => "All Products", :class => "form-control" %>
+ <% end %>
+
+ <% if defined? items %>
+ <%= select_tag "item", options_for_select(@items, :selected => params[:item_type]), :class => "form-control" %>
+ <% end %>
+
+
+
+
+
+ <% end %>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb b/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb
deleted file mode 100644
index 8cac8b64..00000000
--- a/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb
+++ /dev/null
@@ -1,247 +0,0 @@
-<%= form_tag report_path, :method => :get, :id=>"frm_report" do %>
-
-
-
- <% if defined? product_account %>
- <%= select_tag "account", options_from_collection_for_select(@accounts,"id","title", :selected => params[:account])%>
- <% end %>
- <% if defined? shift_product_account %>
- <%= select_tag "account", options_from_collection_for_select(@accounts,"id","title", :selected => params[:account]), :prompt => 'All Group'%>
- <% end %>
-
-
-
- <% if period_type != false %>
-
-
-
-
- Today
- Yesterday
- This week
- Last week
- Last 7 days
- This month
- Last month
- Last 30 days
- This year
- Last year
-
- <% end %>
-
-
-
-
-
-
-
-
- <% if defined? show_sale_type %>
-
- All Sale Type
- Revenue Only
- Discount Only
- Void Only
- Taxes Only
- Other Amount Only
-
- <% end %>
-
- <% if defined? promotions %>
- <%= select_tag "promotion", options_for_select(@promotions, :selected => params[:promotion_type]) %>
- <% end %>
-
- <% if defined? menu_types %>
- <%= select_tag "menu_type", options_for_select(@menu_types, :selected => params[:menu_type]) %>
- <% end %>
-
- <% if defined? payments %>
- <%= select_tag "payment_type", options_for_select(@payments, :selected => params[:payment_type]) %>
- <% end %>
-
- <% if defined? shift_name %>
-
-
- <% end %>
- <% if defined? cashiers %>
- <%= select_tag "cashier", options_from_collection_for_select(@cashiers,"id","name"),:prompt => "All Cashier Stations" %>
- <% end %>
-
- <% if defined? singer %>
- <%= select_tag "singer", options_from_collection_for_select(singer,"id","name"),:prompt => "All Vocal List" %>
- <% end %>
-
- <% if defined? bsm %>
- <%= select_tag "singer", options_from_collection_for_select(bsm,"id","name"),:prompt => "All BSM List" %>
- <% end %>
-
- <% if defined? guest_role %>
- <%= select_tag "guest_role", options_from_collection_for_select(@guest_role,"id","name"),:prompt => "Vocal/BSM List" %>
- <% end %>
-
- <% if defined? list_by_payment_type %>
- <%= select_tag "payment_type_list", options_for_select(@payment_list, :selected => params[:payment_type_list]) %>
- <% end %>
-
- <% if defined? products %>
- <%= select_tag "product", options_from_collection_for_select(@products,"id","name"),:prompt => "All Products" %>
- <% end %>
- <% if defined? items %>
- <%= select_tag "item", options_for_select(@items, :selected => params[:item_type]) %>
- <% end %>
-
-
-
-
-
- <% if defined? show_monthly %>
-
-
-
-
- Monthly
- Yearly
-
-
- <% end %>
-
-
-
-
-
-
-<% end %>
-
-
\ No newline at end of file
diff --git a/app/views/reports/receipt_no/index.html.erb b/app/views/reports/receipt_no/index.html.erb
index 91c489b1..9d5c4f88 100644
--- a/app/views/reports/receipt_no/index.html.erb
+++ b/app/views/reports/receipt_no/index.html.erb
@@ -2,49 +2,63 @@
Home
Receipt List Report
-
- <%= render :partial=>'shift_sale_report_filter',:locals=>{ :period_type => true,
- :shift_name => true, :report_path => reports_receipt_no_index_path} %>
-
-
-
-
- Date
- Receipt No
- Cashier Name
- Gross Sales
- Discount
- Total Sales
- CT
- Nett Sales
-
-
-
-
- <% total_sales = 0 %>
- <% net_sales = 0 %>
- <% @sale_data.each do |sale| %>
- <% total_sales = sale.total_amount.to_f - sale.total_discount.to_f%>
- <% net_sales = total_sales.to_f + sale.total_tax.to_f%>
-
- <%= sale.receipt_date.strftime("#{sale.receipt_date.day.ordinalize} %b") rescue '-' %>
- <%=sale.receipt_no.to_s rescue ''%>
- <%=sale.cashier_id rescue ''%>
- <%= number_with_delimiter(sprintf("%.2f",sale.total_amount.to_f), :delimiter => ',') %>
- <%= number_with_delimiter(sprintf("%.2f",sale.total_discount.to_f), :delimiter => ',') %>
- <%= number_with_delimiter(sprintf("%.2f",total_sales.to_f), :delimiter => ',') %>
- <%= number_with_delimiter(sprintf("%.2f",sale.total_tax.to_f), :delimiter => ',') %>
- <%= number_with_delimiter(sprintf("%.2f",net_sales.to_f), :delimiter => ',') %>
-
- <% end %>
-
-
+
+ <%= render :partial=>'shift_sale_report_filter',
+ :locals=>{ :period_type => true, :shift_name => false, :report_path =>reports_receipt_no_index_path} %>
+
+
+
+
+
+
+
+
+
+ Date
+ Receipt No
+ Cashier Name
+ Gross Sales
+ Discount
+ Total Sales
+ CT
+ Nett Sales
+
+
+
+
+ <% total_sales = 0 %>
+ <% net_sales = 0 %>
+ <% @sale_data.each do |sale| %>
+ <% total_sales = sale.total_amount.to_f - sale.total_discount.to_f%>
+ <% net_sales = total_sales.to_f + sale.total_tax.to_f%>
+
+ <%= sale.receipt_date.strftime("#{sale.receipt_date.day.ordinalize} %b") rescue '-' %>
+ <%=sale.receipt_no.to_s rescue ''%>
+ <%=sale.cashier_id rescue ''%>
+ <%= number_with_delimiter(sprintf("%.2f",sale.total_amount.to_f), :delimiter => ',') %>
+ <%= number_with_delimiter(sprintf("%.2f",sale.total_discount.to_f), :delimiter => ',') %>
+ <%= number_with_delimiter(sprintf("%.2f",total_sales.to_f), :delimiter => ',') %>
+ <%= number_with_delimiter(sprintf("%.2f",sale.total_tax.to_f), :delimiter => ',') %>
+ <%= number_with_delimiter(sprintf("%.2f",net_sales.to_f), :delimiter => ',') %>
+
+ <% end %>
+
+
+
+
+
<%= paginate @sale_data %>
+
diff --git a/config/routes.rb b/config/routes.rb
index c4592d6d..6bfe588e 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -95,11 +95,11 @@ Rails.application.routes.draw do
get 'sale/:sale_id/payment/others_payment/MPU' => "mpu#index"
post 'payment/mpu' => "mpu#create"
- get 'sale/:sale_id/payment/others_payment/REDEEM' => "redeem_payments#index"
+ get 'sale/:sale_id/payment/others_payment/Redeem' => "redeem_payments#index"
#---------Add Customer --------------#
#resources :customers
- get '/:sale_id/add_customer', to: "customers#add_customer"
+ get '/:sale_id/customers', to: "customers#add_customer"
get '/:customer_id/get_customer' => 'home#get_customer'
post '/:sale_id/update_sale' , to: "home#update_sale_by_customer"#update customer id in sale table
end
diff --git a/db/seeds.rb b/db/seeds.rb
index 3f2621a8..d47decef 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -145,18 +145,18 @@ 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"})
-payment_methods = PaymentMethodSetting.create({payment_method:"REDEEM",gateway_url: "http://192.168.1.47:3006",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"})
+payment_methods = PaymentMethodSetting.create({payment_method:"Redeem",gateway_url: "http://192.168.1.47:3006",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"})
# shop = Shop.create(