merge with aung myo
This commit is contained in:
@@ -949,7 +949,7 @@ $(function() {
|
|||||||
$(sub_category).removeClass('hidden');
|
$(sub_category).removeClass('hidden');
|
||||||
for(var i in data) {
|
for(var i in data) {
|
||||||
|
|
||||||
row = '<li class="menu_category" data-id="'+data[i].id+'">'
|
row = '<li class="menu_category fadeInTop animated" data-id="'+data[i].id+'">'
|
||||||
+'<a class="nav-link" data-toggle="tab" href="" role="tab">'+ data[i].name+'</a>'
|
+'<a class="nav-link" data-toggle="tab" href="" role="tab">'+ data[i].name+'</a>'
|
||||||
+'</li>' ;
|
+'</li>' ;
|
||||||
$(sub_category).append(row);
|
$(sub_category).append(row);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ App.call_waiter = App.cable.subscriptions.create('CallWaiterChannel', {
|
|||||||
table = data.table
|
table = data.table
|
||||||
|
|
||||||
// for Notificaiotn message
|
// for Notificaiotn message
|
||||||
|
var element = "#notify-wrapper"
|
||||||
var placementFrom = "top";
|
var placementFrom = "top";
|
||||||
var placementAlign = "center";
|
var placementAlign = "center";
|
||||||
var animateEnter = "";
|
var animateEnter = "";
|
||||||
@@ -17,21 +18,22 @@ App.call_waiter = App.cable.subscriptions.create('CallWaiterChannel', {
|
|||||||
var text = " Calling Waiter <br> "+table.name ;
|
var text = " Calling Waiter <br> "+table.name ;
|
||||||
|
|
||||||
if (text != null || colorName != null){
|
if (text != null || colorName != null){
|
||||||
showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit);
|
showNotification(element, colorName, text, placementFrom, placementAlign, animateEnter, animateExit);
|
||||||
}
|
}
|
||||||
|
|
||||||
function showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit) {
|
function showNotification(element, colorName, text, placementFrom, placementAlign, animateEnter, animateExit) {
|
||||||
if (colorName === null || colorName === '') { colorName = 'bg-black'; }
|
if (colorName === null || colorName === '') { colorName = 'bg-black'; }
|
||||||
if (animateEnter === null || animateEnter === '') { animateEnter = 'animated fadeInDown'; }
|
if (animateEnter === null || animateEnter === '') { animateEnter = 'animated fadeInDown'; }
|
||||||
if (animateExit === null || animateExit === '') { animateExit = 'animated fadeOutUp'; }
|
if (animateExit === null || animateExit === '') { animateExit = 'animated fadeOutUp'; }
|
||||||
var allowDismiss = true;
|
var allowDismiss = true;
|
||||||
|
|
||||||
$.notify({
|
$.notify({
|
||||||
message: text
|
message: text
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
element: element,
|
||||||
type: colorName,
|
type: colorName,
|
||||||
allow_dismiss: allowDismiss,
|
allow_dismiss: allowDismiss,
|
||||||
newest_on_top: true,
|
|
||||||
timer: 200000000000000,
|
timer: 200000000000000,
|
||||||
placement: {
|
placement: {
|
||||||
from: placementFrom,
|
from: placementFrom,
|
||||||
@@ -41,8 +43,8 @@ App.call_waiter = App.cable.subscriptions.create('CallWaiterChannel', {
|
|||||||
enter: animateEnter,
|
enter: animateEnter,
|
||||||
exit: animateExit
|
exit: animateExit
|
||||||
},
|
},
|
||||||
template: '<div data-notify="container" style="max-width: 180px !important;" class="bootstrap-notify-container alert alert-dismissible {0} ' + (allowDismiss ? "p-r-30" : "") + '" role="alert">' +
|
template: '<div data-notify="container" style="width:180px !important;" class="bootstrap-notify-container alert alert-dismissible {0} ' + (allowDismiss ? "p-r-30" : "") + '" role="alert">' +
|
||||||
'<button type="button" aria-hidden="true" class="close float-right m-l-20 m-t--5" data-notify="dismiss" style="right: -5px;">×</button>' +
|
'<button type="button" aria-hidden="true" class="close notify-close float-right m-l-5 m-t--5" data-notify="dismiss">×</button>' +
|
||||||
'<span data-notify="icon"></span> ' +
|
'<span data-notify="icon"></span> ' +
|
||||||
'<span data-notify="title">{1}</span> ' +
|
'<span data-notify="title">{1}</span> ' +
|
||||||
'<span data-notify="message">{2}</span>' +
|
'<span data-notify="message">{2}</span>' +
|
||||||
|
|||||||
@@ -362,8 +362,31 @@ tr.discount-item-row:hover {
|
|||||||
|
|
||||||
/* End Payment Page */
|
/* End Payment Page */
|
||||||
|
|
||||||
/*Logout Icon*/
|
/* Logout Icon */
|
||||||
|
|
||||||
i.logout_icon{
|
i.logout_icon{
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* End Logout Icon */
|
||||||
|
|
||||||
|
/* Notify */
|
||||||
|
|
||||||
|
#notify-wrapper {
|
||||||
|
position: absolute;
|
||||||
|
top: 55px;
|
||||||
|
left: 10px;
|
||||||
|
z-index: 9999;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-notify="container"] {
|
||||||
|
margin-bottom: 5px !important;
|
||||||
|
margin-left:5px !important;
|
||||||
|
position:relative !important;
|
||||||
|
top: 25% !important;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* End Notify */
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
rebate = MembershipSetting.find_by_rebate(1)
|
rebate = MembershipSetting.find_by_rebate(1)
|
||||||
if customer.membership_id != nil && rebate
|
if customer.membership_id != nil && rebate
|
||||||
member_info = Customer.get_member_account(customer)
|
member_info = Customer.get_member_account(customer)
|
||||||
|
current_balance = SaleAudit.paymal_search(sale_id)
|
||||||
end
|
end
|
||||||
# get printer info
|
# get printer info
|
||||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||||
@@ -44,7 +45,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
|
|
||||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||||
|
|
||||||
printer.print_receipt_bill(print_settings,cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_details, "Frt")
|
printer.print_receipt_bill(print_settings,cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_details, "Frt",current_balance)
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ class Origami::SalesController < BaseOrigamiController
|
|||||||
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
||||||
@orders = Order.all.order('date desc')
|
@orders = Order.all.order('date desc')
|
||||||
@sale = Sale.find(params[:sale_id])
|
@sale = Sale.find(params[:sale_id])
|
||||||
|
@order = SaleOrder.find_by_sale_id(@sale.sale_id).order_id
|
||||||
|
@booking = BookingOrder.find_by_order_id(@order).booking_id
|
||||||
|
@table_id = Booking.find(@booking).dining_facility_id
|
||||||
|
@dining = DiningFacility.find(@table_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_to_existing_invoice
|
def add_to_existing_invoice
|
||||||
|
|||||||
@@ -41,6 +41,10 @@
|
|||||||
<%= render 'layouts/right_sidebar' %>
|
<%= render 'layouts/right_sidebar' %>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- Notify -->
|
||||||
|
<div id="notify-wrapper"></div>
|
||||||
|
<!-- Notify -->
|
||||||
|
|
||||||
<!-- Main Content -->
|
<!-- Main Content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<% flash.each do |type, message| %>
|
<% flash.each do |type, message| %>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<li class="nav-item menu_category sub_click" data-id="<%=menu.id%>">
|
<li class="nav-item menu_category sub_click" data-id="<%=menu.id%>">
|
||||||
<p class="hidden menu-id"><%= menu.id %></p>
|
<p class="hidden menu-id"><%= menu.id %></p>
|
||||||
<a class="nav-link" data-toggle="tab" href="" role="tab"> <%= menu.name%>
|
<a class="nav-link" data-toggle="tab" href="" role="tab"> <%= menu.name%>
|
||||||
<ul class=" sub_category_list hidden" id="sub_category_list">
|
<ul class=" sub_category_list hidden fadeInTop animated" id="sub_category_list">
|
||||||
</ul>
|
</ul>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|||||||
@@ -220,7 +220,7 @@
|
|||||||
<input type="hidden" id="sale_id" value="<%= @sale_array[0].sale_id %>">
|
<input type="hidden" id="sale_id" value="<%= @sale_array[0].sale_id %>">
|
||||||
<%
|
<%
|
||||||
# Can't check for discount
|
# Can't check for discount
|
||||||
unless sale_item.price == 0
|
# unless sale_item.price == 0
|
||||||
count += 1
|
count += 1
|
||||||
%>
|
%>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -231,8 +231,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
|
# end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -243,7 +242,7 @@
|
|||||||
count += 1
|
count += 1
|
||||||
sub_total = sub_total + (order_item.price * order_item.qty)
|
sub_total = sub_total + (order_item.price * order_item.qty)
|
||||||
|
|
||||||
unless order_item.price == 0 %>
|
# unless order_item.price == 0 %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= count %></td>
|
<td><%= count %></td>
|
||||||
<td class='item-name'><%= order_item.item_name %></td>
|
<td class='item-name'><%= order_item.item_name %></td>
|
||||||
@@ -252,7 +251,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<%
|
<%
|
||||||
|
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -215,7 +215,7 @@
|
|||||||
<input type="hidden" id="sale_id" value="<%= @sale_array[0].sale_id %>">
|
<input type="hidden" id="sale_id" value="<%= @sale_array[0].sale_id %>">
|
||||||
<%
|
<%
|
||||||
# Can't check for discount
|
# Can't check for discount
|
||||||
unless sale_item.price == 0
|
# unless sale_item.price == 0
|
||||||
count += 1
|
count += 1
|
||||||
%>
|
%>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
|
|
||||||
<%
|
<%
|
||||||
|
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -238,7 +238,7 @@
|
|||||||
count += 1
|
count += 1
|
||||||
sub_total = sub_total + (order_item.price * order_item.qty)
|
sub_total = sub_total + (order_item.price * order_item.qty)
|
||||||
|
|
||||||
unless order_item.price == 0 %>
|
# unless order_item.price == 0 %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= count %></td>
|
<td><%= count %></td>
|
||||||
<td class='item-name'><%= order_item.item_name %></td>
|
<td class='item-name'><%= order_item.item_name %></td>
|
||||||
@@ -247,7 +247,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<%
|
<%
|
||||||
|
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
<div class="col-lg-5 col-md-5 col-sm-5">
|
<div class="col-lg-5 col-md-5 col-sm-5">
|
||||||
<div class="card" >
|
<div class="card" >
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<div><strong id="order-title">INVOICE DETAILS </strong></div>
|
<div><strong id="order-title">INVOICE DETAILS </strong>| Table <%= @dining.name rescue "" %></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<div class="card-title row p-l-5 p-r-5">
|
<div class="card-title row p-l-5 p-r-5">
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
sub_total = sub_total + sale_item.price
|
sub_total = sub_total + sale_item.price
|
||||||
%>
|
%>
|
||||||
<input type="hidden" id="sale_id" value="<%= @sale.sale_id %>">
|
<input type="hidden" id="sale_id" value="<%= @sale.sale_id %>">
|
||||||
<% unless sale_item.price <= 0 %>
|
<% #unless sale_item.price <= 0 %>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='item-name'><%= sale_item.product_name %></td>
|
<td class='item-name'><%= sale_item.product_name %></td>
|
||||||
<td class='item-attr'><%= sale_item.qty %></td>
|
<td class='item-attr'><%= sale_item.qty %></td>
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<%
|
<%
|
||||||
|
|
||||||
end
|
#end
|
||||||
end
|
end
|
||||||
|
|
||||||
%>
|
%>
|
||||||
|
|||||||
Reference in New Issue
Block a user