diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 2719a758..9e315b08 100644 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -113,7 +113,7 @@

-

Date: <%= @date.utc.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

+

Date: <%= @date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

@@ -304,7 +304,7 @@ $(document).ready(function(){ var sale_id = $('#save_order_id').attr('data-order'); } - window.location.href = '/origami/'+ sale_id + "/customers" + window.location.href = '/origami/'+ sale_id + "/customers" }); // Discount for Payment @@ -315,7 +315,7 @@ $(document).ready(function(){ }else{ var sale_id = $('#save_order_id').attr('data-order'); } - + if(sale_id!=""){ window.location.href = '/origami/' + sale_id + '/discount' } diff --git a/app/views/origami/moveroom/move_dining.html.erb b/app/views/origami/moveroom/move_dining.html.erb index 495e1514..109bc418 100644 --- a/app/views/origami/moveroom/move_dining.html.erb +++ b/app/views/origami/moveroom/move_dining.html.erb @@ -86,7 +86,7 @@

-

Date: <%= @date.utc.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

+

Date: <%= @date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

diff --git a/app/views/origami/movetable/move_dining.html.erb b/app/views/origami/movetable/move_dining.html.erb index 83419ca0..caa88660 100644 --- a/app/views/origami/movetable/move_dining.html.erb +++ b/app/views/origami/movetable/move_dining.html.erb @@ -86,7 +86,7 @@

-

Date: <%= @date.utc.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

+

Date: <%= @date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

diff --git a/app/views/origami/orders/show.html.erb b/app/views/origami/orders/show.html.erb index a480593a..0763c43f 100644 --- a/app/views/origami/orders/show.html.erb +++ b/app/views/origami/orders/show.html.erb @@ -119,7 +119,7 @@

-

Date: <%= @order.created_at.utc.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

+

Date: <%= @order.created_at.utc.getlocal.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb index c1797158..d734638b 100644 --- a/app/views/origami/rooms/show.html.erb +++ b/app/views/origami/rooms/show.html.erb @@ -113,7 +113,7 @@

-

Date: <%= @obj.created_at.utc.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

+

Date: <%= @obj.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

diff --git a/app/views/origami/sales/show.html.erb b/app/views/origami/sales/show.html.erb index e896a50a..5f3056fb 100644 --- a/app/views/origami/sales/show.html.erb +++ b/app/views/origami/sales/show.html.erb @@ -107,7 +107,7 @@

-

Date: <%= @sale.created_at.utc.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

+

Date: <%= @sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

diff --git a/app/views/reports/receipt_no/index.xls.erb b/app/views/reports/receipt_no/index.xls.erb index 2191d814..8bdee23c 100644 --- a/app/views/reports/receipt_no/index.xls.erb +++ b/app/views/reports/receipt_no/index.xls.erb @@ -2,27 +2,27 @@
<% unless @sale_data.empty? %> -

<%=current_active_location.name%>

-

Sales Summary Report (BreadTalk)

-<% if params[:from]%> -

From Date : <%= params[:from] %> , To Date : <%= params[:to] %>

-<% end %> +

<%=current_active_location.name%>

+

Sales Summary Report (BreadTalk)

+<% if params[:from]%> +

From Date : <%= params[:from] %> , To Date : <%= params[:to] %>

+<% end %> - - + + - + - + - + @@ -35,101 +35,101 @@ <% foc = 0 %> <% discount = 0 %> <% total = 0 %> - <% count = 1 %> + <% count = 1 %> <% discount_rev = 0 %> <% total_rev = 0 %> <% grand_rev = 0 %> <% total_other_charges=0 %> <% total_tax=0 %> <% cash_received = 0 %> - <% total_cash_received = 0 %> + <% total_cash_received = 0 %> <% today_credit_payment_amount = 0 %> - <% old_location_id = 0%> - <% sub_total = 0 %> - <% count_of_void = 0 %> + <% old_location_id = 0%> + <% sub_total = 0 %> + <% count_of_void = 0 %> <% flag = false %> - <% @sale_data.each do |sale| %> + <% @sale_data.each do |sale| %> <% credit_payment += sale[:credit_payment].to_f %> <% card += sale[:card_amount].to_f %> <% cash += sale[:cash_amount].to_f %> - <% credit += sale[:credit_amount].to_f %> + <% credit += sale[:credit_amount].to_f %> <% foc += sale[:foc_amount].to_f %> <% discount += sale[:total_discount].to_f %> - <% total += sale[:grand_total].to_f %> + <% total += sale[:grand_total].to_f %> <% total_other_charges +=sale[:other_charges].to_f %> <% total_tax +=sale[:total_tax].to_f %> <% cash_received = sale[:cash_amount].to_f + sale[:credit_payment].to_f%> <% total_cash_received = cash.to_f + credit_payment.to_f%> <% today_credit_payment_amount += sale[:today_credit_payment].to_f %> - + - - - - + + + + - - + + - - <% total_void_amount = 0 %> + + <% total_void_amount = 0 %> <% if !@daily_void.nil? %> <% @daily_void.each do |d_v|%> - - <% if d_v[:daily_void_amt].to_i > 0 %> - <% if d_v[:location_id] == sale[:location_id] %> - <% if d_v[:date].utc.getlocal.strftime("%Y-%m-%d").to_s == sale[:sale_date].to_s%> - <%count_of_void+=1%> - <%total_void_amount += d_v[:daily_void_amt].to_f%> + <% if d_v[:daily_void_amt].to_i > 0 %> + <% if d_v[:location_id] == sale[:location_id] %> + <% if d_v[:date].utc.getlocal.strftime("%Y-%m-%d").to_s == sale[:sale_date].to_s%> + <%count_of_void+=1%> + + <%total_void_amount += d_v[:daily_void_amt].to_f%> <% flag = true %> - - - - <%end %> - <% end%> - <% end%> - <% end%> - <% end%> + + + + <%end %> + <% end%> + <% end%> + <% end%> + <% end%> <% if flag == true%> <% void += total_void_amount.to_f %> - - <% flag = false %> + + <% flag = false %> <% end%> - <%if count_of_void == 0%> - + <%if count_of_void == 0%> + <%end %> + <%= number_with_delimiter(sprintf("%.2f",((sale[:cash_amount].to_f + sale[:credit_amount].to_f + sale[:card_amount].to_f + sale[:credit_payment].to_f) - sale[:today_credit_payment].to_f) ).to_f, :delimiter => ',') %> + -<%count_of_void= 0%> +<%count_of_void= 0%> <% count = count + 1 %> <% end %> - + - - - - + + + + - - + + <% end %>
Location Name DateCash SalesCash Sales Credit Sales Credit Received Card PaymentCard Payment Total Discount Total Taxes Total Other Charges FOC SalesVoid SalesVoid Sales Grand Total
<%= sale[:location].to_s rescue '-' %><%= sale[:sale_date].strftime("#{sale[:sale_date].day.ordinalize} %b") rescue '-' %><%= number_with_delimiter(sprintf("%.2f",sale[:cash_amount].to_f), :delimiter => ',') %><%= sale[:location].to_s rescue '-' %><%= sale[:sale_date].strftime("#{sale[:sale_date].day.ordinalize} %b") rescue '-' %><%= number_with_delimiter(sprintf("%.2f",sale[:cash_amount].to_f), :delimiter => ',') %> <%= number_with_delimiter(sprintf("%.2f",sale[:credit_amount].to_f), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",sale[:credit_payment].to_f), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",sale[:card_amount].to_f), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",sale[:credit_payment].to_f), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",sale[:card_amount].to_f), :delimiter => ',') %> <%= number_with_delimiter(sprintf("%.2f",sale[:total_discount].to_f), :delimiter => ',') %> <%= number_with_delimiter(sprintf("%.2f",sale[:total_tax].to_f), :delimiter => ',') %> <%= number_with_delimiter(sprintf("%.2f",sale[:other_charges].to_f), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",sale[:foc_amount].to_f), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",sale[:foc_amount].to_f), :delimiter => ',') %> <%= number_with_delimiter(sprintf("%.2f",total_void_amount.to_f), :delimiter => ',') %> <%= number_with_delimiter(sprintf("%.2f",total_void_amount.to_f), :delimiter => ',') %> <%= number_with_delimiter(sprintf("%.2f",0.to_f), :delimiter => ',') %> <%= number_with_delimiter(sprintf("%.2f",0.to_f), :delimiter => ',') %> - <%= number_with_delimiter(sprintf("%.2f",((sale[:cash_amount].to_f + sale[:credit_amount].to_f + sale[:card_amount].to_f + sale[:credit_payment].to_f) - sale[:today_credit_payment].to_f) ).to_f, :delimiter => ',') %> -
Grand Total <%= number_with_delimiter(sprintf("%.2f",cash), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",credit ), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",credit_payment ), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",card ), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",discount ), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",credit ), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",credit_payment ), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",card ), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",discount ), :delimiter => ',') %> <%= number_with_delimiter(sprintf("%.2f",total_tax ), :delimiter => ',') %> <%= number_with_delimiter(sprintf("%.2f",total_other_charges ), :delimiter => ',') %> <%= number_with_delimiter(sprintf("%.2f",foc ), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",void ), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f", (cash.to_f + credit.to_f + card.to_f + credit_payment.to_f) - today_credit_payment_amount.to_f ).to_f, :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f",void ), :delimiter => ',') %><%= number_with_delimiter(sprintf("%.2f", (cash.to_f + credit.to_f + card.to_f + credit_payment.to_f) - today_credit_payment_amount.to_f ).to_f, :delimiter => ',') %>
-
\ No newline at end of file +