Merge branch 'adminbsb_material_ui' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -339,13 +339,14 @@ $(function(){
|
||||
$(".sx_item_set_detailModal").css({ 'display': "none" });
|
||||
}else{
|
||||
$(".sx_item_set_detailModal").css({ 'display': "block" });
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Please Select Minimum ' + min_qty + " items",
|
||||
type: 'red',
|
||||
typeAnimated: true,
|
||||
btnClass: 'btn-danger',
|
||||
});
|
||||
swal("Alert !", 'Please Select Minimum ' + min_qty + " items", "warning");
|
||||
// $.alert({
|
||||
// title: 'Alert!',
|
||||
// content: 'Please Select Minimum ' + min_qty + " items",
|
||||
// type: 'red',
|
||||
// typeAnimated: true,
|
||||
// btnClass: 'btn-danger',
|
||||
// });
|
||||
}
|
||||
|
||||
}); //End add order Click
|
||||
@@ -420,7 +421,7 @@ $(function(){
|
||||
for(var field in attributes) {
|
||||
value = attributes[field]["values"];
|
||||
type = attributes[field]["type"]
|
||||
row = "<h4>"+attributes[field]["type"]+"</h4>";
|
||||
row = "<h5>"+attributes[field]["type"]+"</h5>";
|
||||
|
||||
$(value).each(function(i){
|
||||
disabled = ""
|
||||
@@ -794,11 +795,10 @@ $(function(){
|
||||
// Get Selected Class
|
||||
function change_qty_plus_minus(id,plus,minus) {
|
||||
|
||||
var count = 1;
|
||||
var count = parseInt($('#'+id).val())
|
||||
var countEl = document.getElementById(id);
|
||||
|
||||
$('#'+plus).on("click", function(){
|
||||
|
||||
count++;
|
||||
countEl.value = count;
|
||||
|
||||
@@ -852,6 +852,37 @@ $(function(){
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
$('.keypress_qty').keyup(function(e){
|
||||
|
||||
id = $(this).attr('id');
|
||||
value = $(this).val();
|
||||
|
||||
if (id=="count") {
|
||||
price = $("#unit_price").text();
|
||||
$("#total_price").text(value*price);
|
||||
}else{
|
||||
var item_row = $('.selected-instance');
|
||||
price = $("#set_unit_price").text();
|
||||
set_total_price = $("#set_total_price").text();
|
||||
$("#set_count").val(value);
|
||||
if (item_row.length > 1) {
|
||||
total = 0 ;
|
||||
$(item_row).each(function(i){
|
||||
total += value * $(item_row[i]).attr('data-price');
|
||||
total_price = total;
|
||||
});
|
||||
}else{
|
||||
total_price = value*price;
|
||||
}
|
||||
$("#set_total_price").text(total_price);
|
||||
}
|
||||
});
|
||||
|
||||
/* $("input").keypress(function(){
|
||||
$("span").text(i += 1);
|
||||
});*/
|
||||
// $("#set_change_qty").change(function(){
|
||||
// qty = $(this).val();
|
||||
// price = $("#set_total_price").text();
|
||||
|
||||
@@ -87,3 +87,29 @@
|
||||
|
||||
}
|
||||
|
||||
.cashier_number{
|
||||
width: 33%;
|
||||
height:58px;
|
||||
line-height:58px;
|
||||
text-align:center;
|
||||
background:#54A5AF;
|
||||
// float:left;
|
||||
// margin:2px;
|
||||
font-size:20px;
|
||||
color:white;
|
||||
// cursor:pointer;
|
||||
}
|
||||
|
||||
.red {
|
||||
background-color:#F44336;
|
||||
}
|
||||
|
||||
.green{
|
||||
background-color: #009900;
|
||||
}
|
||||
.left{
|
||||
margin-left:1px;
|
||||
}
|
||||
.bottom{
|
||||
margin-bottom:1px;
|
||||
}
|
||||
|
||||
@@ -152,6 +152,10 @@ section.content{
|
||||
|
||||
}
|
||||
|
||||
#count {
|
||||
#count ,#set_count{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.add_icon{
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -33,7 +33,7 @@ class Crm::CustomersController < BaseCrmController
|
||||
end
|
||||
end
|
||||
end
|
||||
@crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(50)
|
||||
@crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(15)
|
||||
@crm_customer = Customer.new
|
||||
@count_customer = Customer.count_customer
|
||||
|
||||
@@ -70,7 +70,7 @@ class Crm::CustomersController < BaseCrmController
|
||||
#get customer amount
|
||||
@customer = Customer.find(params[:id])
|
||||
@response = Customer.get_membership_transactions(@customer)
|
||||
|
||||
puts @response.to_json
|
||||
# @response = ""
|
||||
#end customer amount
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ class Crm::DiningQueuesController < BaseCrmController
|
||||
def index
|
||||
today = DateTime.now.strftime('%Y-%m-%d')
|
||||
@dining_queues = DiningQueue.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and status is NULL ", today).order("queue_no asc")
|
||||
@complete_queue = DiningQueue.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and status = 'Assign' ", today).order("queue_no asc")
|
||||
end
|
||||
|
||||
# GET /crm/dining_queues/1
|
||||
|
||||
@@ -215,7 +215,7 @@ class Origami::DiscountsController < BaseOrigamiController
|
||||
else
|
||||
response = {"status": false, "message": "You have no selected discount item" }
|
||||
end
|
||||
puts "discount"
|
||||
puts "discountttttttttttt"
|
||||
puts response.to_json
|
||||
# Re-calc All Amount in Sale
|
||||
if response["status"] == true
|
||||
|
||||
61
app/controllers/transactions/shift_sales_controller.rb
Normal file
61
app/controllers/transactions/shift_sales_controller.rb
Normal file
@@ -0,0 +1,61 @@
|
||||
class Transactions::ShiftSalesController < ApplicationController
|
||||
load_and_authorize_resource except: [:create]
|
||||
before_action :set_transactions_shift_sale, only: [:show, :edit, :update, :destroy]
|
||||
|
||||
def index
|
||||
|
||||
filter = params[:filter]
|
||||
from = params[:from]
|
||||
to = params[:to]
|
||||
|
||||
if filter.nil? && from.nil? && to.nil?
|
||||
@shift_sales = ShiftSale.all.order("id desc")
|
||||
@shift_sales = Kaminari.paginate_array(@shift_sales).page(params[:page]).per(20)
|
||||
else
|
||||
shift_sale = ShiftSale.search(filter,from,to)
|
||||
if shift_sale.count > 0
|
||||
@shift_sales = shift_sale
|
||||
@shift_sales = Kaminari.paginate_array(@shift_sales).page(params[:page]).per(20)
|
||||
else
|
||||
@shift_sales = 0
|
||||
end
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.json { render json: @shift_sales }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# GET /transactions/shift_sales/1
|
||||
# GET /transactions/shift_sales/1.json
|
||||
def show
|
||||
|
||||
@shift = ShiftSale.find(params[:id])
|
||||
|
||||
#get tax
|
||||
shift_obj = ShiftSale.where('id =?',@shift.id)
|
||||
@sale_taxes = Sale.get_separate_tax(shift_obj,from=nil,to=nil,type='')
|
||||
#other payment details for mpu or visa like card
|
||||
@other_payment = ShiftSale.get_by_shift_other_payment(@shift)
|
||||
|
||||
# Calculate price_by_accounts
|
||||
@total_amount_by_account = ShiftSale.calculate_total_price_by_accounts(@shift,'amount')
|
||||
@total_discount_by_account = ShiftSale.calculate_total_price_by_accounts(@shift,'discount')
|
||||
@total_member_discount = ShiftSale.get_total_member_discount(@shift)
|
||||
|
||||
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.json { render json: @shift }
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
# Use callbacks to share common setup or constraints between actions.
|
||||
def set_transactions_shift_sale
|
||||
@transactions_shift_sale = ShiftSale.find(params[:id])
|
||||
end
|
||||
end
|
||||
@@ -135,4 +135,20 @@ class ShiftSale < ApplicationRecord
|
||||
|
||||
end
|
||||
|
||||
def self.search(filter,from,to)
|
||||
if filter.blank?
|
||||
keyword = ''
|
||||
else
|
||||
keyword = "booking_id LIKE ? OR checkin_by LIKE ? OR booking_status LIKE? OR checkout_by LIKE? OR sale_id ='#{filter}'","%#{filter}%","%#{filter}%","%#{filter}%","%#{filter}%"
|
||||
end
|
||||
|
||||
if from.present? && to.present?
|
||||
booking = ShiftSale.where("DATE_FORMAT(created_at,'%d-%m-%Y') >= ?" + " AND DATE_FORMAT(created_at,'%d-%m-%Y') <= ? and NOT booking_status = 'void' ", from,to)
|
||||
query = booking.where(keyword)
|
||||
else
|
||||
where("booking_id LIKE ? OR checkin_by LIKE ? OR booking_status LIKE? OR checkout_by LIKE? OR sale_id ='#{filter}'","%#{filter}%","%#{filter}%","%#{filter}%","%#{filter}%")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
str="[\"#{msg['name']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<% str="[\"#{msg['company']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
@@ -55,7 +55,7 @@
|
||||
<% str="[\"#{msg['contact_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<% str="[\"#{msg['email']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
<% str="[\"#{msg['card_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><%= @customer.card_no rescue '-'%></td>
|
||||
@@ -43,9 +44,9 @@
|
||||
<td><%= @customer.company rescue '-' %></td>
|
||||
<td><%= @customer.contact_no %></td>
|
||||
<td><%= @customer.email %></td>
|
||||
<td><%= @customer.nrc_no %></td>
|
||||
<td><%= @customer.address%></td>
|
||||
<td><%= @customer.date_of_birth %></td>
|
||||
<td><%= @customer.nrc_no rescue '-' %></td>
|
||||
<td><%= @customer.address rescue '-'%></td>
|
||||
<td><%= @customer.date_of_birth rescue '-'%></td>
|
||||
<% if @customer.membership_type.to_f > 0%>
|
||||
<td><%lookup= Lookup.find_by_value(@customer.membership_type) %>
|
||||
<%= lookup.name %>
|
||||
@@ -80,7 +81,7 @@
|
||||
<tr>
|
||||
<td><%= transaction["date"]%></td>
|
||||
<!-- <td><%= transaction["redeem"]%></td> -->
|
||||
<td><%= transaction["rebate"] %></td>
|
||||
<td><%= transaction["deposit"] %></td>
|
||||
<!-- <td><%= transaction["balance"] %></td> -->
|
||||
<td><%= transaction["account_status"] %></td>
|
||||
<td><%= transaction["status"] %></td>
|
||||
@@ -104,7 +105,6 @@
|
||||
<tr>
|
||||
<th><%= t("views.right_panel.detail.order_id") %></th>
|
||||
<th><%= t("views.right_panel.detail.type") %></th>
|
||||
<th><%= t("views.right_panel.detail.type") %></th>
|
||||
<th><%= t("views.right_panel.detail.order_status") %></th>
|
||||
<th><%= t("views.right_panel.detail.order_date") %></th>
|
||||
<th><%= t("views.right_panel.detail.items_count") %></th>
|
||||
@@ -114,10 +114,10 @@
|
||||
<tbody>
|
||||
<% @orders.each do |order| %>
|
||||
<tr>
|
||||
<td><%= order.order_id %></td>
|
||||
<td><%= link_to order.order_id, transactions_order_path(order) %></td>
|
||||
<td><%= order.order_type %></td>
|
||||
<td><%= order.status %></td>
|
||||
<td><%= order.date.strftime("%d-%m-%Y") %> </td>
|
||||
<td><%= order.date.strftime("%d-%m-%Y %I:%m %p") %> </td>
|
||||
<td><%= order.item_count %> </td>
|
||||
</tr>
|
||||
<% end %>
|
||||
@@ -146,13 +146,13 @@
|
||||
<tbody>
|
||||
<% @sales.each do |sale| %>
|
||||
<tr>
|
||||
<td><%= sale.sale_id %></td>
|
||||
<td><%= link_to sale.sale_id, transactions_sale_path(sale) %></td>
|
||||
<td><%= sale.receipt_no %></td>
|
||||
<td><%= sale.grand_total rescue '-' %></td>
|
||||
<td><%= sale.total_tax %></td>
|
||||
<td><%= sale.cashier_name rescue '-' %></td>
|
||||
<td> <%= sale.sale_status %> </td>
|
||||
<td> <%= sale.receipt_date.strftime("%d-%m-%Y") %> </td>
|
||||
<td> <%= sale.receipt_date.strftime("%d-%m-%Y %I:%m %p") %> </td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
@@ -1,27 +1,83 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<%= simple_form_for([:crm,@dining_queue]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<p class="hidden generate_no"><%= @queue_no %></p>
|
||||
<div class="col-md-6">
|
||||
<!-- <div class="col-md-6"> -->
|
||||
<div class="form-inputs">
|
||||
<%= f.input :queue_no , :class => "dining",:id => "dining", :readonly => true%>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :contact_no %>
|
||||
<%= f.input :seater %>
|
||||
<%= f.input :remark %>
|
||||
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit,"Create Queue" ,:class=>"btn btn-primary bg-blue btn-lg waves-effect"%>
|
||||
<%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-12 col-md-93 col-lg-3">
|
||||
<div class="col-xs-12 col-sm-12 col-md-5 col-lg-5">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
||||
<div class="p-l-20 m-t-60">
|
||||
<div class="row bottom">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 m-l--5">
|
||||
<div class="row m-l--5">
|
||||
<div class="col-md-3 left cashier_number" data-value="1" data-type="num">1</div>
|
||||
<div class="col-md-3 left cashier_number" data-value="2" data-type="num">2</div>
|
||||
<div class="col-md-3 left cashier_number" data-value="3" data-type="num">3</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row bottom">
|
||||
<div class="col-md-12 m-l--5">
|
||||
<div class="row m-l--5">
|
||||
<div class="col-md-3 left cashier_number" data-value="4" data-type="num">4</div>
|
||||
<div class="col-md-3 left cashier_number" data-value="5" data-type="num">5</div>
|
||||
<div class="col-md-3 left cashier_number" data-value="6" data-type="num">6</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row bottom">
|
||||
<div class="col-md-12 m-l--5">
|
||||
<div class="row m-l--5">
|
||||
<div class="col-md-3 left cashier_number" data-value="7" data-type="num">7</div>
|
||||
<div class="col-md-3 left cashier_number" data-value="8" data-type="num">8</div>
|
||||
<div class="col-md-3 left cashier_number" data-value="9" data-type="num">9</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row bottom">
|
||||
<div class="col-md-12 m-l--5">
|
||||
<div class="row m-l--5">
|
||||
<div class="col-md-3 left cashier_number" data-value="0" data-type="num">0</div>
|
||||
<div class="col-md-3 left cashier_number" data-value="." data-type="num">.</div>
|
||||
<div class="col-md-3 left cashier_number" data-value="00" data-type="num">00</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row bottom">
|
||||
<div class="col-md-12 m-l--5">
|
||||
<div class="row m-l--5">
|
||||
<div class="col-md-3 left cashier_number"></div>
|
||||
<div class="col-md-3 left cashier_number red" data-type="del">DEL</div>
|
||||
<div class="col-md-3 left cashier_number green" data-type="clr">CLR</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
@@ -50,9 +106,55 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
if($('form').attr('id') == "new_dining_queue"){
|
||||
|
||||
if($('form').attr('id') == "new_dining_queue"){
|
||||
var queue_no = $('.generate_no').text();
|
||||
$('#dining_queue_queue_no').val(queue_no);
|
||||
}
|
||||
}
|
||||
|
||||
$( "input" ).focusin(function() {
|
||||
$('.addfocus').removeClass('addfocus');
|
||||
$( this ).addClass('addfocus');
|
||||
});
|
||||
|
||||
$(".cashier_number").on('click', function(event){
|
||||
if(event.handled !== true) {
|
||||
|
||||
var original_value='';
|
||||
original_value = $('.addfocus').val();
|
||||
|
||||
var input_type = $(this).attr("data-type");
|
||||
|
||||
switch (input_type) {
|
||||
case 'num':
|
||||
var input_value = $(this).attr("data-value");
|
||||
if (original_value == "0.0"){
|
||||
$('.addfocus').val(input_value);
|
||||
}
|
||||
else{
|
||||
$('.addfocus').val(original_value + '' + input_value);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'add':
|
||||
var input_value = $(this).attr("data-value");
|
||||
amount = parseInt(input_value);
|
||||
$('.addfocus').val(amount);
|
||||
break;
|
||||
|
||||
case 'del' :
|
||||
var discount_text=$('.addfocus').val();
|
||||
$('.addfocus').val(discount_text.substr(0,discount_text.length-1));
|
||||
break;
|
||||
|
||||
case 'clr':
|
||||
$('.addfocus').val("");
|
||||
break;
|
||||
}
|
||||
event.handled = true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -11,42 +11,79 @@
|
||||
|
||||
<div class="row">
|
||||
<!-- Column One -->
|
||||
<div class="col-lg-11 col-md-11 col-sm-11">
|
||||
<div class="col-lg-8 col-md-8 col-sm-8">
|
||||
|
||||
<div class="tab-content" style="max-height:670px; overflow-y:auto">
|
||||
|
||||
<!--- Panel 1 - Table Orders -->
|
||||
<div class="active" role="tabpanel">
|
||||
<div class="tab-pane" role="tabpanel">
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||
|
||||
<% @dining_queues.each do |queue| %>
|
||||
<% if queue.status == "Assign"
|
||||
@bg_color = "assign"
|
||||
elsif queue.status == "Cancel"
|
||||
@bg_color = "cancel"
|
||||
else
|
||||
@bg_color = "normal"
|
||||
end
|
||||
%>
|
||||
<div class="card select-queue <%= @bg_color %>" data-id="<%= queue.id %>" style="width: 21.5rem;">
|
||||
<div class="card-block">
|
||||
<p class="hidden queue-id"><%= queue.id %></p>
|
||||
<p class="hidden queue-status"><%= queue.status %></p>
|
||||
<span class="card-title"><strong> Queue No : <%= queue.queue_no %></strong></span>
|
||||
<span class="card-title pull-right"><strong> Seater : <%= queue.seater %></strong></span><br>
|
||||
<span class="card-title"> Name : <%= queue.name %></span><br>
|
||||
<span class="card-title"> Contact No : <%= queue.contact_no %></span>
|
||||
<span class="card-title"> Remark : <%= queue.remark %></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-content" style="" id="custom-slimscroll">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<% if @dining_queues.count > 0 %>
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||
|
||||
<% @dining_queues.each do |queue| %>
|
||||
<% if queue.status == "Assign"
|
||||
@bg_color = "assign"
|
||||
elsif queue.status == "Cancel"
|
||||
@bg_color = "cancel"
|
||||
else
|
||||
@bg_color = "normal"
|
||||
end
|
||||
%>
|
||||
<div class="card select-queue <%= @bg_color %>" data-id="<%= queue.id %>" style="">
|
||||
<div class="card-block">
|
||||
<p class="hidden queue-id"><%= queue.id %></p>
|
||||
<p class="hidden queue-status"><%= queue.status %></p>
|
||||
<span class="card-title"><strong> Queue No : <%= queue.queue_no %></strong></span>
|
||||
<span class="card-title float-right"><strong> Seater : <%= queue.seater %></strong></span><br>
|
||||
<span class="card-title"> Name : <%= queue.name %></span><br>
|
||||
<span class="card-title"> Contact No : <%= queue.contact_no %></span><br>
|
||||
<span class="card-title"> Remark : <%= queue.remark %></span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<p>There is no queue Now !</p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- tabs - End -->
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h6><i class="material-icons md-18">view_headline QUEUE DETAILs</i> </h6>
|
||||
<p>
|
||||
1) Latest Queue No - <%= @complete_queue.last.queue_no%> <br>
|
||||
2) Next Queue No - <% @next = @complete_queue.last.queue_no.to_i + 1%>
|
||||
<%= @next%> <br>
|
||||
3) Today Completed Queue - <strong> <%= @complete_queue.count %> </strong><br>
|
||||
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.cancel") %>
|
||||
<%= t("views.right_panel.button.queue") %> -
|
||||
<%= t("views.right_panel.detail.cancel_btn_txt") %>
|
||||
<%= t("views.right_panel.detail.queue_txt") %> <br>
|
||||
|
||||
2) <%= t("views.btn.new") %>
|
||||
<%= t("views.right_panel.button.queue") %> -
|
||||
<%= t("views.right_panel.detail.create_btn_txt") %>
|
||||
<%= t("views.right_panel.detail.queue_txt") %><br>
|
||||
|
||||
2) <%= t("views.btn.assign") %>
|
||||
<%= t("views.right_panel.button.queue") %> -
|
||||
<%= t("views.right_panel.detail.assign_txt") %>
|
||||
<%= t("views.right_panel.detail.queue_txt") %><br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<%= link_to t("views.btn.new"),new_crm_dining_queue_path,:class => 'btn bg-green btn-block btn-lg btn-block', 'data-no-turbolink' => true %>
|
||||
@@ -112,3 +149,10 @@ function cancel_queue(id,url) {
|
||||
}
|
||||
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.card-columns {
|
||||
-webkit-column-count: 4;
|
||||
-moz-column-count: 4;
|
||||
column-count: 4;
|
||||
}
|
||||
</style>
|
||||
@@ -77,12 +77,12 @@
|
||||
<span><%= t :transactions %></span>
|
||||
</a>
|
||||
<ul class="ml-menu">
|
||||
<% if can? :menage, Booking %>
|
||||
<% if can? :menage, Booking %>
|
||||
<li>
|
||||
<a href="<%= transactions_bookings_path %>"><%= t :bookings %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if can? :menage, Order %>
|
||||
<% if can? :menage, Order %>
|
||||
<li>
|
||||
<a href="<%= transactions_orders_path %>"><%= t :orders %></a>
|
||||
</li>
|
||||
@@ -97,6 +97,11 @@
|
||||
<a href="<%= transactions_credit_notes_path %>"><%= (t :credit) %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if can? :menage, Sale %>
|
||||
<li>
|
||||
<a href="<%= transactions_shift_sales_path %>"><%= (t :shiftsale) %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<br>
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<strong id="order-title">ORDER DETAILS </strong>| Table<%=@table.name%>
|
||||
<strong id="order-title" class="font-14">ORDER DETAILS </strong>| <span class="font-14">Table-<%=@table.name%></span>
|
||||
<p class="hidden" id="table_id"><%=@table_id%></p>
|
||||
<p class="hidden" id="table_type"><%=@table.type%></p>
|
||||
<p class="hidden" id="booking_id"><%=@booking_id%></p>
|
||||
@@ -62,7 +62,7 @@
|
||||
<td class="item-attr"><strong id="sub_total">0.00</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<button type="button" class="btn btn-success btn-block create" id="create_order" disabled="disabled">Create Order</button>
|
||||
<button type="button" class="btn btn-primary btn-block create" id="create_order" disabled="disabled">Create Order</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,8 +98,16 @@
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" id="close">Close</button>
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal" id="save">Update</button>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" id="close">Close</button>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-primary " data-dismiss="modal" id="save">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -110,7 +118,7 @@
|
||||
<div class="item-modal modal sx_item_detailModal" id="sx_item_detailModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog custom-modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #54A5AF;">
|
||||
<div class="modal-header" style="background-color: #54A5AF;padding-top:10px !important;">
|
||||
<h4 class="modal-title" style="color:#fff;" id="title_name"></h4>
|
||||
<button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;color:#fff;">×</button>
|
||||
|
||||
@@ -131,7 +139,7 @@
|
||||
|
||||
</button>
|
||||
</span>
|
||||
<input type="text" value="1" id="count" class="change_qty form-control col-md-12 ">
|
||||
<input type="number" value="1" id="count" class="change_qty keypress_qty form-control col-md-12 ">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-success btn-number" value="+" id="plus">
|
||||
<i class="material-icons">add</i>
|
||||
@@ -147,13 +155,15 @@
|
||||
<p class="hidden" id="item_code"></p>
|
||||
</div>
|
||||
<div class="col-md-7 item-detail">
|
||||
<strong style="font-size: 18px;">Attributes</strong>
|
||||
<h5>Attributes</h5>
|
||||
<div class="attributes-list">
|
||||
|
||||
</div>
|
||||
<strong style="font-size: 18px;">Options</strong>
|
||||
<hr>
|
||||
<h5>Options</h5>
|
||||
<div class="options-list">
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -161,8 +171,18 @@
|
||||
<div class="mr-auto">
|
||||
<h4 class=" pull-left">Total : <span id="total_price"></span></h4>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary m-r-20" data-dismiss="modal" id="close">Close</button>
|
||||
<button type="button" class="btn btn-success add_to_order m-r-10" data-dismiss="modal" id="add_to_order">Add to Order</button>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
<button type="button" class="btn btn-default " data-dismiss="modal" id="close">Close</button>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button type="button" class="btn btn-primary add_to_order " data-dismiss="modal" id="add_to_order">Add to Order</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -173,7 +193,7 @@
|
||||
<div class=" modal sx_item_set_detailModal" id="sx_item_set_detailModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" >
|
||||
<div class="modal-dialog custom-modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #54A5AF;">
|
||||
<div class="modal-header" style="background-color: #54A5AF;padding-top:10px !important;">
|
||||
<h4 class="modal-title" style="color:#fff;" id="set_name"></h4>
|
||||
<button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;color:#fff;">×</button>
|
||||
|
||||
@@ -193,7 +213,7 @@
|
||||
<i class="material-icons">remove</i>
|
||||
</button>
|
||||
</span>
|
||||
<input type="text" value="1" id="set_count" class="set_change_qty form-control col-md-12 ">
|
||||
<input type="number" value="1" id="set_count" class="set_change_qty keypress_qty form-control col-md-12 ">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-success btn-number" value="+" id="set_plus">
|
||||
<i class="material-icons">add</i>
|
||||
@@ -222,8 +242,17 @@
|
||||
<div class="mr-auto">
|
||||
<h4 class=" pull-left">Total : <span id="set_total_price"></span></h4>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" id="close">Close</button>
|
||||
<button type="button" class="btn btn-success set_order" data-dismiss="modal" id="set_order">Add to Order</button>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" id="close">Close</button>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button type="button" class="btn btn-primary set_order" data-dismiss="modal" id="set_order">Add to Order</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :role, :collection => Lookup.collection_of("employee_roles"),:class=>'form-group' %>
|
||||
<%= f.input :emp_id, :as => :integer, :label => "Employee Numberic ID (*Unique)" %>
|
||||
<%= f.input :emp_id, :label => "Employee Numberic ID (*Unique)" %>
|
||||
<%= f.input :password %>
|
||||
|
||||
</div>
|
||||
|
||||
105
app/views/transactions/shift_sales/index.html.erb
Executable file
105
app/views/transactions/shift_sales/index.html.erb
Executable file
@@ -0,0 +1,105 @@
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t :shiftsale %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="main-box-body clearfix p-l-5 p-r-5">
|
||||
<!-- <div class="table-responsive">
|
||||
<table class="table table-">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
<%= form_tag transactions_shift_sales_path, :method => :get do %>
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
|
||||
<label><%= t("views.right_panel.detail.enter_keyboards") %></label>
|
||||
<input type="text" name="receipt_no" class="form-control" placeholder="" style="margin-right: 10px">
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
|
||||
<label class=""><%= t("views.right_panel.detail.from") %></label>
|
||||
<input class="form-control datepicker" name="from" id="from date" type="text" placeholder="From date">
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
|
||||
<label class=""><%= t("views.right_panel.detail.to") %></label>
|
||||
<input class="form-control datepicker" name="to" id="to date" type="text" placeholder="To date">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
|
||||
<label></label>
|
||||
<br><input type="submit" value="Search" class='btn btn-primary btn-md'>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> -->
|
||||
<div class="card">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Cashier Name</th>
|
||||
<th>Cashier Terminal </th>
|
||||
<th>Opening Time </th>
|
||||
<th>Closing Time </th>
|
||||
<th>Opening float </th>
|
||||
<th>Closing Amount </th>
|
||||
<th>Cast In </th>
|
||||
<th>Cast Out </th>
|
||||
<th>Total Receipt </th>
|
||||
<th>Dining Count </th>
|
||||
<th>Takeaway Count </th>
|
||||
<th>Total Void</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% if @shift_sales != 0 %>
|
||||
<% @shift_sales.each do |shift_sale| %>
|
||||
<tr>
|
||||
<td><%= shift_sale.employee.name%></td>
|
||||
<td><%=shift_sale.cashier_terminal.name%></td>
|
||||
<td><%= shift_sale.shift_started_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') %>
|
||||
</td>
|
||||
<td><%= shift_sale.shift_started_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') rescue '-' %>
|
||||
</td>
|
||||
<td><%=shift_sale.opening_balance %></td>
|
||||
<td><%=shift_sale.closing_balance %></td>
|
||||
<td><%=shift_sale.cash_in %></td>
|
||||
<td><%=shift_sale.cash_out %></td>
|
||||
<th><%= shift_sale.total_receipt %></th>
|
||||
<th><%= shift_sale.dining_count %></th>
|
||||
<th><%= shift_sale.takeaway_count %></th>
|
||||
<th>(<%= shift_sale.total_void.round(2) %>)</th>
|
||||
<td><%= link_to t("views.btn.show"), transactions_shift_sale_path(shift_sale),:class => 'btn btn-info btn-sm waves-effect' %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<tr><td colspan="8"><strong><p style="text-align: center">There is no data for search....</p></strong></td></tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<% if @shift_sales != 0 %>
|
||||
<%= paginate @shift_sales %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1
app/views/transactions/shift_sales/index.json.jbuilder
Executable file
1
app/views/transactions/shift_sales/index.json.jbuilder
Executable file
@@ -0,0 +1 @@
|
||||
json.array! @transactions_sales, partial: 'transactions_sales/transactions_sale', as: :transactions_sale
|
||||
59
app/views/transactions/shift_sales/indexback.html.erb
Executable file
59
app/views/transactions/shift_sales/indexback.html.erb
Executable file
@@ -0,0 +1,59 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<h1><%= t("views.right_panel.header.transactions_sales") %></h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t :cashier %></th>
|
||||
<th><%= t :cashier %> <%= t("views.right_panel.detail.name_txt2") %></th>
|
||||
<th><%= t("views.right_panel.detail.requested_by") %></th>
|
||||
<th><%= t("views.right_panel.detail.requested_at") %></th>
|
||||
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.receipt_date") %></th>
|
||||
<th><%= t :customer %></th>
|
||||
<th><%= t("views.right_panel.detail.payment_status") %></th>
|
||||
<th><%= t("views.right_panel.detail.sale_status") %></th>
|
||||
<th><%= t("views.right_panel.detail.total_amount") %></th>
|
||||
<th><%= t("views.right_panel.detail.total_discount") %></th>
|
||||
<th><%= t("views.right_panel.detail.total_tax") %></th>
|
||||
<th><%= t("views.right_panel.detail.tax_type") %></th>
|
||||
<th><%= t("views.right_panel.detail.grand_total") %></th>
|
||||
<th><%= t("views.right_panel.detail.rnd_adj") %></th>
|
||||
<th><%= t("views.right_panel.detail.amt_received") %></th>
|
||||
<th><%= t("views.right_panel.detail.amt_changed") %></th>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @transactions_sales.each do |transactions_sale| %>
|
||||
<tr>
|
||||
<td><%= transactions_sale.cashier %></td>
|
||||
<td><%= transactions_sale.cashier_name %></td>
|
||||
<td><%= transactions_sale.requested_by %></td>
|
||||
<td><%= transactions_sale.requested_at %></td>
|
||||
<td><%= transactions_sale.receipt_no %></td>
|
||||
<td><%= transactions_sale.receipt_date %></td>
|
||||
<td><%= transactions_sale.customer %></td>
|
||||
<td><%= transactions_sale.payment_status %></td>
|
||||
<td><%= transactions_sale.sale_status %></td>
|
||||
<td><%= transactions_sale.total_amount %></td>
|
||||
<td><%= transactions_sale.total_discount %></td>
|
||||
<td><%= transactions_sale.total_tax %></td>
|
||||
<td><%= transactions_sale.tax_type %></td>
|
||||
<td><%= transactions_sale.grand_total %></td>
|
||||
<td><%= transactions_sale.rounding_adjustment %></td>
|
||||
<td><%= transactions_sale.amount_received %></td>
|
||||
<td><%= transactions_sale.amount_changed %></td>
|
||||
<td><%= link_to t("views.btn.show"), transactions_sale %></td>
|
||||
<td><%= link_to t("views.btn.edit"), edit_transactions_sale_path(transactions_sale) %></td>
|
||||
<td><%= link_to t("views.btn.delete"), transactions_sale, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<%= link_to 'New Transactions Sale', new_transactions_sale_path %>
|
||||
196
app/views/transactions/shift_sales/show.html.erb
Executable file
196
app/views/transactions/shift_sales/show.html.erb
Executable file
@@ -0,0 +1,196 @@
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li class="breadcrumb-item"><a href="<%= transactions_shift_sales_path %>"><%= t :shiftsale %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', transactions_shift_sales_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="main-box-body clearfix p-l-5 p-r-5">
|
||||
<div class="card">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Cashier </th>
|
||||
<th>Cashier Terminal </th>
|
||||
<th>Opening Date </th>
|
||||
<th>Opening float </th>
|
||||
<th>Received Amount </th>
|
||||
<th>Cast In </th>
|
||||
<th>Cast Out </th>
|
||||
<th>Total Receipt </th>
|
||||
<th>Dining Count </th>
|
||||
<th>Takeaway Count </th>
|
||||
<th>Total Void</th>
|
||||
</tr>
|
||||
<tr style="border-bottom:2px solid #000">
|
||||
<td><%= @shift.employee.name%></td>
|
||||
<td><%=@shift.cashier_terminal.name%></td>
|
||||
<td><%= @shift.shift_started_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') %>
|
||||
</td>
|
||||
<td><%=@shift.opening_balance %></td>
|
||||
<td><%=@shift.closing_balance %></td>
|
||||
<td><%=@shift.cash_in %></td>
|
||||
<td><%=@shift.cash_out %></td>
|
||||
<th><%= @shift.total_receipt %></th>
|
||||
<th><%= @shift.dining_count %></th>
|
||||
<th><%= @shift.takeaway_count %></th>
|
||||
<th>(<%= @shift.total_void.round(2) %>)</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<table width="100%">
|
||||
<% @total_amount_by_account.each do |amount| %>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td style="text-align: right;"> Total <%= amount.account_name %> Amount</td>
|
||||
<td><%= amount.total_price.round(2) %></td>
|
||||
</tr>
|
||||
<%end%>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right;"> Net Sales</th>
|
||||
<th><%=@shift.nett_sales %></th>
|
||||
</tr>
|
||||
|
||||
<% @total_discount_by_account.each do |amount| %>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td style="text-align: right;"> Total <%= amount.account_name %> Discount</td>
|
||||
<td><%= amount.total_price.round(2) %></td>
|
||||
</tr>
|
||||
<%end%>
|
||||
|
||||
<% if !@total_member_discount[0].member_discount.nil?
|
||||
@member_discount = @total_member_discount[0].member_discount rescue 0.0
|
||||
@overall = @shift.total_discounts - @member_discount
|
||||
%>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right;"> Total Member Discount</th>
|
||||
<th><%= @member_discount %></th>
|
||||
</tr>
|
||||
<%else @overall = @shift.total_discounts %>
|
||||
|
||||
<%end%>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right;"> Total Overall Discount</th>
|
||||
<th><%= @overall %></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right;"> Total Discount</th>
|
||||
<th><%= @shift.total_discounts %></th>
|
||||
</tr>
|
||||
|
||||
<% @sale_taxes.each do |tax| %>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td style="text-align: right;"> <%= tax.tax_name %> </td>
|
||||
<td><%= tax.st_amount.round(2) %></td>
|
||||
</tr>
|
||||
<%end%>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right;"> Total Tax </th>
|
||||
<th><%=@shift.total_taxes %></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right;"> Rounding Adj </th>
|
||||
<th><%= @shift.total_rounding.round(2) %></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right;"> Grand Total </th>
|
||||
<th><%= @shift.grand_total.round(2) %></th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="6">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right;">Cash Payment </th>
|
||||
<th><%=@shift.cash_sales %></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right;">Credit Payment </th>
|
||||
<th><%=@shift.credit_sales %></th>
|
||||
</tr>
|
||||
<% @total_amount = 0
|
||||
|
||||
@other_payment.each do |other| %>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right;">Other Payment Detail </th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td style="text-align: right;">MPU Payment </td>
|
||||
<td><%=other.mpu_amount.round(2) rescue 0.0 %></td>
|
||||
<% @total_amount = @total_amount+other.mpu_amount rescue 0.0 %>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td style="text-align: right;">VISA Payment </td>
|
||||
<td><%=other.visa_amount.round(2) rescue 0.0 %></td>
|
||||
<% @total_amount = @total_amount+other.visa_amount rescue 0.0 %>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td style="text-align: right;">JCB Payment </td>
|
||||
<td><%=other.master_amount.round(2) rescue 0.0 %></td>
|
||||
<% @total_amount = @total_amount+other.master_amount rescue 0.0 %>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td style="text-align: right;">Master Payment </td>
|
||||
<td><%=other.jcb_amount.round(2) rescue 0.0 %></td>
|
||||
<% @total_amount = @total_amount+other.jcb_amount rescue 0.0 %>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td style="text-align: right;">Reedem Payment </td>
|
||||
<td><%=other.paypar_amount.round(2) rescue 0.0 %></td>
|
||||
<% @total_amount = @total_amount+other.paypar_amount rescue 0.0 %>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td style="text-align: right;"><strong>FOC </strong></td>
|
||||
<td><%=other.foc_amount.round(2) rescue 0.0 %></td>
|
||||
<% @total_amount = @total_amount+other.foc_amount rescue 0.0 %>
|
||||
</tr>
|
||||
<%end%>
|
||||
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right;">Total Other Payment </th>
|
||||
<th><%=@shift.other_sales %></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right;">Total Payment </th>
|
||||
<th><%= @total_amount+@shift.cash_sales+@shift.credit_sales %></th>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
1
app/views/transactions/shift_sales/show.json.jbuilder
Executable file
1
app/views/transactions/shift_sales/show.json.jbuilder
Executable file
@@ -0,0 +1 @@
|
||||
json.partial! "transactions_sales/transactions_sale", transactions_sale: @transactions_sale
|
||||
@@ -28,6 +28,7 @@ en:
|
||||
hourly: "Hourly"
|
||||
top: "Top"
|
||||
orders: "Orders"
|
||||
shiftsale: "ShiftSale"
|
||||
credit: "Credit"
|
||||
bookings: "Booking"
|
||||
home: "Home"
|
||||
@@ -90,6 +91,7 @@ en:
|
||||
filter: "Filter"
|
||||
del: "DEL"
|
||||
clr: "CLR"
|
||||
assign: "ASSIGN"
|
||||
|
||||
print_order_summary: "Print Order Summary"
|
||||
memeber_card: "Member Card"
|
||||
|
||||
@@ -28,6 +28,7 @@ mm:
|
||||
hourly: "နာရီအလိုက်"
|
||||
top: "အရောင်းရဆုံး"
|
||||
orders: "အော်ဒါများ"
|
||||
shiftsale: "အော်ဒါများ"
|
||||
bookings: "အော်ဒါများ"
|
||||
credit: "အကြွေး"
|
||||
home: "မူလစာမျက်နှာ"
|
||||
|
||||
@@ -339,6 +339,7 @@ scope "(:locale)", locale: /en|mm/ do
|
||||
resources :orders
|
||||
resources :credit_notes
|
||||
resources :bookings
|
||||
resources :shift_sales
|
||||
|
||||
get "/sales/:sale_id/manual_complete_sale" => "manual_sales#manual_complete_sale", :as => "manual_complete_sale"
|
||||
get "/sales/:sale_id/void" => "manual_sales#void", :as => "void"
|
||||
|
||||
Reference in New Issue
Block a user