-
- | <%= 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 => ',') %> |
- <% total_void_amount = 0 %>
+ <%= number_with_delimiter(sprintf("%.2f",sale[:foc_amount].to_f), :delimiter => ',') %> |
+ <% 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 %>
- <%= number_with_delimiter(sprintf("%.2f",total_void_amount.to_f), :delimiter => ',') %> |
- <% flag = false %>
+ <%= number_with_delimiter(sprintf("%.2f",total_void_amount.to_f), :delimiter => ',') %> |
+ <% flag = false %>
<% end%>
- <%if count_of_void == 0%>
- <%= number_with_delimiter(sprintf("%.2f",0.to_f), :delimiter => ',') %> |
+ <%if count_of_void == 0%>
+ <%= number_with_delimiter(sprintf("%.2f",0.to_f), :delimiter => ',') %> |
<%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 => ',') %>
- |
+ <%= 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 %>
-
+
| 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 => ',') %> |
<% end %>