diff --git a/app/controllers/origami/request_bills_controller.rb b/app/controllers/origami/request_bills_controller.rb index 31766599..3cc69ac2 100644 --- a/app/controllers/origami/request_bills_controller.rb +++ b/app/controllers/origami/request_bills_controller.rb @@ -1,6 +1,6 @@ class Origami::RequestBillsController < BaseOrigamiController - def create + def show @sale = Sale.new @@ -27,11 +27,6 @@ class Origami::RequestBillsController < BaseOrigamiController end - def show - sale_id = params[:sale_id] - if Sale.exists?(sale_id) - @sale_data = Sale.find_by_sale_id(sale_id) - end - end + end diff --git a/app/views/crm/customers/index.html.erb b/app/views/crm/customers/index.html.erb index 5a29b74c..948e3c3e 100644 --- a/app/views/crm/customers/index.html.erb +++ b/app/views/crm/customers/index.html.erb @@ -1,41 +1,110 @@ -

<%= notice %>

+
+
+ +
+
+
-

Crm Customers

+
+
+ +
+
+ + + + + + + + + + -
NameCompanyContact noEmail
- - - - - - - - - - - - - + + <% @crm_customers.each do |crm_customer| %> + + + + + + + + <% end %> + +
NameCompanyContact noEmailDate of birthMembershipMembership typeMembership authentication code
<%= crm_customer.name %><%= crm_customer.company %><%= crm_customer.contact_no %><%= crm_customer.email %>
+
+
- - <% @crm_customers.each do |crm_customer| %> - - <%= crm_customer.name %> - <%= crm_customer.company %> - <%= crm_customer.contact_no %> - <%= crm_customer.email %> - <%= crm_customer.date_of_birth %> - <%= crm_customer.membership_id %> - <%= crm_customer.membership_type %> - <%= crm_customer.membership_authentication_code %> - <%= link_to 'Show', crm_customer_path(crm_customer) %> - <%= link_to 'Edit', edit_crm_customer_path(crm_customer) %> - <%= link_to 'Destroy', crm_customer_path(crm_customer), method: :delete, data: { confirm: 'Are you sure?' } %> - - <% end %> - - +
-
+
+ <%= simple_form_for crm_customers_path, :html => { :class => 'form-horizontal' } do |f| %> + +
+ <%= f.input :name, :class => "form-control col-md-6" %> +
+
+ <%= f.input :company, :class => "form-control col-md-6" %> +
+
+ <%= f.input :contact_no, :class => "form-control col-md-6" %> +
+
+ <%= f.input :email, :class => "form-control col-md-6" %> +
-<%= link_to 'New Crm Customer', new_crm_customer_path %> +
+ + <%= f.text_field :date_of_birth,:class=>"form-control datepicker",:readonly =>true, :value => @date_of_birth%> + +
+ +
+ <%= f.select :membership_id, options_for_select(@membership.collect { |member| + [member["name"], member["id"]] }, 1), {}, { id: 'countries_select' } %> + +
+ + +
+ <%= f.input :membership_type, :class => "form-control col-md-6" %> +
+
+ <%= f.input :membership_authentication_code, :class => "form-control col-md-6" %> + +
+
+ <%= f.button :submit, "Submit", :class => 'btn btn-primary' , :id => 'submit_account' %> +
+ <%end%> +
+
+ + diff --git a/app/views/origami/home/index.html.erb b/app/views/origami/home/index.html.erb index 78f59422..bb618979 100644 --- a/app/views/origami/home/index.html.erb +++ b/app/views/origami/home/index.html.erb @@ -214,7 +214,7 @@ function callOrderDetails(sale_order_id){ sale_order = sale_order_id.split("_")[0] if (sale_order == 'sale') { - sale_id = sale_order_id.split("_")[1] + order_id = sale_order_id.split("_")[1] url = "origami/"+sale_order_id.split("_")[1] data_val = { sale_id: sale_order_id.split("_")[1]} @@ -224,8 +224,10 @@ function callOrderDetails(sale_order_id){ data_val = { order_id: sale_order_id.split("_")[1]} } + table_or_order_id = order_id pay_sale_id = sale_id + alert(table_or_order_id) var tbody = "" $("#append-table").html("") if (old_order_id != order_id){ @@ -316,7 +318,7 @@ $( document ).ready(function() { $( document ).ready(function() { $('#pay').click(function() { - window.location.href = '/origami/sale/'+ pay_sale_id + "/payment" + window.location.href = '/origami/sale/'+pay_sale_id +"/payment" return false; }); });