<% 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 : <% if @cashier_type == 'quick_service' || @cashier_type == 'food_court' %> <% else %> <%= @sale_data.customer.name%> <% end %>
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 <% if !@sale_payment.nil? %>( Credit )<% end %>
<% if @sale_payment.nil? %> <%= number_with_precision(@sale_data.grand_total, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %> <% else %> <%= number_with_precision(@sale_payment[0].payment_amount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i)%> <% end %>
Cash
<%= number_with_precision(@cash, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% if @sale_payment.nil? && @cashier_type != "food_court" %>
Credit
<%= number_with_precision(@credit, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %> <% end %> <% if @other == 0.0 && @ppamount == 0.0 && @visacount == 0.0 && @jcbcount == 0.0 && @mastercount == 0.0 && @unionpaycount == 0.0 && @alipaycount == 0.0 && @paymalcount == 0.0 && @junctionpaycount == 0.0 && @dingacount == 0.0 && @giftvouchercount == 0.0 %>
Other Payments
<%= number_with_precision(@other, precision: precision.to_i) rescue number_with_precision(0, precision: precision.to_i) %>
<% else %>
Other Payments
<%= number_with_precision(@other_payment, precision: precision.to_i) rescue number_with_precision(0, precision: precision.to_i) %>
<% end %>
MPU
<% if @other != 0.0 %>
<%= number_with_precision(@other, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %>
<%= number_with_precision(0, precision: precision.to_i ) %>
<% end %>
Redeem
<% if @ppamount != 0.0 %>
<%= number_with_precision(@ppamount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %>
<%= number_with_precision(0, precision: precision.to_i ) %>
<% end %>
VISA
<% if @visacount != 0.0 %>
<%= number_with_precision(@visacount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %>
<%= number_with_precision(0, precision: precision.to_i ) %>
<% end %>
JCB
<% if @jcbcount != 0.0 %>
<%= number_with_precision(@jcbcount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %>
<%= number_with_precision(0, precision: precision.to_i ) %>
<% end %>
MASTER
<% if @mastercount != 0.0 %>
<%= number_with_precision(@mastercount, precision: precision.to_i) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %>
<%= number_with_precision(0, precision: precision.to_i ) %>
<% end %>
UNIONPAY
<% if @unionpaycount != 0.0 %>
<%= number_with_precision(@unionpaycount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %>
<%= number_with_precision(0, precision: precision.to_i ) %>
<% end %>
Alipay
<% if @alipaycount != 0.0 %>
<%= number_with_precision(@alipaycount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %>
<%= number_with_precision(0, precision: precision.to_i ) %>
<% end %>
PAYMAL
<% if @paymalcount != 0.0 %>
<%= number_with_precision(@paymalcount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %>
<%= number_with_precision(0, precision: precision.to_i ) %>
<% end %>
DINGA
<% if @dingacount != 0.0 %>
<%= number_with_precision(@dingacount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %>
<%= number_with_precision(0, precision: precision.to_i ) %>
<% end %>
JUNCTION PAY
<% if @junctionpaycount != 0.0 %>
<%= number_with_precision(@junctionpaycount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %>
<%= number_with_precision(0, precision: precision.to_i ) %>
<% end %>
GIFT VOUCHER
<% if @giftvouchercount != 0.0 %>
<%= number_with_precision(@giftvouchercount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% else %>
<%= number_with_precision(0, precision: precision.to_i ) %>
<% end %>
Balance
<%= number_with_precision(@sale_data.grand_total, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
<% if current_login_employee.role == "cashier" %> <% if @other_payment <= 0 && @sale_payment.nil? %> <%if @sale_data.total_discount == 0 %> FOC <% end %> <%end %> <% if @sale_payment.nil? %> Void <% if @other_payment <= 0 %> <%if @sale_data.total_discount == 0 %> Waste Spoile <% end %> <% end %> <% end %> <% else %> <% if @other_payment <= 0 && @sale_payment.nil?%> <%if @sale_data.total_discount == 0 %> <% end %> <% end %> <% end %> <% end %> <% if (@cashier_type=="quick_service" || @cashier_type=="food_court") && @sale_payment.nil? %>
<% if current_login_employee.role == "cashier" %> Edit <% else %>
<% end %> <% end %> <% end %>

Card Tap