diff --git a/app/controllers/transactions/sales_controller.rb b/app/controllers/transactions/sales_controller.rb
index c4666c5e..f48478a6 100644
--- a/app/controllers/transactions/sales_controller.rb
+++ b/app/controllers/transactions/sales_controller.rb
@@ -50,6 +50,18 @@ class Transactions::SalesController < ApplicationController
end
@sale_receivables = SalePayment.where('sale_id = ?', @sale.id)
+
+ #get customer amount
+ @customer = Customer.find(@sale.customer_id)
+ response = Customer.get_member_account(@customer)
+
+ if(response["status"] == true)
+ @membership = response["data"]
+ else
+ @membership = 0
+ end
+ #end customer amount
+
respond_to do |format|
format.html # show.html.erb
format.json { render json: @sale }
diff --git a/app/views/transactions/sales/show.html.erb b/app/views/transactions/sales/show.html.erb
index 6fc4dd03..29ecdc6f 100644
--- a/app/views/transactions/sales/show.html.erb
+++ b/app/views/transactions/sales/show.html.erb
@@ -21,11 +21,11 @@
Sale Details
- Orders
+ Orders Details
+
+
+ Customer Details
-
@@ -124,6 +124,9 @@
+
+ | |
+
| Order ID |
Menu Item |
@@ -154,11 +157,68 @@
-
-
Sale Details
-
+
-
+
+
+
+
+
+ Customer Detail |
+ |
+ |
+
+
+ |
+ Name |
+ <%= @customer.name %> |
+
+
+ |
+ Email |
+ <%= @customer.email %> |
+
+
+ |
+ Contact no |
+ <%= @customer.contact_no %> |
+
+
+ |
+ Company |
+ <%= @customer.company rescue '-' %> |
+
+
+ |
+ Date Of Birth |
+ <%= @customer.date_of_birth rescue '-' %> |
+
+
+ Membership Details |
+ |
+ |
+
+ <% if @membership == 0 %>
+
+ | "There is no membership data" |
+
+ <% else %>
+ <% @membership.each do |member| %>
+
+ |
+ <%= member["accountable_type"] %> |
+ <%= member["balance"] %> |
+
+ <% end %>
+
+ <% end %>
+
+
+
+
+
+
+
@@ -175,7 +235,7 @@
Void Sale
-
diff --git a/app/views/transactions/sales/void.html.erb b/app/views/transactions/sales/void.html.erb
index 9d18cca1..0bcd6db6 100644
--- a/app/views/transactions/sales/void.html.erb
+++ b/app/views/transactions/sales/void.html.erb
@@ -60,8 +60,6 @@
var reason = $('input[type="radio"]:checked').val();
console.log(reason)
-
- var url = 'manual_void_sale';alert(url)
var sale_id = $(this).find(".customer-id").text();
$.ajax({
type: 'POST',