calculate induties in bill
This commit is contained in:
@@ -887,8 +887,11 @@ $(function() {
|
||||
e.preventDefault();
|
||||
$("#oqs_loading_wrapper").show();
|
||||
var cashier_type = $("#link_type").val();
|
||||
localStorage.setItem('cashier_type',cashier_type);
|
||||
quick_service = window.location.href.indexOf("quick_service");
|
||||
localStorage.setItem('quick_service',quick_service);
|
||||
food_court = window.location.href.indexOf("food_court");
|
||||
localStorage.setItem('food_court',food_court);
|
||||
if (quick_service != -1 || food_court != -1) {
|
||||
type = cashier_type;
|
||||
var table_type = $('#table_type').text();
|
||||
|
||||
@@ -78,8 +78,8 @@
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
.show_all_commissioner_card{
|
||||
min-height: 805px;
|
||||
max-height: 805px;
|
||||
min-height: 830px;
|
||||
max-height: 830px;
|
||||
overflow: scroll;
|
||||
}
|
||||
.sweet-alert p {
|
||||
@@ -89,4 +89,8 @@
|
||||
.sweet-alert {
|
||||
top :0;
|
||||
margin-top: 20px !important;
|
||||
}
|
||||
.add_to_charges{
|
||||
width:100%;
|
||||
padding:1rem;
|
||||
}
|
||||
@@ -2,7 +2,6 @@ class Induties::AssignInDutiesController < ApplicationController
|
||||
def index
|
||||
@commissioners =[]
|
||||
@commiss=Commissioner.active.all.order(created_at: :desc)
|
||||
# puts @commissioners.to_json
|
||||
@commiss.each do|commissioner|
|
||||
check_in_count =InDuty.where('commissioner_ids =? and out_time is null', commissioner.id.to_json).count;
|
||||
@commissioners.push({ "id"=>commissioner.id,
|
||||
@@ -13,6 +12,7 @@ class Induties::AssignInDutiesController < ApplicationController
|
||||
|
||||
end
|
||||
@booking_id = params[:booking_id]
|
||||
|
||||
end
|
||||
|
||||
def get_all_occupied_dining
|
||||
@@ -60,5 +60,12 @@ class Induties::AssignInDutiesController < ApplicationController
|
||||
induty = InDuty.find(induty_id)
|
||||
induty.destroy
|
||||
end
|
||||
def get_current_booking
|
||||
@current_booking =InDuty.select("in_duties.*,dining_facilities.type as dinning_type")
|
||||
.joins(" LEFT JOIN dining_facilities on dining_facilities.id = in_duties.dinning_id").where('booking_id =? and out_time is null', params[:booking_id]).order(created_at: :asc);
|
||||
respond_to do |format|
|
||||
format.json { render json: @current_booking.to_json }
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -35,7 +35,7 @@ class Origami::HomeController < BaseOrigamiController
|
||||
@payment_methods = PaymentMethodSetting.all
|
||||
@dining_booking = @dining.bookings.active.where("DATE_FORMAT(created_at,'%Y-%m-%d') = '#{DateTime.now.strftime('%Y-%m-%d')}' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '#{Date.today.prev_day}' ")
|
||||
#@dining_booking = @dining.bookings.active.where("created_at between '#{DateTime.now.utc - 12.hours}' and '#{DateTime.now.utc}'")
|
||||
@order_items = Array.new
|
||||
@order_items = Array.new
|
||||
@dining_booking.each do |booking|
|
||||
if booking.sale_id.nil? && booking.booking_status != 'moved'
|
||||
@order_items = Array.new
|
||||
@@ -144,6 +144,7 @@ class Origami::HomeController < BaseOrigamiController
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def check_emp_access_code
|
||||
|
||||
@@ -28,7 +28,7 @@ class Origami::RequestBillsController < ApplicationController
|
||||
|
||||
if check_booking.sale_id.nil?
|
||||
# Create Sale if it doesn't exist
|
||||
@status, @sale_id = @sale.generate_invoice_from_booking(check_booking.id,current_login_employee, current_user, order.source)
|
||||
@status, @sale_id = @sale.generate_invoice_from_booking(check_booking.id,current_login_employee, current_user, order.source, params[:current_checkin_induties_count])
|
||||
@sale_data = Sale.find_by_sale_id(@sale_id)
|
||||
@sale_items = SaleItem.where("sale_id=?",@sale_id)
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ class DiningCharge < ApplicationRecord
|
||||
block_count = 0
|
||||
price = 0
|
||||
minutes = DiningCharge.time_diff(checkout, checkin)
|
||||
checkin_minutes =minutes
|
||||
free_time = DiningCharge.convert_to_minutes(dining_charges_obj.minimum_free_time.utc.strftime('%H:%M'))
|
||||
dining_minutes = minutes #- free_time # stayminutes - free minutes
|
||||
if dining_minutes <= free_time
|
||||
@@ -20,7 +21,7 @@ class DiningCharge < ApplicationRecord
|
||||
block_count, price = DiningCharge.charges(dining_charges_obj, dining_minutes, 'day')
|
||||
end
|
||||
end
|
||||
return block_count, price
|
||||
return block_count, price ,checkin_minutes
|
||||
else
|
||||
puts "<<<<<<<< NO"
|
||||
end
|
||||
@@ -34,7 +35,6 @@ class DiningCharge < ApplicationRecord
|
||||
charge_block = DiningCharge.convert_to_minutes(chargesObj.charge_block.utc.strftime('%H:%M'))
|
||||
|
||||
result = dining_minutes / charge_block
|
||||
|
||||
rounding_time = DiningCharge.convert_to_minutes(chargesObj.time_rounding_block.utc.strftime('%H:%M'))
|
||||
if result.to_i < 1
|
||||
# for dining minute is under charge_block
|
||||
|
||||
@@ -27,7 +27,7 @@ class Sale < ApplicationRecord
|
||||
SALE_STATUS_OUTSTANDING = "outstanding"
|
||||
SALE_STATUS_COMPLETED = "completed"
|
||||
|
||||
def generate_invoice_from_booking(booking_id, requested_by, cashier, order_source = nil)
|
||||
def generate_invoice_from_booking(booking_id, requested_by, cashier, order_source = nil, current_checkin_induties_count)
|
||||
booking = Booking.find(booking_id)
|
||||
status = false
|
||||
Rails.logger.debug "Booking -> " + booking.id.to_s
|
||||
@@ -50,12 +50,32 @@ class Sale < ApplicationRecord
|
||||
# dining charges
|
||||
charges = DiningCharge.where('dining_facility_id=?',booking.dining_facility_id).take
|
||||
if !charges.nil?
|
||||
block_count, diningprice = DiningCharge.amount_calculate(charges, booking.checkin_at, booking.checkout_at)
|
||||
block_count, diningprice , checkin_minutes = DiningCharge.amount_calculate(charges, booking.checkin_at, booking.checkout_at)
|
||||
if charges.charge_type =='hr'
|
||||
dining_time = booking.checkin_at.strftime('%H:%M %p').to_s + " - " + booking.checkout_at.strftime('%H:%M %p').to_s
|
||||
else
|
||||
dining_time = booking.checkin_at.strftime('%B %d, %H:%M %p').to_s + " - " + booking.checkout_at.strftime('%B %d, %H:%M %p').to_s
|
||||
end
|
||||
# later_time = booking.checkout_at
|
||||
# early_time = booking.checkin_at
|
||||
# distance_in_minutes = ((later_time - early_time)/60.0).round
|
||||
# # time = ((later_time.hour*3600+later_time.min*60+later_time.sec) - (early_time.hour*3600+early_time.min*60+early_time.sec))/24
|
||||
# puts "Hello time"
|
||||
# puts distance_in_minutes
|
||||
# # puts checkin_minutes / 60
|
||||
# puts "Hello block_count"
|
||||
basic_pay_amount =0
|
||||
name =""
|
||||
if current_checkin_induties_count != "0"
|
||||
basic_pay = Commission.where('commission_type=?','Basic Pay')
|
||||
basic_pay.each do |pay|
|
||||
basic_pay_amount =pay.amount
|
||||
name =pay.name
|
||||
end
|
||||
induties_pay_amount = (current_checkin_induties_count.to_i * (checkin_minutes.to_i / 60).to_f * basic_pay_amount).to_i
|
||||
create_saleitem_indutycharges(charges, current_checkin_induties_count.to_i, induties_pay_amount, booking.dining_facility.name, dining_time, order_source, basic_pay_amount)
|
||||
end
|
||||
|
||||
create_saleitem_diningcharges(charges, block_count, diningprice, booking.dining_facility.name, dining_time, order_source)
|
||||
end
|
||||
|
||||
@@ -330,7 +350,25 @@ class Sale < ApplicationRecord
|
||||
sale = Sale.find(self.id)
|
||||
self.compute_by_sale_items(self.id, sale.sale_items, self.total_discount, nil, order_source)
|
||||
end
|
||||
|
||||
def create_saleitem_indutycharges(chargeObj, current_checkin_induties_count, induties_pay_amount, dining_name, dining_time, order_source = nil, basic_pay_amount)
|
||||
sale_item = SaleItem.new
|
||||
sale_item.menu_category_code = "IndutyCharge"
|
||||
sale_item.menu_category_name = "Induty Charge"
|
||||
sale_item.product_code = ""
|
||||
sale_item.product_name ='Vocalist' + " ( " + dining_time.to_s + " )"
|
||||
sale_item.account_id = 0
|
||||
sale_item.product_alt_name = "-"
|
||||
sale_item.qty = current_checkin_induties_count
|
||||
sale_item.unit_price = basic_pay_amount
|
||||
sale_item.taxable_price = induties_pay_amount
|
||||
sale_item.is_taxable = chargeObj.taxable
|
||||
sale_item.sale_id = self.id
|
||||
sale_item.price = induties_pay_amount
|
||||
sale_item.save
|
||||
# Re-calc
|
||||
sale = Sale.find(self.id)
|
||||
self.compute_by_sale_items(self.id, sale.sale_items, self.total_discount, nil, order_source)
|
||||
end
|
||||
def update_item (item)
|
||||
#save sale_audit
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
<div class="col-md-6 col-sm-6 col-lg-3 mt-3 touch_commissioner" commissionerId='<%= com["id"] %>' commissionerName='<%= com["name"] %>'>
|
||||
<div class="card custom-card testimonial-card fadeInRight" style="height:100%;background-image:url(<%=com["image_path"] %>);background-repeat: no-repeat; background-size: cover;">
|
||||
<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;">
|
||||
<div class="col-6" style="padding:0px !important;"><%=com["name"] %></div>
|
||||
<div class="col-8" style="padding:0px !important;"><%=com["name"] %></div>
|
||||
<% if com["check_in_count"] >0%>
|
||||
<div class="col-6" style="margin:auto;"><span class="badge badge-primary" style="font-size: 1rem;">Active <%=com["check_in_count"] %></span></div>
|
||||
<div class="col-4 row" style="margin:auto;"><span class="badge badge-primary" style="margin:auto;font-size: 0.8rem;">A :<%=com["check_in_count"] %></span></div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
@@ -61,9 +61,14 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row form-inputs form-group" style="margin: auto;">
|
||||
<hr style="width :100%">
|
||||
<div class="col-12 " style="margin-top: 1rem;">
|
||||
<div class="row" >
|
||||
<div class="col-8 add_to_order" style="margin: auto;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-inputs form-group" style="margin: auto;">
|
||||
<hr style="width :100%;margin-bottom: 1rem;">
|
||||
<div class="col-12 " style="">
|
||||
<div class="row form-inputs form-group" style="margin: auto;">
|
||||
<div class="col-12" >
|
||||
<label class="radio-room"><input type="radio" name="radio" id="radio-room" value="room" checked="checked" /> Room</label>
|
||||
@@ -87,14 +92,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-inputs form-group" style="margin: auto;">
|
||||
<div class=" col-12 ">
|
||||
<div class="col-12 ">
|
||||
<%= simple_form_for 'save_induties', :url => induties_induties_create_path, :method => :post do |f| %>
|
||||
<%= f.check_box :by_name,:class=>'form-control'%>
|
||||
<label class="checkboxLabel" for="save_induties_by_name">By Name</label>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<a href="" id="btn_create_induty" class=" btn bg-blue form-actions btn_create_induty">Create In Duty</a>
|
||||
<button type="button" class=" btn bg-blue form-actions btn_create_induty" id="btn_create_induty" disabled="">Create In Duty</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -108,9 +113,13 @@
|
||||
window.location.href = '/origami/'+dinning_type+'/'+dinning_id;
|
||||
});
|
||||
$( document ).ready(function() {
|
||||
document.getElementById("btn_create_induty").disabled = true;
|
||||
// document.getElementById("btn_create_induty").disabled = true;
|
||||
$('#btn_create_induty').attr("disabled", 'disabled');
|
||||
var booking_id=document.getElementById("booking_id").value
|
||||
getCurrentBooking(booking_id);
|
||||
});
|
||||
$(document).on('click', '.btn_create_induty', function(event){
|
||||
$('.add_to_order').html("");
|
||||
event.preventDefault();
|
||||
var str=document.getElementById("zone_dinning_id").value;
|
||||
var str_t=document.getElementById("zone_t_dinning_id").value;
|
||||
@@ -154,7 +163,9 @@
|
||||
}
|
||||
});
|
||||
$(document).on('click', '.touch_commissioner', function(event){
|
||||
$('#btn_create_induty').attr("disabled", '');
|
||||
$(".success-msg").css('display','none');
|
||||
$('.add_to_order').html("");
|
||||
document.getElementById("btn_create_induty").disabled = false;
|
||||
var commissionerId = this.getAttribute("commissionerId");
|
||||
var commissionerName = this.getAttribute("commissionerName");
|
||||
@@ -167,26 +178,15 @@
|
||||
url: "/induties/assign_in_duties/get_all_occupied_dining/"+commissionerId,
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
$('.commissionerName').append('<label>'+commissionerName+' ('+booking_id+' )</label');
|
||||
$('.commissionerName').append('<label>'+commissionerName+' (<a href="" onclick = "getCurrent(this)">'+booking_id+'</a> )</label');
|
||||
data.forEach(function(items) {
|
||||
in_time = changDateFormat(items.in_time);
|
||||
d_type = items.dinning_type.charAt(0);
|
||||
// console.log(d_type);
|
||||
// if(items.out_time == null){
|
||||
row ='<tr>'
|
||||
+'<td>'+d_type+'-'+items.dinning_id+'</td>'
|
||||
+'<td>'+in_time+'</td>'
|
||||
+'<td><a href="" onclick = "checkout_induty(this)" class="btn checkout_induty" style= "background-color: #3F51B5;"indutyId="'+ items.id +'" >Check Out</a> <a href="" onclick = "remove_induty(this)" class="btn remove_induty" style= "background-color: red;"indutyId="'+ items.id +'" >Remove</a></td>'
|
||||
+'</tr>';
|
||||
// }
|
||||
// else{
|
||||
// out_time = changDateFormat(items.out_time);
|
||||
// row ='<tr>'
|
||||
// +'<td>'+items.dinning_id+'</td>'
|
||||
// +'<td>'+in_time+'</td>'
|
||||
// +'<td>'+out_time+'</td>'
|
||||
// +'</tr>';
|
||||
// }
|
||||
$('.occupide_dining').append(row);
|
||||
|
||||
});
|
||||
@@ -213,15 +213,11 @@
|
||||
}
|
||||
$('input[type=radio]').change(function() {
|
||||
if(this.value == "room"){
|
||||
// $(".table_collection").hide();
|
||||
$(".table_collection").css('display','none');
|
||||
// $(".room_collection").show();
|
||||
$(".room_collection").css('display','block');
|
||||
}
|
||||
else{
|
||||
// $(".room_collection").hide();
|
||||
$(".room_collection").css('display','none');
|
||||
// $(".table_collection").show();
|
||||
$(".table_collection").css('display','block');
|
||||
}
|
||||
});
|
||||
@@ -249,14 +245,6 @@
|
||||
success: function (data) {
|
||||
var d = row.parentNode.parentNode.rowIndex;
|
||||
document.getElementById('show_in_duty_table').deleteRow(d);
|
||||
// in_time = changDateFormat(data.in_time);
|
||||
// out_time = changDateFormat(data.out_time);
|
||||
// row ='<tr>'
|
||||
// +'<td>'+data.dinning_id+'</td>'
|
||||
// +'<td>'+in_time+'</td>'
|
||||
// +'<td>'+out_time+'</td>'
|
||||
// +'</tr>';
|
||||
// $('.occupide_dining').append(row);
|
||||
var scrollTo = document.getElementById('show_list_induty_card');
|
||||
$("HTML, body").animate({scrollTop: scrollTo.offsetTop - 60 }, 500 );
|
||||
$(".success-msg").css('display','block');
|
||||
@@ -305,5 +293,53 @@
|
||||
});
|
||||
localStorage.setItem('from_induty', false);
|
||||
|
||||
function getCurrentBooking(booking_id){
|
||||
document.getElementById("btn_create_induty").disabled = true;
|
||||
$('.commissionerName').html("");
|
||||
$('.add_to_order').html("");
|
||||
$('.occupide_dining').html("");
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "get_current_booking",
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
dinning_id = localStorage.getItem('dinning_id');
|
||||
dinning_type = localStorage.getItem('dinning_type');
|
||||
booking_id=document.getElementById("booking_id").value
|
||||
$('.commissionerName').append('<label><a href="" onclick = "getCurrent(this)">'+booking_id+'</a></label');
|
||||
$('.add_to_order').append('<input type="hidden" name="current_checkin_count" value='+data.length+'><input type="submit" class="btn bg-blue form-actions add_to_charges" value="Charges to Invoice" onclick = "addToOrder(this)" current_checkin_induties_count ='+data.length+'>');
|
||||
data.forEach(function(items) {
|
||||
in_time = changDateFormat(items.in_time);
|
||||
d_type = items.dinning_type.charAt(0);
|
||||
row ='<tr>'
|
||||
+'<td>'+d_type+'-'+items.dinning_id+'</td>'
|
||||
+'<td>'+in_time+'</td>'
|
||||
+'<td><a href="" onclick = "checkout_induty(this)" class="btn checkout_induty" style= "background-color: #3F51B5;"indutyId="'+ items.id +'" >Check Out</a> <a href="" onclick = "remove_induty(this)" class="btn remove_induty" style= "background-color: red;"indutyId="'+ items.id +'" >Remove</a></td>'
|
||||
+'</tr>';
|
||||
|
||||
$('.occupide_dining').append(row);
|
||||
});
|
||||
|
||||
var scrollTo = document.getElementById('show_list_induty_card');
|
||||
$("HTML, body").animate({scrollTop: scrollTo.offsetTop - 60 }, 500 );
|
||||
}
|
||||
});
|
||||
}
|
||||
function getCurrent(row){
|
||||
$(".success-msg").css('display','none');
|
||||
booking_id=document.getElementById("booking_id").value
|
||||
event.preventDefault();
|
||||
getCurrentBooking(booking_id);
|
||||
}
|
||||
function addToOrder(row){
|
||||
event.preventDefault();
|
||||
$(".success-msg").css('display','none');
|
||||
booking_id=document.getElementById("booking_id").value
|
||||
var current_checkin_induties_count = row.getAttribute("current_checkin_induties_count");
|
||||
localStorage.setItem("current_checkin_induties_count",current_checkin_induties_count);
|
||||
var dinning_id = localStorage.getItem('dinning_id');
|
||||
var dinning_type = localStorage.getItem('dinning_type');
|
||||
window.location.href = '/origami/'+dinning_type+'/'+dinning_id;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -796,6 +796,7 @@
|
||||
<script>
|
||||
var cashier_type = "cashier";
|
||||
$(document).ready(function () {
|
||||
// alert(localStorage.getItem("current_checkin_count"));
|
||||
localStorage.removeItem("trans_flag");
|
||||
/* check webview loaded*/
|
||||
var webview = <%= @webview %>;
|
||||
@@ -827,6 +828,7 @@
|
||||
$(".tables").on('click', function () {
|
||||
localStorage.setItem('dinning_type','table');
|
||||
var customer_id = $(".customer-id").text();
|
||||
localStorage.setItem('customer_id',customer_id);
|
||||
show_customer_details(customer_id);
|
||||
|
||||
var dining_id = $(this).attr("data-id");
|
||||
@@ -845,6 +847,7 @@
|
||||
$(".rooms").on('click', function () {
|
||||
localStorage.setItem('dinning_type','room');
|
||||
var customer_id = $(".customer-id").text();
|
||||
localStorage.setItem('customer_id',customer_id);
|
||||
show_customer_details(customer_id);
|
||||
|
||||
var dining_id = $(this).attr("data-id");
|
||||
@@ -1074,6 +1077,8 @@
|
||||
var order_id = $('#save_order_id').attr('data-order');
|
||||
var ajax_url = "/origami/" + order_id + "/request_bills";
|
||||
localStorage.setItem("tax_type", "all");
|
||||
var current_checkin_induties_count =localStorage.getItem("current_checkin_induties_count");
|
||||
localStorage.removeItem("current_checkin_induties_count");
|
||||
if(order_id!=undefined && order_id!=null && order_id!=""){
|
||||
if($('#request_bills').is(":visible")) {
|
||||
$('#request_bills').prop("disabled",true);
|
||||
@@ -1081,7 +1086,7 @@
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
// data: 'order_id='+ order_id,
|
||||
data: {current_checkin_induties_count: current_checkin_induties_count},
|
||||
success: function (result) {
|
||||
if (!result.status) {
|
||||
swal({
|
||||
|
||||
@@ -915,6 +915,7 @@ $(document).ready(function(){
|
||||
|
||||
var dining_id = $(this).attr("data-id");
|
||||
localStorage.setItem('dinning_type','table');
|
||||
localStorage.setItem('customer_id',customer_id);
|
||||
window.location.href = '/origami/table/' + dining_id;
|
||||
});
|
||||
|
||||
@@ -934,6 +935,7 @@ $(document).ready(function(){
|
||||
|
||||
var dining_id = $(this).attr("data-id");
|
||||
localStorage.setItem('dinning_type','room');
|
||||
localStorage.setItem('customer_id',customer_id);
|
||||
window.location.href = '/origami/room/' + dining_id;
|
||||
});
|
||||
|
||||
@@ -1148,6 +1150,8 @@ $('#pay').on('click',function() {
|
||||
});
|
||||
// Bill Request
|
||||
$('#request_bills').click(function() {
|
||||
var current_checkin_induties_count =localStorage.getItem("current_checkin_induties_count");
|
||||
localStorage.removeItem("current_checkin_induties_count");
|
||||
var order_id = $('#save_order_id').attr('data-order');
|
||||
var ajax_url = "/origami/" + order_id + "/request_bills";
|
||||
if(order_id!=undefined && order_id!=null && order_id!=""){
|
||||
@@ -1158,7 +1162,7 @@ $('#request_bills').click(function() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
// data: 'order_id='+ order_id,
|
||||
data: {current_checkin_induties_count: current_checkin_induties_count},
|
||||
success: function (result) {
|
||||
if (!result.status) {
|
||||
swal({
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!--<%= f.label :product_code, 'Product' %>
|
||||
<%= f.collection_select :product_code, MenuItem.all.order('name asc'), :id, :name, {prompt: 'Select a Product'}, {class: 'form-control'} %><br/>-->
|
||||
<%= f.input :name %>
|
||||
<%= f.input :commission_type, :collection => ['Percentage','Net Amount'], prompt: 'Select Commission Type', class: 'form-control' %>
|
||||
<%= f.input :commission_type, :collection => ['Percentage','Net Amount','Basic Pay'], prompt: 'Select Commission Type', class: 'form-control' %>
|
||||
<%= f.input :amount %>
|
||||
<%= f.input :is_active,:class => "filled-in" ,:id => "" %>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("views.right_panel.detail.product") %> <%= t("views.right_panel.detail.name_txt2") %></th>
|
||||
<th><%= t("views.right_panel.detail.group") %> <%= t("views.right_panel.detail.name_txt2") %></th>
|
||||
<th><%= t("views.right_panel.detail.commission_type") %></th>
|
||||
<th><%= t("views.right_panel.detail.amount") %></th>
|
||||
<th><%= t("views.right_panel.detail.active") %></th>
|
||||
|
||||
@@ -9,6 +9,8 @@ Rails.application.routes.draw do
|
||||
post ':booking_id/assign_create' => 'assign_in_duties#induties_create', as: :induties_create
|
||||
post ':booking_id/assign_checkout/:induty_id' => 'assign_in_duties#induties_checkout', as: :induties_checkout
|
||||
delete ':booking_id/assign_remove/:induty_id' => 'assign_in_duties#induties_remove', as: :induties_remove
|
||||
get ':booking_id/get_current_booking' => 'assign_in_duties#get_current_booking'
|
||||
|
||||
end
|
||||
scope "(:locale)", locale: /en|mm/ do
|
||||
root 'home#index'
|
||||
|
||||
Reference in New Issue
Block a user