<% if !@print_settings.nil? %> <% if @print_settings.precision.to_i > 0 precision = @print_settings.precision else precision = 0 end #check delimiter if @print_settings.delimiter delimiter = "," else delimiter = "" end %> <% end %>
Receipt No : <%=@sale_data.receipt_no rescue ' '%>
Receipt Date : <%=@sale_data.receipt_date.utc.getlocal.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %>
Table No : <%=@table_no%>
Sale ID : <% if @sale_data %><%=@sale_data.sale_id %><% end %>
Customer : <%= @sale_data.customer.name%>
Checkin Time : <%if !@checkin_time.nil?%><%= @checkin_time.utc.getlocal.strftime("%I:%M %p") %> <%end%>
# Items QTY Price
<% sub_total = 0 count = 0 %> <% @sale_data.sale_items.each do |sale_item| count += 1 %> <% sub_total += sale_item.price%> <%end %>
<%= count %> <%=sale_item.product_name%>@<%=number_with_precision( sale_item.unit_price, precision: precision.to_i )%> <%=sale_item.qty%> <%=(number_with_precision(sale_item.price, precision: precision.to_i ))%>
Amount Due
<%= number_with_precision(@sale_data.grand_total, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
Cash
<%= number_with_precision(@cash, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
Credit
<%= number_with_precision(@credit, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% if @other == 0.0 && @ppamount == 0.0 && @visacount == 0.0 && @jcbcount == 0.0 && @mastercount == 0.0%>
Other Payments
<%= number_with_precision(@other, precision: precision.to_i) rescue number_with_precision(0, precision: precision.to_i) %>
<% else %>
Other Payments
<% end %>
<% if @other != 0.0 %>
MPU
<%= number_with_precision(@other, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %> <% end %> <% if @ppamount != 0.0 %>
Redeem
<%= number_with_precision(@ppamount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %> <% end %> <% if @visacount != 0.0 %>
VISA
<%= number_with_precision(@visacount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %> <% end %> <% if @jcbcount != 0.0 %>
JCB
<%= number_with_precision(@jcbcount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %> <% end %> <% if @mastercount != 0.0 %>
MASTER
<%= number_with_precision(@mastercount, precision: precision.to_i) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %> <% end %> <% if @unionpaycount != 0.0 %>
UNIONPAY
<%= number_with_precision(@unionpaycount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %> <% end %>
Balance
<%= number_with_precision(@sale_data.grand_total, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% end %>

Card Tap