remove conflict text

This commit is contained in:
phyusin
2017-10-25 16:53:22 +06:30
137 changed files with 1952 additions and 1463 deletions

View File

@@ -16,9 +16,22 @@
//= require bootstrap/js/bootstrap-material-design.min
//= require jquery_ujs
//= require turbolinks
//= require momentjs/moment
//= require bootstrap-material-datetimepicker/js/bootstrap-material-datetimepicker
//= require jquery-slimscroll/jquery.slimscroll.js
//= require node-waves/waves.js
//= require sweetalert/sweetalert.min.js
//= require BSBMaterial/admin.js
//= require BSBMaterial/demo.js
//= require custom.js
$(document).on('turbolinks:load', function() {
$('.datepicker').bootstrapMaterialDatePicker({
format: 'DD-MM-YYYY',
clearButton: true,
weekStart: 1,
time: false
});
});

View File

@@ -46,72 +46,71 @@ $(document).ready(function(){
}); //End Click
function show_details(url){
var oqs_append = $('.oqs_append');
oqs_append.empty();
var filter = $('.filter').text();
//Start Ajax
$.ajax({
type: "GET",
url: url,
data: {'filter':filter},
dataType: "json",
success: function(data) {
for(var field in data) {
var price = parseFloat(data[field].price).toFixed(2);
var oqs_append = $('.oqs_append');
oqs_append.empty();
var filter = $('.filter').text();
//Start Ajax
$.ajax({
type: "GET",
url: url,
data: {'filter':filter},
dataType: "json",
success: function(data) {
for(var field in data) {
var price = parseFloat(data[field].price).toFixed(2);
if (data[field]["options"] == "[]" || data[field]["options"] == "") {
var options = "";
}else{
var options = data.options;
if (data[field]["options"] == "[]" || data[field]["options"] == "") {
var options = "";
}else{
var options = data.options;
}
var date = new Date(data[field]["created_at"]);
var show_date = date.getDate() + "-" + date.getMonth() + "-" + date.getFullYear() + ' ' + date.getHours()+ ':' + date.getMinutes();
row ='<div class="card queue_station animated " data-date="'+data[field]["order_id"]+'">'
+'<div class="card-block">'
+'<h6 class="card-">'
+'<span class="order-zone-type">'+data[field]["table_type"]+'- </span>'
+'<span class="order-zone">'+ data[field]["zone"] +'</span>'
+'<small class="float-right">'+ data[field]["order_id"] +'</small>'
+'</h6>'
+'<h6>'
+'<span class="order-item">'+ data[field]["item_name"] +'- </span>'
+'<span class="order-qty">'+ data[field]["qty"] +' </span>'
+'</h6>'
+'<p class="card-text item-options">'+ options +'</p>'
+'<p class="card-text">'
+'<small class="text-muted">Order at'
+'<span class="order-at">'+ show_date +'</span> - '
+'<span class="order-by">'+ data[field]["item_order_by"] +'</span> '
+'</small> '
+'</p>'
+'<p class="hidden order-customer">'+ data[field]["customer_name"] +'</p> '
+'<p class="hidden assigned-order-item">'+ data[field]["assigned_order_item_id"] +'</p> '
+'</div>'
+'<div class="card-footer">'
+'<button id="edit_'+ data[field]["assigned_order_item_id"]+'" class="btn btn-warning order-item order-item-edit">EDIT</button>'
+' <button id="assigned_queue_' + data[field]["assigned_order_item_id"] +'" class="btn btn-primary order-item order-complete">COMPLETE</button>'
+'</div>'
+'</div>';
$('.oqs_append').append(row);
}
var date = new Date(data[field]["created_at"]);
var show_date = date.getDate() + "-" + date.getMonth() + "-" + date.getFullYear() + ' ' + date.getHours()+ ':' + date.getMinutes();
row ='<div class="card queue_station animated " data-date="'+data[field]["order_id"]+'">'
+'<div class="card-block">'
+'<h4 class="card-title">'
+'<span class="order-zone-type">'+data[field]["table_type"]+'- </span>'
+'<span class="order-zone">'+ data[field]["zone"] +'</span>'
+'<small class="pull-right">'+ data[field]["order_id"] +'- </small>'
+'</h4>'
+'<h4>'
+'<span class="order-item">'+ data[field]["item_name"] +'- </span>'
+'<span class="order-qty">'+ data[field]["qty"] +'- </span>'
+'</h4>'
+'<p class="card-text item-options">'+ options +'</p>'
+'<p class="card-text">'
+'<small class="text-muted">Order at'
+'<span class="order-at">'+ show_date +'</span> - '
+'<span class="order-by">'+ data[field]["item_order_by"] +'</span> '
+'</small> '
+'</p>'
+'<p class="hidden order-customer">'+ data[field]["customer_name"] +'</p> '
+'<p class="hidden assigned-order-item">'+ data[field]["assigned_order_item_id"] +'</p> '
+'</div>'
+'<div class="card-footer">'
+'<button id="edit_'+ data[field]["assigned_order_item_id"]+'" class="btn btn-warning order-item order-item-edit">EDIT</button>'
+' <button id="assigned_queue_' + data[field]["assigned_order_item_id"] +'" class="btn btn-primary order-item order-complete">COMPLETE</button>'
+'</div>'
+'</div>';
$('.oqs_append').append(row);
}
}
});
//end Ajax
}
}
});
//end Ajax
}
$(document).on('click', '.queue_station', function(event){
var orderZone=$(this).children().children().children('.order-zone').text().trim();
@@ -198,7 +197,20 @@ $(document).ready(function(){
// update queue item count in completed station
$("#completed_count").text(parseInt($("#completed_count").text()) + data.length);
alert("updated!");
swal({
title: "Infomation !",
text: 'Order has been successfully created',
confirmButtonColor: "green",
confirmButtonText: "Yes!",
closeOnConfirm: false,
}, function () {
if(table_type == "Table"){
window.location.href = "/origami/table/" + table_id
}
else {
window.location.href = "/origami/room/" + table_id
}
});
// Page reload
location.reload();
}

View File

@@ -37,8 +37,8 @@ $(function(){
}
row = '<div class="card custom-card testimonial-card animated fadeInRight" style="">'
+'<div class="custom-card-head card-head" style="line-height:14px;">'
+'<small class="col-md-9">'+ product[field].name +'</small>'
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;">'
+'<div class="col-md-9">'+ product[field].name +'</div>'
+"<div class='col-md-3 add_icon' data-item-code='"
+ product[field].item_code +"' data-name='"
+ product[field].name +"' data-qty = '"+ qty +"' data-price = '"
@@ -46,9 +46,8 @@ $(function(){
+ product[field].name +"' data-promotion-price = '"+ 1 +"' data-attributes = '"
+ JSON.stringify(item_attributes) +"' data-options = '"
+ options +"' data-image='"+image_path+"'>"
+"<i class='fa fa-plus '"
+ 'style="margin-top:4px;">'
+'</i>'
+"<i class='fa fa-plus material-icons'>"
+'add</i>'
+'</div>'
+'</div>'
@@ -65,7 +64,7 @@ $(function(){
+"</div>"
+'<div class="card-footer custom-card-footer">'
+'<small>'+ product[field].unit_price +'</small>'
+'<span>'+ product[field].unit_price +'</span>'
+'</div>'
+'</div>';
$('.menu_items_list').append(row);
@@ -109,6 +108,7 @@ $(function(){
if (JSON.stringify(menu_items[field].item_sets)!='[]') {
fa_plus = '';
add = '';
menu_item_box = 'set_item_box';
data_target = 'sx_item_set_detailModal';
@@ -120,7 +120,8 @@ $(function(){
item_attributes = menu_items[field].attributes;
promotion_price = menu_items[field].promotion_price;
}else{
fa_plus = 'fa-plus';
fa_plus = 'material-icons';
add = 'add'
menu_item_box = 'menu_item_box';
data_target = 'sx_item_detailModal';
@@ -146,8 +147,8 @@ $(function(){
}
row = '<div class="card custom-card testimonial-card animated fadeInRight" style="">'
+'<div class="custom-card-head card-head" style="line-height:14px;">'
+'<small class="col-md-9">'+ menu_items[field].name +'</small>'
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;">'
+'<div class="col-md-9">'+ menu_items[field].name +'</div>'
+"<div class='col-md-3 add_icon' data-item-code='"
+ menu_items[field].code +"' data-name='"
+ menu_items[field].name +"' data-qty = '"+ qty +"' data-price = '"
@@ -155,9 +156,8 @@ $(function(){
+ name +"' data-promotion-price = '"+ promotion_price +"' data-attributes = '"
+ JSON.stringify(item_attributes) +"' data-options = '"
+ options +"' data-image='"+image_path+"'>"
+"<i class='fa "+fa_plus+" '"
+ 'style="margin-top:4px;">'
+'</i>'
+"<i class='fa "+fa_plus+" '>"
+add+ '</i>'
+'</div>'
+'</div>'
@@ -174,7 +174,7 @@ $(function(){
+"</div>"
+'<div class="card-footer custom-card-footer">'
+'<small>'+ price +'</small>'
+'<span>'+ price +'</span>'
+'</div>'
+'</div>';
$('.menu_items_list').append(row);
@@ -216,14 +216,14 @@ $(function(){
+"' data-max-qty='"+item_sets[field]["max_selectable_qty"]
+"'>"
+'<div class="custom-card-head card-head" style="line-height:14px;">'
+'<small class="">'+result["name"]+'</small>'
+'<span class="">'+result["name"]+'</span>'
+'</div>'
+'<div class="card-block custom-card-block">'
+'<img id="" src="/image/logo.png" height="40px">'
+' <small style="float:" id="instance_option"></small>'
+'</div>'
+'<div class="card-footer custom-card-footer">'
+' <small>'+result["price"]+'</small>'
+' <span>'+result["price"]+'</span>'
// +' <small style="float:right" id="instance_option"></small>'
+'</div>'
+'</div>'
@@ -433,8 +433,8 @@ $(function(){
disabled = "disabled";
}
row +="<button id='selected-attribute' data-instances='"+JSON.stringify(instances)+"' data-type='"
+type+"' data-value='"+value[i]+"' class='btn btn-default attribute_btn "
+ status +" "+ type +" "+ disabled +" '>"
+type+"' data-value='"+value[i]+"' class='btn btn- waves-effect attribute_btn "
+ status +" "+ type +" '"+ disabled +" >"
+value[i]
+"</button>";
});
@@ -446,7 +446,7 @@ $(function(){
type = item_options[field]["type"];
row = "<h4>"+type+"</h4>"
$(value).each(function(i){
row +="<button class='btn btn-default option_btn "+ type +"' data-type='"
row +="<button class='btn btn- waves-effect option_btn "+ type +"' data-type='"
+type+"' data-value='"+value[i]+"' data-group='simple_menu'>"+value[i]+"</button>";
});
$(".options-list").append(row);
@@ -663,25 +663,21 @@ $(function(){
data: params,
dataType: "json",
success:function(result){
$("#loading_wrapper").hide();
$.confirm({
title: 'Infomation!',
content: "Order has been successfully created",
buttons: {
confirm: {
text: 'Ok',
btnClass: 'btn-green',
action: function(){
if(table_type == "Table"){
$("#loading_wrapper").hide();
swal({
title: "Infomation !",
text: 'Order has been successfully created',
confirmButtonColor: "green",
confirmButtonText: "Yes!",
closeOnConfirm: false,
}, function () {
if(table_type == "Table"){
window.location.href = "/origami/table/" + table_id
}
else {
window.location.href = "/origami/room/" + table_id
}
}
}
}
});
}
});
}
});
});

View File

@@ -37,7 +37,29 @@
//= require select2
//= require custom.js
$(function(){
$(document).on('turbolinks:load', function() {
$('.datetimepicker').bootstrapMaterialDatePicker({
format: 'DD-MM YYYY - HH:mm',
clearButton: true,
weekStart: 1
});
$('.datepicker').bootstrapMaterialDatePicker({
format: 'DD-MM-YYYY',
clearButton: true,
weekStart: 1,
time: false
});
$('.timepicker').bootstrapMaterialDatePicker({
format: 'HH:mm',
clearButton: true,
date: false
});
});
$(document).on('turbolinks:load', function() {
// Image Upload
$("#simple_menu_item_image_path").fileinput({

View File

@@ -1,5 +1,5 @@
$(function(){
$(document).on('turbolinks:load', function() {
$('body').bootstrapMaterialDesign();
var height = ($(window).height() - ($('.legal').outerHeight() + $('.user-info').outerHeight() + $('.navbar').innerHeight()));
@@ -26,6 +26,9 @@ $(function(){
var method = $(this).attr('data-method');
var url = $(this).attr('data-ref');
var html_text = $( this ).siblings( "#delete_text" ).html();
console.log(method);
console.log(url);
console.log(html_text);
swal({
title: "Confirmation",
text: html_text,

View File

@@ -4,6 +4,7 @@
//= require bootstrap/js/bootstrap-material-design.min
//= require jquery_ujs
//= require turbolinks
//= require cable
//= require jquery-slimscroll/jquery.slimscroll.js
//= require node-waves/waves.js
//= require sweetalert/sweetalert.min.js

View File

@@ -1,9 +1,6 @@
@import "bootstrap";
@import "font-awesome";
@import "theme";
@import "jquery-ui";
@import "bootstrap-datepicker3";
section .content{
padding:50px 15px 0 225px !important;
}
.custom-card-head{
height: 40px;
background-color: #54A5AF;
@@ -11,7 +8,6 @@
color :#fff;
}
.custom-card {
border: 2px solid rgba(0, 0, 0, 0.125) !important;
}
@@ -85,11 +81,9 @@ element.style {
}
.selected-attribute {
color: #fff !important;
background-color: green !important;
}
.selected-option {
color: #fff !important;
background-color: green !important;
}
@@ -101,12 +95,14 @@ element.style {
white-space: normal !important;
margin-bottom: 5px;
margin-right: 5px;
color:#111 !important;
}
.option_btn {
white-space: normal !important;
margin-bottom: 5px;
margin-right: 5px;
color:#111 !important;
}
#logo{
margin: auto;
@@ -126,6 +122,10 @@ element.style {
margin-bottom:10px;
}
section.content{
padding-top:-50px !important;
}
/*Loading gif for payment*/
#loading_wrapper{

View File

@@ -39,12 +39,6 @@ select.form-control {
/* End Reset */
.dining {
min-height:470px;
max-height:570px;
overflow:auto
}
.order-info {
min-height:300px;
max-height:500px;
@@ -103,15 +97,15 @@ select.form-control {
}
.cash-color{
background-color:#80CBC4;
background-color:#2196F3;
}
.credit-color{
background-color:#FFCCBC;
background-color:#FF5722;
}
.other-payment-color{
background-color:#E1BEE7;
background-color:#795548;
}
.cashier_number:hover{
@@ -207,7 +201,7 @@ select.form-control {
}
.red {
background-color:#ff0000;
background-color:#F44336;
}
.green{

View File

@@ -39,6 +39,16 @@
margin-top: 0px !important;
}
.dropdown-menu > li > p:hover {
background-color: #ccc;
}
@media (min-width: 768px){
.dropdown-menu {
padding: .3rem 0;
}
}
.switch label {
color: #070707 !important;
}
@@ -177,10 +187,38 @@ section.content {
.hidden{
display: none !important;
}
.hide{
display: none !important;
}
.sidebar .menu .list a {
padding: 5px 13px;
}
.dtp .dtp-buttons .dtp-btn-clear ,.dtp-btn-now ,.dtp-btn-ok ,.dtp-btn-cancel {
background-color: #007d72 !important;
}
.m-t-1{
margin-top: 1px;
}
.m-t-2{
margin-top: 2px;
}
.m-t-3{
margin-top: 3px;
}
.m-t-4{
margin-top: 4px;
}
.m-t-7{
margin-top: 7px;
}
/* FORM */
.input-group-addon {
padding: 0rem 0rem;
}
/* END FORM */
/* End Reset Theme */
/* *************************************************** */

View File

@@ -10,13 +10,18 @@ class Api::BillController < Api::ApiController
table = 0
if (params[:booking_id])
booking = Booking.find(params[:booking_id])
# for Job
# for Multiple Cashier by Zone
table = DiningFacility.find(booking.dining_facility_id)
cashier_zone = CashierTerminalByZone.find_by_zone_id(table.zone_id)
shift_by_terminal = ShiftSale.find_by_cashier_terminal_id(cashier_zone.cashier_terminal_id)
get_cashier_by_terminal = Employee.find(shift_by_terminal.employee_id)
if booking
if booking.sale_id.nil?
@sale = Sale.new
@status, @sale_id = @sale.generate_invoice_from_booking(params[:booking_id], current_login_employee, get_cashier)
@status, @sale_id = @sale.generate_invoice_from_booking(params[:booking_id], current_login_employee, get_cashier_by_terminal)
else
@status = true
@sale_id = booking.sale_id

View File

@@ -72,7 +72,12 @@ class HomeController < ApplicationController
# .group_by_hour(:created_at, :time_zone => 'Asia/Rangoon',format: '%I:%p')
# .sum(:grand_total)
@employee_sales = Sale.employee_sales(today).sum(:grand_total)
@inventories = StockJournal.inventory_balances(today).sum(:balance)
@inventories = StockJournal.inventory_balances(today).sum(:balance)
@total_sale = Sale.total_sale(today)
@total_count = Sale.total_count(today)
@total_card = Sale.total_card_sale(today)
@total_credit = Sale.credit_payment(today)
end
def destroy

View File

@@ -34,7 +34,6 @@ class Origami::AddordersController < BaseOrigamiController
def get_menu_category ()
if (params[:id])
puts "sssssssssssss"
puts params[:id]
#Pull this menu
@menu = MenuCategory.find_by_id(params[:id])

View File

@@ -9,8 +9,19 @@ class Origami::PaymentsController < BaseOrigamiController
sale_items = SaleItem.where("sale_id=?",sale_id)
member_info = nil
# Print for First Bill to Customer
# For Cashier by Zone
bookings = Booking.where("sale_id='#{sale_id}'")
if bookings.count > 1
# for Multiple Booking
table = DiningFacility.find(bookings[0].dining_facility_id)
else
table = DiningFacility.find(bookings[0].dining_facility_id)
end
cashier_zone = CashierTerminalByZone.find_by_zone_id(table.zone_id)
cashier_terminal = CashierTerminal.find(cashier_zone.cashier_terminal_id)
# Print for First Bill to Customer
unique_code = "ReceiptBillPdf"
#shop detail
shop_details = Shop.find(1)
@@ -33,7 +44,7 @@ class Origami::PaymentsController < BaseOrigamiController
printer = Printer::ReceiptPrinter.new(print_settings)
printer.print_receipt_bill(print_settings,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")
end
def create
@@ -49,6 +60,19 @@ class Origami::PaymentsController < BaseOrigamiController
render json: JSON.generate({:status => saleObj.rebate_status, :message => "Can't Rebate coz of Sever Error "})
rebate_amount = nil
# For Cashier by Zone
bookings = Booking.where("sale_id='#{sale_id}'")
if bookings.count > 1
# for Multiple Booking
table = DiningFacility.find(bookings[0].dining_facility_id)
else
table = DiningFacility.find(bookings[0].dining_facility_id)
end
cashier_zone = CashierTerminalByZone.find_by_zone_id(table.zone_id)
cashier_terminal = CashierTerminal.find(cashier_zone.cashier_terminal_id)
# For Print
unique_code = "ReceiptBillPdf"
customer= Customer.find(saleObj.customer_id)
@@ -68,7 +92,7 @@ class Origami::PaymentsController < BaseOrigamiController
discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(saleObj.sale_items)
printer = Printer::ReceiptPrinter.new(print_settings)
printer.print_receipt_bill(print_settings,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "Paid")
printer.print_receipt_bill(print_settings,cashier_terminal,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "Paid")
end
end

View File

@@ -8,14 +8,27 @@ class Origami::ShiftsController < BaseOrigamiController
def new
@float = Lookup.where('lookup_type=?','float_value')
@terminal = CashierTerminal.all
@terminal = CashierTerminal.available
end
def create
opening_balance = params[:opening_balance]
cashier_terminal = params[:cashier_terminal]
@shift = ShiftSale.new
@shift.create(opening_balance,cashier_terminal, current_user)
cashier_terminal_param = params[:cashier_terminal]
# Multiple Cashier
cashier_terminal = CashierTerminal.find(cashier_terminal_param)
if cashier_terminal.is_currently_login
respond_to do |format|
format.html { redirect_to settings_order_queue_stations_url, notice: 'Cashier Terminal already signin!' }
end
end
# Update Cashier Terminal
cashier_terminal.is_currently_login = 1
cashier_terminal.save
@shift_sale = ShiftSale.new
@shift_sale.create(opening_balance,cashier_terminal_param, current_user)
end
def update_shift
@@ -24,9 +37,15 @@ class Origami::ShiftsController < BaseOrigamiController
@shift = ShiftSale.find_by_id(shift_id)
if @shift
@shift.shift_closed_at = DateTime.now.utc
@shift.closing_balance = closing_balance.to_f
@shift.closing_balance = closing_balance.to_f
@shift.save
# Multiple Cashier
cashier_terminal = @shift.cashier_terminal
cashier_terminal.is_currently_login = 0
cashier_terminal.save
unique_code = "CloseCashierPdf"
shop_details = Shop.find(1)
#get tax
@@ -44,7 +63,7 @@ class Origami::ShiftsController < BaseOrigamiController
printer = Printer::CashierStationPrinter.new(print_settings)
printer.print_close_cashier(print_settings,@shift,shop_details,@sale_taxes,@other_payment,@total_amount_by_account,@total_discount_by_account,@total_member_discount)
printer.print_close_cashier(print_settings,cashier_terminal,@shift,shop_details,@sale_taxes,@other_payment,@total_amount_by_account,@total_discount_by_account,@total_member_discount)
end

View File

@@ -2,18 +2,21 @@ class Reports::CommissionController < BaseReportController
# authorize_resource :class => false
def index
from_date = DateTime.now.beginning_of_day.utc.getlocal
to_date = DateTime.now.end_of_day.utc.getlocal
unless params[:daterange].blank?
from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day.utc.getlocal
to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day.utc.getlocal
@daterange = params[:daterange]
end
# from_date = DateTime.now.beginning_of_day.utc.getlocal
# to_date = DateTime.now.end_of_day.utc.getlocal
# unless params[:daterange].blank?
# from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day.utc.getlocal
# to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day.utc.getlocal
# @daterange = params[:daterange]
# end
from_date, to_date = get_date_range_from_params
commissioner = params[:commissioner].to_i
@com_id = commissioner
@commissioner = Commissioner.active.all
@transaction = ProductCommission.get_transaction(from_date, to_date, commissioner)
@from = from_date
@to = to_date

View File

@@ -2,13 +2,14 @@ class Reports::StockCheckController < BaseReportController
# authorize_resource :class => false
def index
from_date = DateTime.now.beginning_of_day.utc.getlocal
to_date = DateTime.now.end_of_day.utc.getlocal
unless params[:daterange].blank?
from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day.utc.getlocal
to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day.utc.getlocal
@daterange = params[:daterange]
end
# from_date = DateTime.now.beginning_of_day.utc.getlocal
# to_date = DateTime.now.end_of_day.utc.getlocal
# unless params[:daterange].blank?
# from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day.utc.getlocal
# to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day.utc.getlocal
# @daterange = params[:daterange]
# end
from_date, to_date = get_date_range_from_params
@item_code = params[:item_code]
@inventory_definitions = InventoryDefinition.active.all

View File

@@ -1,4 +1,6 @@
class CashierTerminal < ApplicationRecord
has_many :cashier_terminal_by_zones
has_many :zones, through: :cashier_terminal_by_zones
scope :available, -> {where(is_currently_login: false)}
end

View File

@@ -22,7 +22,7 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker
# end
#Bill Receipt Print
def print_close_cashier(printer_settings,shift_sale,shop_details,sale_taxes,other_payment,amount,discount,member_discount)
def print_close_cashier(printer_settings,cashier_terminal,shift_sale,shop_details,sale_taxes,other_payment,amount,discount,member_discount)
#Use CUPS service
#Generate PDF
#Print
@@ -32,7 +32,7 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker
pdf = CloseCashierPdf.new(printer_settings,shift_sale,shop_details,sale_taxes,other_payment,amount,discount,member_discount)
filename = "tmp/close_cashier_#{cashier}_#{shift_name}.pdf"
pdf.render_file filename
self.print(filename)
self.print(filename, cashier_terminal.printer_name)
end

View File

@@ -65,7 +65,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
end
#Bill Receipt Print
def print_receipt_bill(printer_settings,sale_items,sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount=nil,shop_details, printed_status)
def print_receipt_bill(printer_settings,cashier_terminal,sale_items,sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount=nil,shop_details, printed_status)
#Use CUPS service
#Generate PDF
#Print
@@ -77,10 +77,10 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
begin
if count == 1
pdf.render_file "tmp/receipt_bill_#{sale_data.receipt_no}.pdf"
self.print("tmp/receipt_bill_#{sale_data.receipt_no}.pdf")
self.print("tmp/receipt_bill_#{sale_data.receipt_no}.pdf", cashier_terminal.printer_name)
else
pdf.render_file "tmp/receipt_bill_#{sale_data.receipt_no}_#{count}.pdf"
self.print("tmp/receipt_bill_#{sale_data.receipt_no}_#{count}.pdf")
self.print("tmp/receipt_bill_#{sale_data.receipt_no}_#{count}.pdf", cashier_terminal.printer_name)
end
count -= 1

View File

@@ -71,8 +71,8 @@ class Sale < ApplicationRecord
# set cashier
if cashier != nil
self.cashier_id = cashier[0].id
self.cashier_name = cashier[0].name
self.cashier_id = cashier.id
self.cashier_name = cashier.name
else
self.cashier_id = requested_by.id
self.cashier_name = requested_by.name
@@ -867,6 +867,34 @@ end
.order('e.name ASC')
end
def self.total_sale(today)
total = Sale.where('sale_status = "completed" and DATE_FORMAT(receipt_date,"%Y-%m-%d") = ?',today).sum("grand_total")
end
def self.total_count(today)
total = Sale.where('sale_status = "completed" and DATE_FORMAT(receipt_date,"%Y-%m-%d") = ?',today).count
end
def self.total_card_sale(today)
payment_type = " and payment_method = 'mpu' or payment_method = 'visa' or payment_method = 'master' or payment_method = 'jcb' "
# query = Sale.select("SUM(tax_payable_amount) AS st_amount,tax_name")
# .where('sale_status = "completed" #{payment_type} and DATE_FORMAT(receipt_date,"%Y-%m-%d") = ?',today)
# .joins("join sale_payments on sale_id = sales.sale_id")
# .group("sales.sale_id")
query = SalePayment.where('s.sale_status = "completed" and payment_method = "mpu" or payment_method = "visa" or payment_method = "master" or payment_method = "jcb" and DATE_FORMAT(s.receipt_date,"%Y-%m-%d") = ?',today)
.joins("INNER JOIN sales s ON s.sale_id = sale_payments.sale_id")
.sum("payment_amount")
end
def self.credit_payment(today)
query = SalePayment.where('s.sale_status = "completed" and payment_method="creditnote" and DATE_FORMAT(s.receipt_date,"%Y-%m-%d") = ?',today)
.joins("INNER JOIN sales s ON s.sale_id = sale_payments.sale_id")
.sum("payment_amount")
end
private
def generate_custom_id

View File

@@ -1,42 +1,15 @@
class SeedGenerator < ApplicationRecord
# Generate ID for Tables
def self.generate_id(model, prefix)
seed = SeedGenerator.find_by_model(model)
next_no = seed.next
new_receipt_no = 0
cur_val, next_val = self.update_seed(model)
if (seed.nil?)
seed = SeedGenerator.new()
seed.model = model
new_receipt_no = seed.next
seed.save
else
# current_no = seed.next
# seed.next = seed.next + seed.increase_by
# seed.current = current_no
# seed.save
cur_val, next_val = self.update_seed(model, seed.next, seed.increase_by)
if next_no == cur_val
puts "SSS"
puts next_val
cur_val2, next_val2 = self.update_seed(model, next_val, seed.increase_by)
puts next_val2
padding_len = 15 - prefix.length
saleOrderId = prefix +"-"+ cur_val2.to_s.to_s.rjust((14-prefix.length)+1,'0')
puts saleOrderId
return saleOrderId
end
padding_len = 15 - prefix.length
saleOrderId = prefix +"-"+ cur_val.to_s.to_s.rjust((14-prefix.length)+1,'0')
return saleOrderId
end
if (cur_val == 0)
cur_val, next_val = self.execute_query(model)
end
padding_len = 15 - prefix.length
saleOrderId = prefix +"-"+ seed.current.to_s.to_s.rjust((14-prefix.length)+1,'0')
return saleOrderId
saleOrderId = prefix +"-"+ cur_val.to_s.to_s.rjust((14-prefix.length)+1,'0')
return saleOrderId
end
# Generate Receipt No
@@ -88,23 +61,41 @@ class SeedGenerator < ApplicationRecord
return next_code
end
def self.update_seed(model, current, inc)
cur_val = 0
next_val = 0
nex = current + inc
def self.execute_query(model)
current = 0
nex = 0
sql = "INSERT INTO seed_generators (model, created_at, updated_at)
VALUES('#{ model }', NOW(), NOW())
ON DUPLICATE KEY UPDATE current = current + 1, next = next + 1;"
update_sql = "update seed_generators set current= #{current}, next= #{nex} where model='#{model}';";
select_sql = "select * from seed_generators where model='#{model}';"
ActiveRecord::Base.connection.execute(sql);
select_result = ActiveRecord::Base.connection.execute(select_sql);
select_result.each do |row|
current = row [3]
nex = row[4]
end
return current, nex
end
def self.update_seed(model)
current = 0
nex = 0
update_sql = "UPDATE seed_generators set current = current + 1, next = next + 1 WHERE model='#{model}';"
select_sql = "select * from seed_generators where model='#{model}';"
update_result = ActiveRecord::Base.connection.execute(update_sql);
select_result = ActiveRecord::Base.connection.execute(select_sql);
select_result.each do |row|
p row
cur_val = row [3]
next_val = row[4]
current = row [3]
nex = row[4]
end
return cur_val, next_val
return current, nex
end
end

View File

@@ -37,6 +37,7 @@ class ShiftSale < ApplicationRecord
self.shift_started_at = DateTime.now
self.employee_id = current_user.id
self.opening_balance = opening_balance
self.other_sales = 0
self.save
end

View File

@@ -17,7 +17,7 @@ class OrderItemPdf < Prawn::Document
# super(:margin => [10, 5, 30, 5], :page_size => [200,400])
# db font setup
if print_settings.font != nil
if print_settings.font != ""
font_families.update("#{print_settings.font}" => {
:normal => "public/fonts/#{print_settings.font}.ttf",
:italic => "public/fonts/#{print_settings.font}.ttf",
@@ -26,13 +26,17 @@ class OrderItemPdf < Prawn::Document
})
font "#{print_settings.font}"
fallback_fonts ["Courier", "Helvetica", "Times-Roman"]
fallback_fonts ["Courier", "Helvetica", "Times-Roman"]
self.header_font_size = 11
self.item_font_size = 9
else
self.header_font_size = 12
self.item_font_size = 10
end
# font "public/fonts/Zawgyi-One.ttf"
# font "public/fonts/padauk.ttf"
#font "public/fonts/Chinese.ttf"
self.header_font_size = 12
self.item_font_size = 10
#font "public/fonts/Chinese.ttf"
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
stroke_horizontal_rule

View File

@@ -16,7 +16,7 @@ class OrderSummaryPdf < Prawn::Document
super(:margin => [print_settings.heading_space, self.margin, self.margin, self.margin], :page_size => [self.page_width, self.page_height])
# db font setup
if print_settings.font != nil
if print_settings.font != ""
font_families.update("#{print_settings.font}" => {
:normal => "public/fonts/#{print_settings.font}.ttf",
:italic => "public/fonts/#{print_settings.font}.ttf",
@@ -26,11 +26,16 @@ class OrderSummaryPdf < Prawn::Document
font "#{print_settings.font}"
fallback_fonts ["Courier", "Helvetica", "Times-Roman"]
self.header_font_size = 11
self.item_font_size = 9
else
self.header_font_size = 12
self.item_font_size = 10
end
# font "public/fonts/Zawgyi-One.ttf"
# font "public/fonts/padauk.ttf"
self.header_font_size = 12
self.item_font_size = 10
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
stroke_horizontal_rule

View File

@@ -23,7 +23,7 @@ class ReceiptBillPdf < Prawn::Document
super(:margin => [printer_settings.heading_space, self.margin, self.margin, self.margin], :page_size => [self.page_width, self.page_height])
# db font setup
if printer_settings.font != nil
if printer_settings.font != ""
font_families.update("#{printer_settings.font}" => {
:normal => "public/fonts/#{printer_settings.font}.ttf",
:italic => "public/fonts/#{printer_settings.font}.ttf",

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="page-header">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
@@ -9,7 +9,7 @@
</span>
</ul>
</div>
</div>
<div class="row clearfix">
<div class="col-lg-8 col-md-8 col-sm-8">
<!-- <div class="main-box-body clearfix"> -->

View File

@@ -5,47 +5,48 @@
<!-- Widgets -->
<div class="row clearfix">
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="info-box bg-pink hover-expand-effect">
<div class="icon">
<i class="material-icons">playlist_add_check</i>
</div>
<div class="content">
<div class="text">NEW TASKS</div>
<div class="number count-to" data-from="0" data-to="125" data-speed="15" data-fresh-interval="20"></div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="info-box bg-cyan hover-expand-effect">
<div class="icon">
<i class="material-icons">help</i>
</div>
<div class="content">
<div class="text">NEW TICKETS</div>
<div class="number count-to" data-from="0" data-to="257" data-speed="1000" data-fresh-interval="20"></div>
<div class="text">SALE COUNT</div>
<div class="number count-to" data-from="0" data-to="<%= @total_count%>" data-speed="1000" data-fresh-interval="20"></div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="info-box bg-light-green hover-expand-effect">
<div class="info-box bg-pink hover-expand-effect">
<div class="icon">
<i class="material-icons">forum</i>
<i class="material-icons">attach_money</i>
</div>
<div class="content">
<div class="text">NEW COMMENTS</div>
<div class="number count-to" data-from="0" data-to="243" data-speed="1000" data-fresh-interval="20"></div>
<div class="text">TOTAL SALE</div>
<div class="number count-to" data-from="0" data-to="<%= @total_sale%>" data-speed="15" data-fresh-interval="20"></div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="info-box bg-light-green hover-expand-effect">
<div class="icon">
<i class="material-icons">person_add</i>
</div>
<div class="content">
<div class="text">TOTAL CREDIT</div>
<div class="number count-to" data-from="0" data-to="<%= @total_credit%>" data-speed="1000" data-fresh-interval="20"></div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="info-box bg-orange hover-expand-effect">
<div class="icon">
<i class="material-icons">person_add</i>
<i class="material-icons">credit_card</i>
</div>
<div class="content">
<div class="text">NEW VISITORS</div>
<div class="number count-to" data-from="0" data-to="1225" data-speed="1000" data-fresh-interval="20"></div>
<div class="text">TOTAL CARD</div>
<div class="number count-to" data-from="0" data-to="<%= @total_card%>" data-speed="1000" data-fresh-interval="20"></div>
</div>
</div>
</div>

View File

@@ -1,48 +1,34 @@
<div class="row">
<div class="col-md-8"><h2> Inventoy Product Lists</h2></div>
<div class="col-md-4"><button id='new_inventory_product' class='btn bg-blue waves-effect' style='margin-top:15px;'>New Inventory Product</button></div>
</div>
<table class="table table-striped">
<tr>
<th>#</th>
<th>Product</th>
<th>Min Order</th>
<th>Max Stock</th>
<th>Created by</th>
<th>Created Time</th>
</tr>
<%
count = 0
@products.each do |item|
count += 1
%>
<tr>
<td><%= count %></td>
<td>
<% menu_item = MenuItemInstance.find_by_item_instance_code(item.item_code)%>
<% if menu_item.nil? %>
<%= Product.find_by_item_code(item.item_code).name rescue "-" %>
<% else %>
<%= menu_item.menu_item.name rescue "-" %>
- <%= menu_item.item_instance_name rescue "-" %>
<% end %>
</td>
<td><%= item.min_order_level %></td>
<td><%= item.max_stock_level %></td>
<td><%= Employee.find(item.created_by).name rescue '-' %></td>
<td><%= item.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %></td>
</tr>
<% end %>
</table>
<div class="row">
<div class="col-md-12">
<table class="table table-striped">
<tr>
<th>#</th>
<th>Product</th>
<th>Min Order</th>
<th>Max Stock</th>
<th>Created by</th>
<th>Created Time</th>
</tr>
<%
count = 0
@products.each do |item|
count += 1
%>
<tr>
<td><%= count %></td>
<td>
<% menu_item = MenuItemInstance.find_by_item_instance_code(item.item_code)%>
<% if menu_item.nil? %>
<%= Product.find_by_item_code(item.item_code).name rescue "-" %>
<% else %>
<%= menu_item.menu_item.name rescue "-" %>
- <%= menu_item.item_instance_name rescue "-" %>
<% end %>
</td>
<td><%= item.min_order_level %></td>
<td><%= item.max_stock_level %></td>
<td><%= Employee.find(item.created_by).name rescue '-' %></td>
<td><%= item.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %></td>
</tr>
<% end %>
</table>
</div>
</div>
<script>
$('#new_inventory_product').on('click',function(){
window.location.href = '/inventory/inventory_definitions/new';
})
</script>

View File

@@ -1,17 +1,48 @@
<div class="container-fluid">
<div class="row">
<div class="col-lg-10 col-md-10 col-sm-10">
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item active">Inventory</li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<div class="m-b-10 clearfix">
<button id="stock_check_report" type="button" class="btn bg-blue float-right waves-effect" style='margin-left:5px;'> Stock Check Report
</button>
<button id="stock_taking" type="button" class="btn bg-blue float-right waves-effect" style='margin-left:5px;'> New Stock Taking</button>
<button id='new_inventory_product' class='btn btn-primary float-right waves-effect' style='margin-left:5px;'><%= t("views.btn.new") + " " + (t :inventory) %>
</button>
</div>
<div class="card">
<%= render 'inventory_list' %>
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<% if current_login_employee.role == "administrator" || current_login_employee.role == 'manager' %>
<button id="back" type="button" class="btn bg-default waves-effect"> Back</button>
<% end %>
<button id="stock_taking" type="button" class="btn bg-blue waves-effect"> New Stock Taking</button>
<button id="stock_check_report" type="button" class="btn bg-blue waves-effect"> Stock Check Report</button>
</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">list BUTTON LISTS</i> </h5>
<p>
1) <%= t("views.btn.new") + " " + (t :inventory) %> - to create new inventory <br>
</p>
<p>
2) New Stock Taking - to create new Stock Taking <br>
</p>
<p>
3) Stock Check Report - to go Stock Check Report List <br>
</p>
<h5><i class="material-icons md-18">list LINK LISTS</i> </h5>
<p>1) Home / Back - go to dashboard</p>
</div>
</div>
</div>
</div>
<script>
$('#stock_taking').on('click', function () {
window.location.href = '<%= inventory_stock_checks_path %>';
@@ -21,8 +52,8 @@
window.location.href = '<%= reports_stock_check_index_path %>';
});
$('#back').on('click', function () {
window.location.href = '<%= dashboard_path %>';
});
$('#new_inventory_product').on('click',function(){
window.location.href = '/inventory/inventory_definitions/new';
})
</script>

View File

@@ -1,5 +1,5 @@
<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-8 col-lg-8">
<div class="p-l-10">
<%= simple_form_for([:inventory, @inventory_definition]) do |f| %>
<%= f.error_notification %>
@@ -10,8 +10,8 @@
<% Product.order("name desc").pluck(:name, :item_code).each do |p| %>
<% arr.push(p) %>
<% end %>
<div class="col-md-3">
<label class="control-label"><abbr title="required">*</abbr> Item</label>
<div class="col-md-4">
<label class="control-label"><abbr title="required">*</abbr>Select Item</label>
<select class="form-control item_code_place" id="item">
<% if !@inventory_definition.item_code.nil? %>
<% menuiteminstance = MenuItemInstance.find_by_item_instance_code(@inventory_definition.item_code) %>
@@ -21,7 +21,7 @@
<% code = menuiteminstance.menu_item.item_code %>
<% end %>
<% end %>
<option value=""></option>
<option value="">Select Item</option>
<% arr.each do |a| %>
<% if a[1] == code %>
<option value="<%= a[1] %>" selected><%= a[0] %></option>
@@ -48,19 +48,32 @@
</div>
<div class="form-actions">
<%= f.submit 'Submit', class: 'btn bg-blue waves-effect' %>
<%= f.submit t("views.btn.submit"), class: 'btn bg-blue waves-effect' %>
</div>
<% end %>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
<h5><i class="material-icons md-18">list INPUT LISTS</i> </h5>
<p>
1) Select Item - select to create for new inventory <br>
</p>
<p>
2) Min Order Level - to write minimun number with type Integer/Numeric <br>
</p>
<p>
3) Max Stock Level - to write minimun number with type Integer/Numeric for check stock<br>
</p>
<h5><i class="material-icons md-18">list BUTTON LISTS</i> </h5>
<p>
1) <%= t("views.btn.submit") %> - to create new inventory <br>
</p>
<h5><i class="material-icons md-18">list LINK LISTS</i> </h5>
<p>1) Home / Back - go to dashboard</p>
</div>
</div>
</div>
@@ -70,10 +83,10 @@
<script>
$(document).ready(function () {
$(".item_code_place").select2({
placeholder: 'Select Item'
});
$("select#inventory_definition_item_code").select2();
// $(".item_code_place").select2({
// placeholder: 'Select Item'
// });
// $("select#inventory_definition_item_code").select2();
$(".item_code_place").on('change', function (event) {
var ajax_url = "<%= settings_find_item_instance_path %>";
@@ -90,7 +103,7 @@
$("select#inventory_definition_item_code").append(itemlist);
}
// $("select#inventory_definition_item_code").append(itemlist);
$("select#inventory_definition_item_code").select2();
// $("select#inventory_definition_item_code").select2();
}
});
});

View File

@@ -2,7 +2,7 @@
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= inventory_path %>">Product Inventory</a></li>
<li class="breadcrumb-item active">Edit</li>
<li class="breadcrumb-item active">New</li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), inventory_path %>
</span>

View File

@@ -1,85 +1,95 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item active">Stock Check</li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-12">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<!-- <div class="m-b-10 clearfix">
<%= link_to t("views.btn.new"),new_settings_account_path,:class => 'btn btn-primary btn-lg float-right waves-effect"' %>
</div -->
<div class="card">
<div class="p-l-15 p-r-15 p-t-10">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<div class="col-lg-10 col-md-10 col-sm-8 col-xs-7">
<!-- <label for="remark">Remark</label> -->
<input type='text' id='stock_check_reason' class='form-control' placeholder="Set Stock Check Reason" value=''/>
</div>
</div>
<div class="form-group">
<div class="col-lg-10 col-md-10 col-sm-8 col-xs-7">
<!-- <label for="password_2">Item</label> -->
<select class='form-control' id='product_sku'>
<option value="">Select Product</option>
<% @inventory_definitions.each do |id| %>
<option value="<%= id.item_code %>">
<% menu_item = MenuItemInstance.find_by_item_instance_code(id.item_code) %>
<% if menu_item.nil? %>
<%= Product.find_by_item_code(id.item_code).name rescue "-" %>
<% else %>
<%= menu_item.menu_item.name rescue '-' %> - <%= menu_item.item_instance_name rescue '-' %>
<% end %>
</option>
<% end %>
</select>
</div>
</div>
<div class="form-group">
<div class="col-lg-10 col-md-10 col-sm-8 col-xs-7">
<!-- <label for="email_address_2">Qty</label> -->
<input type='text' class='form-control' placeholder="Qty" id='product_qty' value=''/>
</div>
</div>
<div class="form-group">
<div class="col-md-4">
<button class="btn btn-primary form-control" id='save_to_stock_check'> Save</button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<input type='text' id='stock_check_reason' class='form-control' placeholder="Set Stock Check Reason" value=''/>
</div>
</div>
<br>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-2">
Item
</div>
<div class="col-md-7">
<select class='form-control' id='product_sku'>
<option value="">Select Product</option>
<% @inventory_definitions.each do |id| %>
<option value="<%= id.item_code %>">
<% menu_item = MenuItemInstance.find_by_item_instance_code(id.item_code) %>
<% if menu_item.nil? %>
<%= Product.find_by_item_code(id.item_code).name rescue "-" %>
<% else %>
<%= menu_item.menu_item.name rescue '-' %> - <%= menu_item.item_instance_name rescue '-' %>
<% end %>
</option>
<% end %>
</select>
</div>
</div>
<br>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-2">
Qty
</div>
<div class="col-md-7">
<input type='text' class='form-control' placeholder="Qty" id='product_qty' value=''/>
</div>
</div>
<br>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-7">
<button class="btn btn-primary form-control" id='save_to_stock_check'> Save</button>
<div class="col-md-6">
<table class="table table-striped" id='stock_item'>
<tr>
<!--<th>#</th>-->
<th>Product</th>
<th>Balance</th>
<th><button class="btn btn-primary pull-right form-control" style='margin-bottom:2px;' id='finish'> Finish</button></th>
</tr>
<!-- <tr>
<td colspan="3">
<button class="btn btn-primary pull-right form-control" style='margin-bottom:2px;' id='finish'> Finish</button></td>
</tr> -->
</table>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-5">
<div class="row">
<div class="col-md-12">
<table class="table table-striped" id='stock_item'>
<tr>
<!--<th>#</th>-->
<th>Product</th>
<th>Balance</th>
<th></th>
</tr>
</table>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
</div>
</div>
<div class="col-md-1">
<div class="row">
<button class="btn btn-primary pull-right form-control" style='margin-bottom:2px;' id='back'> Back</button>
<button class="btn btn-primary pull-right form-control" style='margin-bottom:2px;' id='finish'> Finish</button>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
$('#product_sku').select2({
allowClear: true,
placeholder: 'Select Product'
})
});
var count = 0;
@@ -92,8 +102,8 @@
//+ '<td>' + count + '</td>'
+ '<td><input type=hidden value="' + product_sku + '" id="item_sku_' + count + '" name=' + count + '/>'
+ product_name + '</td>'
+ '<td><input type=text value="' + product_qty + '" id="item_qty_' + count + '" name=' + count + '/></td>'
+ '<td><input type=button value="X" id="item_remove_' + count + '" name=' + count + ' onclick="remove_row('+ count +')"/></td>'
+ '<td><input type=text value="' + product_qty + '" class="form-control col-md-9" id="item_qty_' + count + '" name=' + count + '/></td>'
+ '<td><input type=button value="X" class="btn btn-danger p-l-15 p-r-15" id="item_remove_' + count + '" name=' + count + ' onclick="remove_row('+ count +')"/></td>'
+ '</tr>';
$('#stock_item').append(tr);
// $('#product_sku').val('');
@@ -124,10 +134,6 @@
})
});
$('#back').on('click', function () {
window.location.href = '/inventory';
});
function remove_row(row) {
$("#item_remove_"+row).parent().parent().remove();
}

View File

@@ -1,72 +1,92 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%=inventory_stock_checks_path%>"></a>Stock Check</li>
<li class="breadcrumb-item active">Detail</li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<input type='hidden' id='stock_check_id' value='<%= @check.id %>'/>
<div class="col-md-10">
<div class="row">
<div class="col-md-2">
Check by
</div>
<div class="col-md-8">
<%= Employee.find(@check.check_by).name rescue '' %>
</div>
</div>
<div class="row">
<div class="col-md-2">
Check At
</div>
<div class="col-md-8">
<%= @check.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %></div>
</div>
<div class="row">
<div class="col-md-2">
Reason
</div>
<div class="col-md-8">
<%= @check.reason %>
</div>
</div>
<br>
<div class="row">
<table class="table table-striped col-md-12">
<tr>
<th>#</th>
<th>Product</th>
<th>Stock Count</th>
<th>Stock Balance</th>
<th>Different</th>
<th>Remark</th>
</tr>
<%
count = 0
@check.stock_check_items.each do |item|
count += 1
%>
<tr>
<td><%= count %></td>
<td>
<% menu_item = MenuItemInstance.find_by_item_instance_code(item.item_code)%>
<% if menu_item.nil? %>
<%= Product.find_by_item_code(item.item_code).name rescue "-" %>
<% else %>
<%= menu_item.menu_item.name rescue "-" %>
- <%= menu_item.item_instance_name rescue "-" %>
<% end %>
</td>
<td><%= item.stock_count %></td>
<td><%= item.stock_balance %></td>
<td><%= item.different %></td>
<td><%= item.remark %></td>
</tr>
<% end %>
</table>
<div class="col-xs-12 col-sm-12 col-md-10 col-lg-10">
<div class="card">
<input type='hidden' id='stock_check_id' value='<%= @check.id %>'/>
<div class="p-l-20 p-t-15">
<div class="row">
<div class="col-md-2">
Check by
</div>
<div class="col-md-8">
<%= Employee.find(@check.check_by).name rescue '' %>
</div>
</div>
<div class="row">
<div class="col-md-2">
Check At
</div>
<div class="col-md-8">
<%= @check.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %>
</div>
</div>
<div class="row">
<div class="col-md-2">
Reason
</div>
<div class="col-md-8">
<%= @check.reason %>
</div>
</div>
</div>
<br>
<div class="table-responsive">
<table class="table table-striped col-md-12">
<tr>
<th>#</th>
<th>Product</th>
<th>Stock Count</th>
<th>Stock Balance</th>
<th>Different</th>
<th>Remark</th>
</tr>
<%
count = 0
@check.stock_check_items.each do |item|
count += 1
%>
<tr>
<td><%= count %></td>
<td>
<% menu_item = MenuItemInstance.find_by_item_instance_code(item.item_code)%>
<% if menu_item.nil? %>
<%= Product.find_by_item_code(item.item_code).name rescue "-" %>
<% else %>
<%= menu_item.menu_item.name rescue "-" %>
- <%= menu_item.item_instance_name rescue "-" %>
<% end %>
</td>
<td><%= item.stock_count %></td>
<td><%= item.stock_balance %></td>
<td><%= item.different %></td>
<td><%= item.remark %></td>
</tr>
<% end %>
</table>
</div>
</div>
</div>
<div class="col-md-2">
<button id="back" type="button" class="btn btn-block btn-primary"> Back</button>
<button id="save_to_journal" type="button" class="btn btn-block btn-primary"> Save to Journal</button>
<button id="print" type="button" class="btn btn-block btn-primary"> Print</button>
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
<div class="body">
<button id="save_to_journal" type="button" class="btn btn-block btn-primary"> Save to Journal</button>
<button id="print" type="button" class="btn btn-block btn-primary"> Print</button>
</div>
</div>
</div>
<script>
$('#save_to_journal').on('click', function () {

View File

@@ -32,7 +32,7 @@
<ul class="dropdown-menu">
<li>
<%if current_login_employee.role !="waiter" %>
<p class="delete waves-effect waves-block" style="margin:0.5rem 1rem !important;" data-ref="<%=logout_path%>" data-method="delete">Logout</p>
<p class="delete waves-effect waves-block" style="padding:0.5rem 1rem; margin-bottom: 0rem;" data-ref="<%=logout_path%>" data-method="delete">Logout</p>
<span class="hidden" id="delete_text">
<h6>Are you sure you want to Logout ?</h6>
<!-- <h6>This action can't be undo. </h6> -->

View File

@@ -153,12 +153,8 @@
<span><%= t :printer %></span>
</a>
</li>
<li>
<a href="<%= settings_products_path %>">
<i class="material-icons col-brown">donut_large</i>
<span><%= t :products %></span>
</a>
</li>
<li>
<a href="<%= settings_tax_profiles_path %>">
<i class="material-icons col-green">donut_large</i>
@@ -177,6 +173,30 @@
<span><%= t :accounts %></span>
</a>
</li>
<li>
<a href="<%= settings_products_path %>">
<i class="material-icons col-brown">donut_large</i>
<span><%= t :products %></span>
</a>
</li>
<li>
<a href="<%= settings_promotions_path %>">
<i class="material-icons col-red">donut_large</i>
<span><%= t :promotions %></span>
</a>
</li>
<li>
<a href="<%= settings_commissions_path %>">
<i class="material-icons col-green">donut_large</i>
<span><%= t :commissions %></span>
</a>
</li>
<li>
<a href="<%= settings_commissioners_path %>">
<i class="material-icons col-teal">donut_large</i>
<span><%= t :commissioners %></span>
</a>
</li>
</ul>
</div>
<!-- #Menu -->

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="page-header">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
@@ -13,7 +13,7 @@
<!-- Column One -->
<div class="row clearfix">
<div class="col-lg-8 col-md-8 col-sm-8">
<div class="body">
<div class="body p-l-10">
<%= form_tag oqs_root_path, :method => :get do %>
<div class="row clearfix">
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
@@ -76,26 +76,26 @@
<div class="tab-content" id="custom-slimscroll" style="max-height:; overflow:">
<!--- Panel 0 - Completed -->
<div class="tab-pane fade in active" id="completed" role="tabpanel">
<div class="tab-pane in active" id="completed" role="tabpanel">
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<%
@queue_completed_item.each do |qid|
%>
<div class="card queue_station">
<div class="card-block">
<h4 class="card-title">
<h5 class="card-">
<span class="order-zone-type"><%= qid.type %> - </span>
<span class="order-zone"><%= qid.zone %></span>
<small class="pull-right"><%= qid.order_id %></small>
</h4>
<h4>
</h5>
<h5>
<span class="order-item">
<%= qid.item_name %>
</span> [x
<span class="order-qty">
<%= qid.qty %>
</span> ]
</h4>
</h5>
<p class="card-text item-options"><%= qid.options == "[]"? "" : qid.options %></p>
@@ -187,7 +187,7 @@
</div>
</div>
</div>
<script type="text/javascript">
<!-- <script type="text/javascript">
$(document).ready(function(){
$(".nav-completed").on("click", function(){
@@ -413,4 +413,4 @@
});
});
});
</script>
</script> -->

View File

@@ -1,6 +1,9 @@
<%= stylesheet_link_tag 'addorder', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'addorder', 'data-turbolinks-track': 'reload' %>
<div class="row">
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>
<div class="row m-t--20">
<div class="col-lg-2 col-md-2 col-sm-2">
<ul class="nav nav-tabs flex-column" role="tablist" >
<% @menu.each do |menu| %>
@@ -16,18 +19,17 @@
</li>
</ul>
</div>
<div class="col-md-7 col-lg-7 col-sm-7">
<div class="col-md-7 col-lg-7 col-sm-7 m-t-10">
<div class="card-columns custom-card-columns menu_items_list" style="column-gap: 10px;">
<!-- append data -->
</div>
</div>
<div class="col-md-3 col-lg-3 col-sm-3">
<button type="button" class="btn btn-primary btn-md pull-right" id="back"><i class="fa fa-arrow-left"></i> BACK </button> <br><br>
<div class="col-md-3 col-lg-3 col-sm-3 m-t-10">
<button type="button" class="btn btn-primary btn-md float-right" id="back"><i class="fa fa-arrow-left"></i> BACK </button> <br>
<div class="card-header">
<div>
<strong id="order-title">ORDER DETAILS </strong> | Table <%=@table.name%>
<strong id="order-title">ORDER DETAILS </strong>| Table<%=@table.name%>
<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>
@@ -121,13 +123,14 @@
<div class="input-group">
<span class="input-group-btn">
<button type="button" class="btn btn-danger btn-number" value="-" id="minus">
<span class="glyphicon glyphicon-minus"></span>
<i class="material-icons">remove</i>
</button>
</span>
<input type="text" value="1" id="count" class="change_qty form-control col-md-12 ">
<span class="input-group-btn">
<button type="button" class="btn btn-success btn-number" value="+" id="plus">
<span class="glyphicon glyphicon-plus"></span>
<i class="material-icons">add</i>
</button>
</span>
</div>
@@ -154,8 +157,8 @@
<div class="mr-auto">
<h4 class=" pull-left">Total : <span id="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 add_to_order" data-dismiss="modal" id="add_to_order">Add to Order</button>
<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>
</div>
</div>
@@ -183,13 +186,13 @@
<div class="input-group">
<span class="input-group-btn">
<button type="button" class="btn btn-danger btn-number" value="-" id="set_minus">
<span class="glyphicon glyphicon-minus"></span>
<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 ">
<span class="input-group-btn">
<button type="button" class="btn btn-success btn-number" value="+" id="set_plus">
<span class="glyphicon glyphicon-plus"></span>
<i class="material-icons">add</i>
</button>
</span>
</div>
@@ -207,7 +210,7 @@
</div>
<div class="col-md-8">
<div class="instance-list"></div>
<div class="instance-list row"></div>
</div>
</div>
</div>

View File

@@ -90,11 +90,11 @@
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="row bottom">
<div class="cashier_number long left" data-value="1000" data-type="add">1000</div>
<div class="cashier_number long border-left" data-value="1000" data-type="add">1000</div>
<div class="cashier_number long left" data-value="3000" data-type="add">3000</div>
</div>
<div class="row bottom">
<div class="cashier_number long left" data-value="5000" data-type="add">5000</div>
<div class="cashier_number long border-left" data-value="5000" data-type="add">5000</div>
<div class="cashier_number long left" data-value="10000" data-type="add">10000</div>
</div>
<div class="row bottom">
@@ -106,7 +106,7 @@
</div>
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn bg-blue btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment';"> Back </button>
<button type="button" class="btn bg-default m-l-10 btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment';"> Back </button>
</div>
</div>
</div>

View File

@@ -1,4 +1,7 @@
<div class="container-fluid">
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>
<div class="row">
<!-- Column One -->
<div class="col-lg-6 col-md-6 col-sm-6">
@@ -366,6 +369,7 @@
// Pay Discount for Payment
$("#pay-discount").on('click', function(e){
e.preventDefault();
$("#loading_wrapper").show();
var sale_id = $('#sale-id').text();
var discount_items = JSON.stringify(get_discount_item_rows());
var overall_discount = $("#order-discount").text();
@@ -379,6 +383,7 @@
url: ajax_url,
data: params,
success:function(result){
$("#loading_wrapper").hide();
swal({
title: "Infomation!",
text: result.status,

View File

@@ -127,7 +127,7 @@
</div>
<div class="card-block">
<div class="card-title">
<div class="row">
<div class="row p-l-5 p-r-5">
<div class="col-lg-6 col-md-6 col-sm-6">
Receipt No: <span id="receipt_no">
<% if @status_sale == 'sale' %>
@@ -142,7 +142,7 @@
<br>
</div>
</div>
<div class="row">
<div class="row p-l-5 p-r-5">
<div class="col-lg-6 col-md-6 col-sm-6">
<% if @status_sale == 'sale' %>
<p class="hidden customer-id"><%= @sale_array[0].customer_id rescue '' %></p>

View File

@@ -76,11 +76,11 @@
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="row bottom">
<div class="cashier_number long left" data-value="1000" data-type="add">1000</div>
<div class="cashier_number long border-left" data-value="1000" data-type="add">1000</div>
<div class="cashier_number long left" data-value="3000" data-type="add">3000</div>
</div>
<div class="row bottom">
<div class="cashier_number long left" data-value="5000" data-type="add">5000</div>
<div class="cashier_number long border-left" data-value="5000" data-type="add">5000</div>
<div class="cashier_number long left" data-value="10000" data-type="add">10000</div>
</div>
<div class="row bottom">
@@ -92,7 +92,7 @@
</div>
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-primary btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"> Back </button>
<button type="button" class="btn btn-primary m-l-10 btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"> Back </button>
</div>
</div>

View File

@@ -76,11 +76,11 @@
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="row bottom">
<div class="cashier_number long left" data-value="1000" data-type="add">1000</div>
<div class="cashier_number long border-left" data-value="1000" data-type="add">1000</div>
<div class="cashier_number long left" data-value="3000" data-type="add">3000</div>
</div>
<div class="row bottom">
<div class="cashier_number long left" data-value="5000" data-type="add">5000</div>
<div class="cashier_number long border-left" data-value="5000" data-type="add">5000</div>
<div class="cashier_number long left" data-value="10000" data-type="add">10000</div>
</div>
<div class="row bottom">
@@ -92,7 +92,7 @@
</div>
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-primary btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"> Back </button>
<button type="button" class="btn btn-default m-l-3 btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"> Back </button>
</div>
</div>

View File

@@ -220,17 +220,22 @@ $(document).ready(function(){
var dining_id = $(this).attr("data-id");
var change_from = "<%= @dining.id %>";
if (dining_id == change_from) {
$.alert({
/*$.alert({
title: 'Alert!',
content: 'Please Select Another Table',
type: 'red',
typeAnimated: true,
btnClass: 'btn-danger',
});
}else{
$('#moved').text(" ' " + dining_name + " ' ")
$('#change_table_value').val(dining_id);
}
});*/
swal({
title: "Alert!!",
text: 'Please Select Another Table !',
type: 'warning',
});
}else{
$('#moved').text(" ' " + dining_name + " ' ")
$('#change_table_value').val(dining_id);
}
})
@@ -241,13 +246,11 @@ $(document).ready(function(){
var dining_id = $(this).attr("data-id");
var change_from = "<%= @dining.id %>";
if (dining_id == change_from) {
$.alert({
title: 'Alert!',
content: 'Please Select Another Table',
type: 'red',
typeAnimated: true,
btnClass: 'btn-danger',
});
swal({
title: "Alert!!",
text: 'Please Select Another Table !',
type: 'warning',
});
}else{
$('#moved').text(dining_name)
$('#change_table_value').val(dining_id);
@@ -258,18 +261,29 @@ $(document).ready(function(){
change_to = $('#change_table_value').val();
change_from = "<%= @dining.id %>";
if (change_to == ""){
alert("Please Select Table")
swal({
title: "Alert!!",
text: 'Please Select Table !',
type: 'warning',
});
}else{
$.ajax({type: "POST",
url: "<%= origami_moving_path %>",
data: "change_from="+ change_from + "&change_to=" + change_to,
success:function(result){
alert("Moving Success")
if (result.get_type == 'Table'){
window.location.href = '/origami/table/' + change_to;
}else{
window.location.href = '/origami/room/' + change_to;
}
swal({
title: "Information!",
text: 'Moving Success',
type: 'success',
}, function (){
if (result.get_type == 'Table'){
window.location.href = '/origami/table/' + change_to;
}else{
window.location.href = '/origami/room/' + change_to;
}
});
}
});
}

View File

@@ -79,11 +79,11 @@
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="row bottom">
<div class="cashier_number long left" data-value="1000" data-type="add">1000</div>
<div class="cashier_number long border-left" data-value="1000" data-type="add">1000</div>
<div class="cashier_number long left" data-value="3000" data-type="add">3000</div>
</div>
<div class="row bottom">
<div class="cashier_number long left" data-value="5000" data-type="add">5000</div>
<div class="cashier_number long border-left" data-value="5000" data-type="add">5000</div>
<div class="cashier_number long left" data-value="10000" data-type="add">10000</div>
</div>
<div class="row bottom">
@@ -95,7 +95,7 @@
</div>
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-primary btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"> Back </button>
<button type="button" class="btn btn-primary m-l-10 btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"> Back </button>
</div>
</div>
</div>

View File

@@ -127,18 +127,18 @@
<div><strong id="order-title">ORDERS DETAILS </strong></div>
</div>
<div class="card-block">
<div class="card-title row">
<div class="card-title row p-l-5 p-r-5">
<div class="col-lg-6 col-md-6 col-sm-6">
<p> Receipt No: <span id="receipt_no">
</span></p>
Receipt No: <span id="receipt_no">
</span>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
<p>Date: <span id="receipt_date"><%= @order.created_at.utc.getlocal.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
Date: <span id="receipt_date"><%= @order.created_at.utc.getlocal.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span>
</div>
</div>
<div class="card-title row customer_detail hide">
<div class="col-lg-6 col-md-6 col-sm-6">
<p>Customer : <span id="customer_name"></span></p>
Customer : <span id="customer_name"></span>
</div>
</div>

View File

@@ -265,7 +265,7 @@
<!-- Waiter Buttons -->
<button type="button" class="btn bg-default btn-block" onclick="localStorage.removeItem('cash');window.location.href = '/origami';"> Back </button>
<button type="button" class="btn bg-warning btn-block" id="foc"> FOC </button>
<button type="button" class="btn bg-deep-purple btn-block" id="foc"> FOC </button>
<button type="button" class="btn bg-red btn-block" id="void"> Void </button>
</div>

View File

@@ -130,27 +130,27 @@
</div>
<div class="card-block">
<div class="card-title row">
<div class="card-title row p-l-5 p-r-5">
<div class="col-lg-6 col-md-6 col-sm-6">
<p> Receipt No: <span id="receipt_no">
Receipt No: <span id="receipt_no">
<% if @status_sale == 'sale' %>
<%= @obj_sale.receipt_no rescue '' %>
<% end %>
</span></p>
</span>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
<p>Date: <span id="receipt_date"><%= @obj_sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
Date: <span id="receipt_date"><%= @obj_sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span>
</div>
</div>
<div class="card-title row customer_detail">
<div class="card-title row customer_detail p-l-5 p-r-5">
<div class="col-lg-6 col-md-6 col-sm-6">
<% if @status_sale == 'sale' %>
<p class="hidden customer-id"><%= @obj_sale_sale.customer_id rescue '' %></p>
<p>Customer : <%= @obj_sale_sale.customer.name rescue '-' %></p>
Customer : <%= @obj_sale_sale.customer.name rescue '-' %>
<%else%>
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
<p>Customer : <%= @customer.name rescue "-" %></p>
Customer : <%= @customer.name rescue "-" %>
<%end%>
</div>

View File

@@ -25,7 +25,7 @@
<div class="tab-pane active" id="completed" role="tabpanel" style="max-height:600px; overflow:auto">
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<% @complete.each do |sale| %>
<div class="card sales red text-white" data-id = "<%= sale.sale_id %>">
<div class="card sales bg-red text-white" data-id = "<%= sale.sale_id %>">
<div class="card-block">
<%= sale.receipt_no %><span style="font-size:12px;float:right;line-height:inherit;"><%= sale.sale_status %></span>
</div>
@@ -39,7 +39,7 @@
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<% @tables.each do |table| %>
<% if table.status == 'occupied' %>
<div class="card tables red text-white" data-id="<%= table.id %>">
<div class="card tables bg-red text-white" data-id="<%= table.id %>">
<div class="card-block">
<%= table.name %>
<% if table.get_booking.nil? %>
@@ -50,7 +50,7 @@
</div>
</div>
<% else %>
<div class="card tables green text-white" data-id="<%= table.id %>">
<div class="card tables bg-green text-white" data-id="<%= table.id %>">
<div class="card-block">
<%= table.name %>
</div>
@@ -65,7 +65,7 @@
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<% @rooms.each do |room| %>
<% if room.status == 'occupied' %>
<div class="card rooms red text-white" data-id="<%= room.id %>">
<div class="card rooms bg-red text-white" data-id="<%= room.id %>">
<div class="card-block">
<%= room.name %>
<% if room.get_booking.nil? %>
@@ -76,7 +76,7 @@
</div>
</div>
<% else %>
<div class="card rooms green text-white" data-id="<%= room.id %>">
<div class="card rooms bg-green text-white" data-id="<%= room.id %>">
<div class="card-block">
<%= room.name %>
</div>
@@ -90,7 +90,7 @@
<div class="tab-pane" id="orders" role="tabpanel" style="max-height:600px; overflow:auto">
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<% @orders.each do |order| %>
<div class="card orders red text-white" data-id = "<%= order.order_id %>">
<div class="card orders bg-red text-white" data-id = "<%= order.order_id %>">
<div class="card-block">
<%= order.order_id %>
</div>
@@ -112,20 +112,19 @@
<div><strong id="order-title">INVOICE DETAILS </strong></div>
</div>
<div class="card-block">
<div class="card-title row">
<div class="card-title row p-l-5 p-r-5">
<div class="col-lg-6 col-md-6 col-sm-6">
<p> Receipt No: <span id="receipt_no">
Receipt No: <span id="receipt_no">
<%= @sale.receipt_no rescue '' %>
</span></p>
</span>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
<p>Date: <span id="receipt_date"><%= @sale.created_at.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
Date: <span id="receipt_date"><%= @sale.created_at.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span>
</div>
</div>
<div class="card-title row customer_detail">
<div class="card-title row customer_detail p-l-5 p-r-5">
<div class="col-lg-6 col-md-6 col-sm-6">
<p>Customer : <%= @sale.customer.name rescue "-" %></p>
Customer : <%= @sale.customer.name rescue "-" %>
</div>
@@ -198,9 +197,9 @@
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-default btn-block" id='back'>Back</button>
<% if @sale.sale_status != 'void' %>
<button type="button" id="void" class="btn btn-blue btn-block">VOID</button>
<button type="button" id="void" class="btn bg-danger btn-block">VOID</button>
<% end %>
<button type="button" id="re-print" class="btn btn-blue btn-block">Re.Print</button>
<button type="button" id="re-print" class="btn bg-blue btn-block">Re.Print</button>
</div>
</div>
</div>

View File

@@ -76,11 +76,11 @@
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="row bottom">
<div class="cashier_number long left" data-value="1000" data-type="add">1000</div>
<div class="cashier_number long border-left" data-value="1000" data-type="add">1000</div>
<div class="cashier_number long left" data-value="3000" data-type="add">3000</div>
</div>
<div class="row bottom">
<div class="cashier_number long left" data-value="5000" data-type="add">5000</div>
<div class="cashier_number long border-left" data-value="5000" data-type="add">5000</div>
<div class="cashier_number long left" data-value="10000" data-type="add">10000</div>
</div>
<div class="row bottom">
@@ -92,7 +92,7 @@
</div>
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn bg-default btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"> Back </button>
<button type="button" class="btn bg-default m-l-10 btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment/others_payment';"> Back </button>
</div>
</div>
</div>

View File

@@ -1,41 +1,50 @@
<div class="p-l-15">
<%= form_tag report_path, :method => :get, :id => "frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="">Select Date Range</label>
<% if @daterange %>
<input class="form-control" name="daterange" id="daterange" value="<%= @daterange %>" type="text" placeholder="Date Range" readonly="true">
<% else %>
<input class="form-control" name="daterange" id="daterange" type="text" placeholder="Date Range" readonly="true">
<% end %>
<!-- <div class="col-lg-2 col-md-2 col-sm-2">
<label class="">Select Date Range</label>
<% if @daterange %>
<input class="form-control" name="daterange" id="daterange" value="<%= @daterange %>" type="text" placeholder="Date Range" readonly="true">
<% else %>
<input class="form-control" name="daterange" id="daterange" type="text" placeholder="Date Range" readonly="true">
<% end %>
</div> -->
<div class="col-lg-3 col-md-3 col-sm-3">
<!-- <label class="">Select Shift Period</label> -->
<label class="font-14">From</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<label class="font-14">To</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14">Commissioner</label>
<select class="form-control" name="commissioner" id="commissioner">
<option value=""></option>
<% @commissioner.each do |c| %>
<% if @com_id == c.id %>
<option value="<%= c.id %>" selected><%= c.name %></option>
<% else %>
<option value="<%= c.id %>"><%= c.name %></option>
<% end %> %>
<% end %>
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
<br>
<input type="submit" value="Generate Report" class='btn btn-info wave-effects'>
</div>
<!-- <div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
<input type="button" value="Clear Filter" id="clear_filter" class='btn btn-danger'>
</div> -->
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="">Commissioner</label>
<select class="form-control" name="commissioner" id="commissioner">
<option value=""></option>
<% @commissioner.each do |c| %>
<% if @com_id == c.id %>
<option value="<%= c.id %>" selected><%= c.name %></option>
<% else %>
<option value="<%= c.id %>"><%= c.name %></option>
<% end %> %>
<% end %>
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
<input type="button" value="Clear Filter" id="clear_filter" class='btn btn-danger'>
</div>
</div>
<% end %>
<% end %>
<script type="text/javascript">
</div>
<!-- <script type="text/javascript">
$(document).ready(function () {
@@ -80,3 +89,4 @@
});
</script>
-->

View File

@@ -18,7 +18,7 @@
<!-- <div class="container"> -->
<!-- <div class="row"> -->
<div class="text-right">
<a href="javascript:export_to('<%= reports_commission_index_path %>.xls')" class="btn btn-default">Export to
<a href="javascript:export_to('<%= reports_commission_index_path %>.xls')" class="btn btn-info wave-effects">Export to
Excel</a>
</div>
<!-- </div> -->
@@ -30,7 +30,7 @@
<table class="table table-striped">
<thead>
<tr>
<th colspan="7"> From Date : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - To Date : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %></th>
<th colspan="9"> From Date : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - To Date : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %></th>
</tr>
<tr>
<th>Sale</th>

View File

@@ -1,45 +1,46 @@
<div class="p-l-15">
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<div class="form-group col-md-2">
<label class="font-20">Select Period</label>
<select name="period" id="sel_period" class="form-control">
<option value="">Select Period</option>
<option value="0">Today</option>
<option value="1">Yesterday</option>
<option value="2">This week</option>
<option value="3">Last week</option>
<option value="4">Last 7 days</option>
<option value="5">This month</option>
<option value="6">Last month</option>
<option value="7">Last 30 days</option>
<option value="8">This year</option>
<option value="9">Last year</option>
</select>
</div>
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<div class="form-group col-md-2">
<label>Select Period</label>
<select name="period" id="sel_period" class="form-control">
<option value="">Select Period</option>
<option value="0">Today</option>
<option value="1">Yesterday</option>
<option value="2">This week</option>
<option value="3">Last week</option>
<option value="4">Last 7 days</option>
<option value="5">This month</option>
<option value="6">Last month</option>
<option value="7">Last 30 days</option>
<option value="8">This year</option>
<option value="9">Last year</option>
</select>
</div>
<div class="form-group col-md-2">
<!-- <label class="">Select Shift Period</label> -->
<label class="">From</label>
<input data-behaviour='datepicker' class="form-control" name="from" id="from" type="text" placeholder="From date">
</div>
<div class="form-group col-md-2">
<label class="">To</label>
<input data-behaviour='datepicker' class="form-control" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="form-group col-md-3">
<label class="">All Shift</label>
<select class="form-control select" name="shift_name" id="shift_name" >
</select>
</div>
<div class="form-group col-md-1 margin-top-20">
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div>
<% end %>
<% end %>
<div class="form-group col-md-2">
<!-- <label class="">Select Shift Period</label> -->
<label class="font-20">From</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
</div>
<div class="form-group col-md-2">
<label class="font-20">To</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="form-group col-md-3">
<label class="font-20">All Shift</label>
<select class="form-control select" name="shift_name" id="shift_name" >
</select>
</div>
<div class="form-group col-md-1 ">
<br>
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div>
<% end %>
<% end %>
</div>
<script type="text/javascript">
$(function(){

View File

@@ -1,10 +1,12 @@
<div class="page-header">
<ul class="breadcrumb">
<li><a href="<%= dashboard_path %>">Home</a></li>
<li>Credit Payment List Report</li>
</ul>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item active">Credit Payment Report</li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<!-- <div class="container"> -->
<%= render :partial=>'shift_sale_report_filter',
:locals=>{ :period_type => true, :shift_name => true, :report_path =>reports_credit_payment_index_path} %>
@@ -14,7 +16,7 @@
<!-- <div class="container"> -->
<!-- <div class="row"> -->
<div class="text-right">
<a href="javascript:export_to('<%=reports_credit_payment_index_path%>.xls')" class = "btn btn-default">Export to Excel</a>
<a href="javascript:export_to('<%=reports_credit_payment_index_path%>.xls')" class = "btn btn-info wave-effects">Export to Excel</a>
</div>
<!-- </div> -->
<!-- </div> -->
@@ -32,7 +34,7 @@
<% end %>
<tr>
<th> Shift Name </th>
<th> Receive No</th>
<th> Receipt No</th>
<th> Cashier Name</th>
<th> Customer Name</th>
<th> Credit Amount </th>

View File

@@ -1,9 +1,10 @@
<div class="p-l-15">
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-2">
<label>Select Period</label>
<label class="font-14">Select Period</label>
<select name="period" id="sel_period" class="form-control">
<option value="">Select Period</option>
<option value="0">Today</option>
@@ -22,14 +23,15 @@
<div class="col-lg-3 col-md-3 col-sm-3">
<!-- <label class="">Select Shift Period</label> -->
<label class="">From</label>
<label class="font-14">From</label>
<input data-behaviour='datepicker' class="form-control datepicker" name="from" id="from" type="text" placeholder="From date">
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<label class="">To</label>
<label class="font-14">To</label>
<input data-behaviour='datepicker' class="form-control datepicker" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
<label></label><br>
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div>
@@ -84,7 +86,8 @@
</div>
</div>
<% end %>
<% end %>
</div>
<script type="text/javascript">
$(function(){

View File

@@ -1,33 +1,22 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item active">Daily Sale Report</li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item active">Daily Sale Report</li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-12 col-lg-12 col-sm-12 ">
<!-- <div class="row">
<div class="col-md-12 col-lg-12"> -->
<!-- <div class="container"> -->
<%= render :partial=>'shift_sale_report_filter',
:locals=>{ :period_type => true, :shift_name => false, :report_path =>reports_dailysale_index_path} %>
<hr />
<!-- </div> -->
<!-- </div>
</div> -->
<!-- <div class="row"> -->
<!-- <div class="container"> -->
<div class=" text-right">
<a href="javascript:export_to('<%=reports_dailysale_index_path%>.xls')" class = "btn btn-default">Export to Excel</a>
</div>
<!-- </div> -->
<!-- </div> -->
<%= render :partial=>'shift_sale_report_filter',
:locals=>{ :period_type => true, :shift_name => false, :report_path =>reports_dailysale_index_path} %>
<hr />
<div class=" text-right">
<a href="javascript:export_to('<%=reports_dailysale_index_path%>.xls')" class = "btn btn-info wave-effects">Export to Excel</a>
</div>
<div class="row">
<div class="col-md-12 col-lg-12">

View File

@@ -1,50 +1,52 @@
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<div class="p-l-15">
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-2">
<label>Select Period</label>
<select name="period" id="sel_period" class="form-control">
<option value="">Select Period</option>
<option value="0">Today</option>
<option value="1">Yesterday</option>
<option value="2">This week</option>
<option value="3">Last week</option>
<option value="4">Last 7 days</option>
<option value="5">This month</option>
<option value="6">Last month</option>
<option value="7">Last 30 days</option>
<option value="8">This year</option>
<option value="9">Last year</option>
</select>
</div>
<% if defined? payments %>
<div class="col-lg-2 col-md-2 col-sm-2">
<label>Select Payments</label>
<%= select_tag "payment_type", options_for_select(@payments, :selected => params[:payment_type]), :class => "form-control" %>
</div>
<% end %>
<div class="col-lg-2 col-md-2 col-sm-2">
<!-- <label class="">Select Shift Period</label> -->
<label class="">From</label>
<input data-behaviour='datepicker' class="form-control datepicker" name="from" id="from" type="text" placeholder="From date">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="">To</label>
<input data-behaviour='datepicker' class="form-control datepicker" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="">All Shift</label>
<select class="form-control select" name="shift_name" id="shift_name" >
</select>
</div>
<div class="col-lg-1 col-md-1 col-sm-1 margin-top-20">
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14">Select Period</label>
<select name="period" id="sel_period" class="form-control">
<option value="">Select Period</option>
<option value="0">Today</option>
<option value="1">Yesterday</option>
<option value="2">This week</option>
<option value="3">Last week</option>
<option value="4">Last 7 days</option>
<option value="5">This month</option>
<option value="6">Last month</option>
<option value="7">Last 30 days</option>
<option value="8">This year</option>
<option value="9">Last year</option>
</select>
</div>
<% if defined? payments %>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14">Select Payments</label>
<%= select_tag "payment_type", options_for_select(@payments, :selected => params[:payment_type]), :class => "form-control" %>
</div>
<% end %>
<div class="col-lg-2 col-md-2 col-sm-2">
<!-- <label class="">Select Shift Period</label> -->
<label class="font-14">From</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14">To</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14">All Shift</label>
<select class="form-control select" name="shift_name" id="shift_name" >
</select>
</div>
<div class="col-lg-1 col-md-1 col-sm-1 margin-top-20">
<br>
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div>
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div>
<% end %>
<% end %>
<% end %>
</div>
<script type="text/javascript">
$(function(){

View File

@@ -19,7 +19,7 @@
<!-- <div class="container"> -->
<!-- <div class="row"> -->
<div class="text-right">
<a href="javascript:export_to('<%=reports_receipt_no_index_path%>.xls')" class = "btn btn-default">Export to Excel</a>
<a href="javascript:export_to('<%=reports_receipt_no_index_path%>.xls')" class = "btn btn-info wave-effects">Export to Excel</a>
</div>
<!-- </div> -->
<!-- </div> -->
@@ -30,14 +30,14 @@
<thead>
<tr>
<th colspan="7"> From Date : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - To Date : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%></th>
<th colspan="9"> From Date : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - To Date : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%></th>
</tr>
<% if @shift_from %>
<tr>
<% if @shift_data.employee %>
<% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %>
<% end %>
<th colspan="7">Shift Name = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
<th colspan="9">Shift Name = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
</tr>
<% end %>

View File

@@ -1,130 +1,120 @@
<div class="p-l-15">
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14">Select Period</label>
<select name="period" id="sel_period" class="form-control">
<option value="">Select Period</option>
<option value="0">Today</option>
<option value="1">Yesterday</option>
<option value="2">This week</option>
<option value="3">Last week</option>
<option value="4">Last 7 days</option>
<option value="5">This month</option>
<option value="6">Last month</option>
<option value="7">Last 30 days</option>
<option value="8">This year</option>
<option value="9">Last year</option>
</select>
</div>
<!-- <input type="hidden" name="report_type" value="sale_item" id="sel_sale_type"> -->
<div class="col-lg-3 col-md-3 col-sm-3">
<!-- <label class="">Select Shift Period</label> -->
<label class="font-14">From</label>
<input data-behaviour='datepicker' class="form-control m-t-3 datepicker" name="from" id="from" type="text" placeholder="From date">
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<label class="font-14">To</label>
<input data-behaviour='datepicker' class="form-control m-t-3 datepicker" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14">All Shift</label>
<select class="form-control select" name="shift_name" id="shift_name" >
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
<br>
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div>
<% end %>
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-2">
<label>Select Period</label>
<select name="period" id="sel_period" class="form-control">
<option value="">Select Period</option>
<option value="0">Today</option>
<option value="1">Yesterday</option>
<option value="2">This week</option>
<option value="3">Last week</option>
<option value="4">Last 7 days</option>
<option value="5">This month</option>
<option value="6">Last month</option>
<option value="7">Last 30 days</option>
<option value="8">This year</option>
<option value="9">Last year</option>
</select>
</div>
<!-- <input type="hidden" name="report_type" value="sale_item" id="sel_sale_type"> -->
<!-- <div class="form-group col-md-2">
<label>Select Type</label>
<select name="sale_type" id="sel_sale_type" class="form-control">
<option value="0">All Sale Type</option>
<option value="1">Revenue Only</option>
<option value="2">Discount Only</option>
<option value="3">Void Only</option>
<option value="4">Taxes Only</option>
<option value="5">Other Amount Only</option>
</select>
</div> -->
<div class="col-lg-3 col-md-3 col-sm-3">
<!-- <label class="">Select Shift Period</label> -->
<label class="">From</label>
<input data-behaviour='datepicker' class="form-control" name="from" id="from" type="text" placeholder="From date">
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<label class="">To</label>
<input data-behaviour='datepicker' class="form-control" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="">All Shift</label>
<select class="form-control select" name="shift_name" id="shift_name" >
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
<br>
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div>
<% end %>
<% end %>
<% end %>
</div>
<script type="text/javascript">
$(function(){
$('#custom_excel').hide();
$('#custom_excel').click(function(){
var url = $('#custom_excel').attr('data-url');
$('#frm_report').attr('action',url)
$('#frm_report').submit();
$(function(){
$('#custom_excel').hide();
$('#custom_excel').click(function(){
var url = $('#custom_excel').attr('data-url');
$('#frm_report').attr('action',url)
$('#frm_report').submit();
// window.location = url;
});
var item = $('#item').val();
var payment_type = $('#payment_type');
if(item == 'order'){
$('#cashier').hide();
$('#waiter').show();
if(payment_type){
$('#payment_type').hide();
}
}
else if(item == 'sale'){
$('#waiter').hide();
$('#cashier').show();
}
else{
$('#waiter').hide();
$('#cashier').show();
$("#item").val('sale');
}
});
<% if params[:shift_name].to_i > 0%>
var item = $('#item').val();
var payment_type = $('#payment_type');
if(item == 'order'){
$('#cashier').hide();
$('#waiter').show();
if(payment_type){
$('#payment_type').hide();
}
}
else if(item == 'sale'){
$('#waiter').hide();
$('#cashier').show();
}
else{
$('#waiter').hide();
$('#cashier').show();
$("#item").val('sale');
}
});
<% if params[:shift_name].to_i > 0%>
shift_id = '<%= params[:shift_name] %>'
local_date = '<%= @shift_from %> - <%= @shift_to %> '
var shift = $('#shift_name');
str = '<option value="'+ shift_id +'" '+ 'selected = "selected"' +'>' + local_date + '</option>';
shift.append(str);
<% end %>
<% end %>
$("#from").val("<%=params[:from] rescue '-'%>");
$("#to").val("<%=params[:to] rescue '-'%>");
$("#sel_period").val(<%=params[:period] rescue '-'%>);
$("#sel_sale_type").val(<%=params[:sale_type] rescue '-'%>);
$("#from").val("<%=params[:from] rescue '-'%>");
$("#to").val("<%=params[:to] rescue '-'%>");
$("#sel_period").val(<%=params[:period] rescue '-'%>);
$("#sel_sale_type").val(<%=params[:sale_type] rescue '-'%>);
<% if params[:period_type] == 1 || params[:period_type] == "1" %>
<% if params[:period_type] == 1 || params[:period_type] == "1" %>
$("#rd_period_type_1").attr("checked","checked");
<% else %>
<% else %>
$("#rd_period_type_0").attr("checked","checked");
<% end %>
$(".btn-group button").removeClass("active");
<% report_type = params[:report_type].blank? ? "0" : params[:report_type] %>
$("#btn_report_type_<%= report_type %>").addClass("active");
<% end %>
$(".btn-group button").removeClass("active");
<% report_type = params[:report_type].blank? ? "0" : params[:report_type] %>
$("#btn_report_type_<%= report_type %>").addClass("active");
$('#item').change(function(){
var item = $('#item').val();
var payment_type = $('#payment_type');
$('#item').change(function(){
var item = $('#item').val();
var payment_type = $('#payment_type');
if(item == 'sale'){
$('#waiter').hide();
$('#cashier').show();
if(payment_type){
$('#payment_type').show();
if(item == 'sale'){
$('#waiter').hide();
$('#cashier').show();
if(payment_type){
$('#payment_type').show();
}
}
}
else{
$('#cashier').hide();
$('#waiter').show();
if(payment_type){
$('#payment_type').hide();
else{
$('#cashier').hide();
$('#waiter').show();
if(payment_type){
$('#payment_type').hide();
}
}
}
});
});
</script>

View File

@@ -20,7 +20,7 @@
<!-- <div class="container"> -->
<!-- <div class="row"> -->
<div class="text-right">
<a href="javascript:export_to('<%=reports_saleitem_index_path%>.xls')" class = "btn btn-default">Export to Excel</a>
<a href="javascript:export_to('<%=reports_saleitem_index_path%>.xls')" class = "btn btn-info wave-effects ">Export to Excel</a>
</div>
<!-- </div> -->
<!-- </div> -->

View File

@@ -1,44 +1,44 @@
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-2">
<label>Select Period</label>
<select name="period" id="sel_period" class="form-control">
<option value="0">Today</option>
<option value="1">Yesterday</option>
<option value="2">This week</option>
<option value="3">Last week</option>
<option value="4">Last 7 days</option>
<option value="5">This month</option>
<option value="6">Last month</option>
<option value="7">Last 30 days</option>
<option value="8">This year</option>
<option value="9">Last year</option>
</select>
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<!-- <label class="">Select Shift Period</label> -->
<label class="">From</label>
<input data-behaviour='datepicker' class="form-control datepicker" name="from" id="from" type="text" placeholder="From date">
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<label class="">To</label>
<input data-behaviour='datepicker' class="form-control datepicker" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="">All Shift</label>
<select class="form-control select" name="shift_name" id="shift_name" >
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20"><br>
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div>
<div class="p-l-15">
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14">Select Period</label>
<select name="period" id="sel_period" class="form-control">
<option value="0">Today</option>
<option value="1">Yesterday</option>
<option value="2">This week</option>
<option value="3">Last week</option>
<option value="4">Last 7 days</option>
<option value="5">This month</option>
<option value="6">Last month</option>
<option value="7">Last 30 days</option>
<option value="8">This year</option>
<option value="9">Last year</option>
</select>
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<!-- <label class="font-14">Select Shift Period</label> -->
<label class="font-14">From</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<label class="font-14">To</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14">All Shift</label>
<select class="form-control select" name="shift_name" id="shift_name" >
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20"><br>
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div>
<% end %>
<% end %>
<% end %>
</div>
<script type="text/javascript">

View File

@@ -19,7 +19,7 @@
<!-- <div class="container"> -->
<!-- <div class="row"> -->
<div class="text-right">
<a href="javascript:export_to('<%=reports_shiftsale_index_path%>.xls')" class = "btn btn-default">Export to Excel</a>
<a href="javascript:export_to('<%=reports_shiftsale_index_path%>.xls')" class = "btn btn-info wave-effects">Export to Excel</a>
</div>
<!-- </div> -->
<!-- </div> -->

View File

@@ -1,86 +1,95 @@
<div class="p-l-15">
<%= form_tag report_path, :method => :get, :id => "frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<% if period_type != false %>
<div class="row">
<div class="form-group col-md-3">
<!-- <div class="form-group col-md-3">
<label class="">Select Date Range</label>
<% if @daterange %>
<input class="form-control" name="daterange" id="daterange" value="<%= @daterange %>" type="text" placeholder="Date Range" readonly="true">
<% else %>
<input class="form-control" name="daterange" id="daterange" type="text" placeholder="Date Range" readonly="true">
<% end %>
</div>
<div class="form-group col-md-4">
<label class="">Definition Item</label>
</div> -->
<div class="col-lg-3 col-md-3 col-sm-3">
<!-- <label class="">Select Shift Period</label> -->
<label class="font-14">From</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<label class="font-14">To</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="form-group col-md-4">
<label class="font-14">Definition Item</label>
<select class="form-control" name="item_code" id="item_code">
<option value="">Select Product</option>
<% @inventory_definitions.each do |id| %>
<option value="<%= id.item_code %>">
<% menu_item = MenuItemInstance.find_by_item_instance_code(id.item_code) %>
<% if menu_item.nil? %>
<%= Product.find_by_item_code(id.item_code).name rescue "-" %>
<% else %>
<%= menu_item.menu_item.name rescue '-' %> - <%= menu_item.item_instance_name rescue '-' %>
<% end %>
</option>
<% end %>
</select>
</div>
<div class="form-group col-md-2 margin-top-20">
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
<div class="form-group col-md-2 margin-top-20">
<option value="<%= id.item_code %>">
<% menu_item = MenuItemInstance.find_by_item_instance_code(id.item_code) %>
<% if menu_item.nil? %>
<%= Product.find_by_item_code(id.item_code).name rescue "-" %>
<% else %>
<%= menu_item.menu_item.name rescue '-' %> - <%= menu_item.item_instance_name rescue '-' %>
<% end %>
</option>
<% end %>
</select>
</div>
<div class="form-group col-md-2 margin-top-20"><br>
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
<!-- <div class="form-group col-md-2 margin-top-20">
<input type="button" value="Clear Filter" id="clear_filter" class='btn btn-danger'>
</div>
</div>
</div> -->
</div>
<% end %>
<% end %>
<% end %>
</div>
<script type="text/javascript">
$(document).ready(function () {
$('#item_code').select2({
/* $('#item_code').select2({
placeholder: 'Select Product',
allowClear: true
});
});*/
$('#clear_filter').click(function () {
$('#daterange').val('');
$('#item_code').val('').text('');
});
// $('#clear_filter').click(function () {
// $('#daterange').val('');
// $('#item_code').val('').text('');
// });
$('input[name="daterange"]').daterangepicker({
autoUpdateInput: false,
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
},
locale: {
format: 'YYYY-MM-DD'
}
},
function (start, end, label) {
$('input[name="daterange"]').val(start.format('YYYY-MM-DD') + ' - ' + end.format('YYYY-MM-DD'));
});
// $('input[name="daterange"]').daterangepicker({
// autoUpdateInput: false,
// ranges: {
// 'Today': [moment(), moment()],
// 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
// 'Last 7 Days': [moment().subtract(6, 'days'), moment()],
// 'Last 30 Days': [moment().subtract(29, 'days'), moment()],
// 'This Month': [moment().startOf('month'), moment().endOf('month')],
// 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
// },
// locale: {
// format: 'YYYY-MM-DD'
// }
// },
// function (start, end, label) {
// $('input[name="daterange"]').val(start.format('YYYY-MM-DD') + ' - ' + end.format('YYYY-MM-DD'));
// });
$('input[name="daterange"]').on('apply.daterangepicker', function (ev, picker) {
$('input[name="daterange"]').val(picker.startDate.format('YYYY-MM-DD') + ' - ' + picker.endDate.format('YYYY-MM-DD'));
// $('input[name="daterange"]').on('apply.daterangepicker', function (ev, picker) {
// $('input[name="daterange"]').val(picker.startDate.format('YYYY-MM-DD') + ' - ' + picker.endDate.format('YYYY-MM-DD'));
from_date = picker.startDate.format('YYYY-MM-DD 00:00:00');
to_date = picker.endDate.format('YYYY-MM-DD 23:59:59');
});
// from_date = picker.startDate.format('YYYY-MM-DD 00:00:00');
// to_date = picker.endDate.format('YYYY-MM-DD 23:59:59');
// });
$('input[name="daterange"]').on('cancel.daterangepicker', function (ev, picker) {
$('input[name="daterange"]').val('');
});
// $('input[name="daterange"]').on('cancel.daterangepicker', function (ev, picker) {
// $('input[name="daterange"]').val('');
// });
});

View File

@@ -19,7 +19,7 @@
<!-- <div class="container"> -->
<!-- <div class="row"> -->
<div class="text-right">
<a href="javascript:export_to('<%= reports_stock_check_index_path %>.xls')" class="btn btn-default">Export to
<a href="javascript:export_to('<%= reports_stock_check_index_path %>.xls')" class="btn btn-info wave-effects">Export to
Excel</a>
</div>
<!-- </div> -->

View File

@@ -1,9 +1,9 @@
<div class="p-l-15">
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-2">
<label>Select Period</label>
<div class="form-group col-lg-2 col-md-2 col-sm-2">
<label class="font-20">Select Period</label>
<select name="period" id="sel_period" class="form-control">
<option value="">Select Period</option>
<option value="0">Today</option>
@@ -19,27 +19,28 @@
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<div class="form-group col-lg-2 col-md-2 col-sm-2">
<!-- <label class="">Select Shift Period</label> -->
<label class="">From</label>
<input data-behaviour='datepicker' class="form-control datepicker" name="from" id="from" type="text" placeholder="From date">
<label class="font-20">From</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="">To</label>
<input data-behaviour='datepicker' class="form-control datepicker" name="to" id="to" type="text" placeholder="To date">
<div class="form-group col-lg-2 col-md-2 col-sm-2">
<label class="font-20">To</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<label class="">All Shift</label>
<div class="form-group col-lg-3 col-md-3 col-sm-3">
<label class="font-20">All Shift</label>
<select class="form-control select" name="shift_name" id="shift_name" >
</select>
</div>
<div class="col-lg-1 col-md-1 col-sm-1 margin-top-20">
<div class=" col-lg-1 col-md-1 col-sm-1 margin-top-20">
<br>
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div>
<% end %>
<% end %>
</div>
<script type="text/javascript">
$(function(){
$('#custom_excel').hide();

View File

@@ -1,7 +1,8 @@
<%= simple_form_for([:settings,@settings_account]) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<%= simple_form_for([:settings,@settings_account]) do |f| %>
<%= f.error_notification %>
<div class="form-inputs p-l-10">
<%= f.input :title %>
<%= f.input :account_type, :collection => Lookup.collection_of("account_type") %>
<%= f.input :discount %>
@@ -9,9 +10,19 @@
<%= f.input :bonus %>
<%= f.input :rebate %>
</div>
<div class="form-actions">
<%= f.submit "Create Account",:class => 'btn btn-primary btn-lg waves-effect' %>
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div>
<% end %>
<% end %>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
</div>
</div>
</div>
</div>

View File

@@ -1,20 +1,10 @@
<!-- <div class="span12">
<div class="page-header">
<ul class="breadcrumb">
<li><a href="<%= root_path %>">Home</a></li>
<li><a href="<%= settings_accounts_path %>">Account</a></li>
<li>Edit</li>
</ul>
</div>
<%= render 'form', settings_account: @settings_account %>
</div> -->
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>">Account</a></li>
<li class="breadcrumb-item active">Edit</li>
<span class="float-right">
<%= link_to t('.new', :default => t("views.btn.new")), settings_accounts_path %>
<%= link_to t('.back', :default => t("views.btn.back")), settings_accounts_path %>
</span>
</ol>
</div>

View File

@@ -4,7 +4,7 @@
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>">Account</a></li>
<li class="breadcrumb-item active">New</li>
<span class="float-right">
<%= link_to t('.new', :default => t("views.btn.new")), settings_accounts_path %>
<%= link_to t('.back', :default => t("views.btn.back")), settings_accounts_path %>
</span>
</ol>
</div>

View File

@@ -36,7 +36,7 @@
<!-- <td><%= @settings_account.bonus %></td> -->
<td><%= @settings_account.rebate %></td>
<td><%= link_to t("views.btn.edit"), edit_settings_account_path(@settings_account, @settings_account),:class => 'btn btn-primary btn-lg waves-effect' %>
<td><%= link_to t("views.btn.edit"), edit_settings_account_path(@settings_account),:class => 'btn btn-primary btn-sm waves-effect' %>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_account_path(@settings_account)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>

View File

@@ -3,7 +3,7 @@
<%= simple_form_for([:settings, @settings_cashier_terminal]) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<div class="form-inputs p-l-10">
<%= f.input :name %>
<%= f.input :is_active %>
<%= f.input :is_currently_login %>
@@ -19,7 +19,7 @@
</div>
<div class="form-actions">
<%= f.submit "Create Cashier Terminal",:class => 'btn btn-primary btn-lg waves-effect' %>
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div>
<% end %>
</div>

View File

@@ -1,7 +1,7 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= settings_cashier_terminal_path %>">Cashier Terminals</a></li>
<li class="breadcrumb-item"><a href="<%= settings_cashier_terminals_path %>">Cashier Terminals</a></li>
<li class="breadcrumb-item active">Details</li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_cashier_terminal_path %>

View File

@@ -37,7 +37,7 @@
</div>
</div>
</div>
<script type="text/javascript">
<!-- <script type="text/javascript">
$(document).ready(function () {
$('#joined_date').datepicker({
@@ -51,4 +51,4 @@
});
});
</script>
</script> -->

View File

@@ -1,14 +1,4 @@
<!-- <div class="span12">
<div class="page-header">
<ul class="breadcrumb">
<li><a href="<%= settings_commissioners_path %>">Home</a></li>
<li><a href="<%= settings_commissioners_path %>">Commissioners</a></li>
<li>Edit</li>
</ul>
</div>
<%= render 'form', commissioner: @commissioner %>
</div>
-->
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>

View File

@@ -1,18 +1,34 @@
<div class="col-md-3">
<%= simple_form_for([:settings,@commission]) do |f| %>
<%= f.error_notification %>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="p-l-15">
<div class="form-inputs">
<%= f.label :product_code, 'Product' %>
<%= f.collection_select :product_code, @products, :id, :name, {prompt: 'Select a Product'}, {class: 'form-control'} %><br/>
<%= f.input :commission_type, :collection => ['Percentage','Net Amount'], prompt: 'Select Commission Type', class: 'form-control' %>
<%= f.input :amount %>
<label><%= f.check_box :is_active %> Active </label>
<%= simple_form_for([:settings,@commission]) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<%= f.label :product_code, 'Product' %>
<%= f.collection_select :product_code, @products, :id, :name, {prompt: 'Select a Product'}, {class: 'form-control'} %><br/>
<%= f.input :commission_type, :collection => ['Percentage','Net Amount'], prompt: 'Select Commission Type', class: 'form-control' %>
<%= f.input :amount %>
<label><%= f.check_box :is_active %> Active </label>
</div><br>
<div class="form-actions">
<%= f.submit 'Submit', class: 'btn btn-primary wave-effects' %>
</div>
<% end %>
</div><br>
<div class="form-actions">
<%= link_to t('.new', :default => t("views.btn.new")), settings_commissions_path, class: 'btn btn-success' %>
<%= f.button :submit, class: 'btn btn-info' %>
</div>
<% end %>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
</div>
</div>
</div>
</div>

View File

@@ -1,10 +1,11 @@
<div class="span12">
<div class="page-header">
<ul class="breadcrumb">
<li><a href="<%= settings_commissions_path %>">Home</a></li>
<li><a href="<%= settings_commissions_path %>">Commissions</a></li>
<li>Edit</li>
</ul>
</div>
<%= render 'form', commission: @commission %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= settings_commissions_path %>">Commission</a></li>
<li class="breadcrumb-item active">Edit</li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_commissions_path %>
</span>
</ol>
</div>
<%= render 'form', commission: @commission %>

View File

@@ -1,10 +1,11 @@
<div class="span12">
<div class="page-header">
<ul class="breadcrumb">
<li><a href="<%= settings_commissions_path %>">Home</a></li>
<li><a href="<%= settings_commissions_path %>">Commissions</a></li>
<li>New</li>
</ul>
</div>
<%= render 'form', commission: @commission %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= settings_commissions_path %>">Commission</a></li>
<li class="breadcrumb-item active">New</li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_commissions_path %>
</span>
</ol>
</div>
<%= render 'form', commission: @commission %>

View File

@@ -1,7 +1,7 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= settings_commissions_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= settings_commissions_path %>">Commissioner</a></li>
<li class="breadcrumb-item"><a href="<%= settings_commissions_path %>">Commission</a></li>
<li class="breadcrumb-item active">Details</li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_commissioners_path %>
@@ -9,25 +9,27 @@
</ol>
</div>
<div class="card">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="card-block">
<h4 class="card-title">Commission</h4>
<table class="table">
<tbody>
<tr>
<td style="width:20%">Product Name</td>
<th style="width:20%">Product Name</th>
<td><%= @commission.menu_item.name rescue '-' %></td>
</tr>
<tr>
<td style="width:20%">Amount</td>
<th style="width:20%">Amount</th>
<td><%= @commission.amount %></td>
</tr>
<tr>
<td style="width:20%">Commission Type</td>
<th style="width:20%">Commission Type</th>
<td><%= @commission.commission_type %></td>
</tr>
<tr>
<td style="width:20%">Active</td>
<th style="width:20%">Active</th>
<td><%= @commission.is_active %></td>
</tr>
<tr>
@@ -47,5 +49,16 @@
</table>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
</div>
</div>
</div>
</div>

View File

@@ -1,9 +1,9 @@
<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-8 col-lg-8">
<%= simple_form_for([:settings,@zone,@settings_dining_facility,@dining_charge]) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<div class="form-inputs p-l-15">
<%= f.input :item_code, :input_html => { :id => 'item_code' } %>
<%= f.input :unit_price, :input_html => { :id => 'unit_price'} %>
<%= f.input :taxable %>
@@ -20,7 +20,7 @@
</div>
<% end %>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>

View File

@@ -1,22 +1,4 @@
<!-- <h1>Editing Dining Charge</h1>
<%= render 'form', dining_charge: @dining_charge %>-->
<!-- <div class="span12">
<div class="page-header">
<ul class="breadcrumb">
<li><a href="<%= root_path %>">Home</a></li>
<li><a href="<%= settings_zone_path(@zone) %>">Zone</a></li>
<% if @table %>
<li><a href="<%= edit_settings_zone_table_path(@zone,@settings_dining_facility) %>">Table / Room</a></li>
<% elsif @room %>
<li><a href="<%= edit_settings_zone_room_path(@zone,@settings_dining_facility) %>">Table / Room</a></li>
<% end %>
<li>New</li>
</ul>
</div>
<%= render 'form', dining_charge: @dining_charge %>
</div> -->
<div class="page-header">
<ol class="breadcrumb">

View File

@@ -1,9 +1,9 @@
<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-8 col-lg-8">
<%= simple_form_for([:settings,@employee]) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<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)" %>
@@ -11,12 +11,12 @@
</div>
<div class="form-actions">
<div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div>
<% end %>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

View File

@@ -19,43 +19,63 @@
</div>
<br>
<div class="card">
<div class="card-block">
<h4 class="card-title">Employee</h4>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Role</th>
<th>Created At</th>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="card-block">
<h4 class="card-title">Employee</h4>
<table class="table">
<tbody>
<tr>
<th>Name</th>
<td><%= @employee.name %></td>
</tr>
<tr>
<th>Role</th>
<td><%= @employee.role %></td>
</tr>
<tr>
<th>Created At</th>
<td><%= @employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
</tr>
<tr>
<th>Updated At</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td><%= @employee.name %></td>
<td><%= @employee.role %></td>
<td><%= @employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
<td><%= @employee.updated_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
</tr>
<tr>
<th></th>
<td>
<%= link_to t("views.btn.edit"), edit_settings_employee_path(@employee),:class => 'btn btn-primary btn-lg waves-effect' %>
<%if @employee.role != "administrator"%>
<%= link_to t("views.btn.edit"), edit_settings_employee_path(@employee),:class => 'btn btn-primary btn-lg waves-effect' %>
<%if @employee.role != "administrator"%>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_employee_path(@employee)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_employee_path(@employee)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
</span>
<%end%>
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
</span>
<%end%>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
</div>
</div>
</div>
</div>

View File

@@ -1,23 +1,23 @@
<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-8 col-lg-8">
<%= simple_form_for([:settings,@settings_item_set]) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<div class="form-inputs p-l-15">
<%= f.input :name %>
<%= f.input :alt_name %>
<%= f.input :min_selectable_qty,input_html: {value: f.object.min_selectable_qty || '0'} %>
<%= f.input :max_selectable_qty,input_html: {value: f.object.max_selectable_qty || '0'} %>
</div>
<div class="form-actions">
<div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div>
<% end %>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

View File

@@ -11,7 +11,19 @@
<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-2 col-lg-2">
<div class="card">
<ul class="list-group">
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
<li class="list-group-item"><%= link_to 'Items Attributes', settings_menu_item_attributes_path %></li>
<li class="list-group-item"><%= link_to 'Items Options', settings_menu_item_options_path %></li>
</ul>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
<div class="m-b-10 clearfix">
<%= link_to t("views.btn.new"),new_settings_item_set_path,:class => 'btn btn-primary btn-lg float-right waves-effect"' %>
</div>

View File

@@ -9,43 +9,60 @@
</span>
</ol>
</div>
<br>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="card-block">
<table class="table">
<div class="col-md-6">
<table class="table">
<tbody>
<tr>
<td><strong>Name:</strong></td>
<td><%= @settings_item_set.name %></td>
</tr>
<tr>
<td><strong>Alt Name:</strong></td>
<td><%= @settings_item_set.alt_name %></td>
</tr>
<tr>
<td><strong>Min selectable qty:</strong></td>
<td> <%= @settings_item_set.min_selectable_qty %></td>
</tr>
<tr>
<td><strong>Max selectable qty:</strong></td>
<td><%= @settings_item_set.max_selectable_qty %></td>
</tr>
<tr>
<td></td>
<td><%= link_to t("views.btn.edit"), edit_settings_item_set_path(@settings_item_set),:class=>'btn btn-sm btn-primary waves-effect' %>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_item_set_path(@settings_item_set)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>
<tbody>
<tr>
<td><strong>Name:</strong></td>
<td><%= @settings_item_set.name %></td>
</tr>
<tr>
<td><strong>Alt Name:</strong></td>
<td><%= @settings_item_set.alt_name %></td>
</tr>
<tr>
<td><strong>Min selectable qty:</strong></td>
<td> <%= @settings_item_set.min_selectable_qty %></td>
</tr>
<tr>
<td><strong>Max selectable qty:</strong></td>
<td><%= @settings_item_set.max_selectable_qty %></td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" align="right">
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_item_set_path(@settings_item_set)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
</span>
</div>
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
</div>
</div>
</div>
</div>

View File

@@ -1,22 +1,22 @@
<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-8 col-lg-8">
<%= simple_form_for([:settings,@settings_lookup]) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<div class="form-inputs p-l-15">
<%= f.input :lookup_type %>
<%= f.input :name %>
<%= f.input :value %>
</div>
<div class="form-actions">
<div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div>
<% end %>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

View File

@@ -34,14 +34,14 @@
<!-- <td><%= link_to t("views.btn.show"), settings_lookup_path(settings_lookup),:class => 'btn btn-info btn-sm waves-effect' %></td> -->
<td>
<%= link_to t("views.btn.edit"), edit_settings_lookup_path(settings_lookup),:class => 'btn btn-primary btn-sm waves-effect' %>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_lookup_path(settings_lookup)%>" data-method="delete">
<!-- <button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_lookup_path(settings_lookup)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
</span>
</span> -->
</td>
</tr>

View File

@@ -25,7 +25,18 @@
<td><strong>Value:</strong></td>
<td> <%= @settings_lookup.value %></td>
</tr>
<tr>
<td></td>
<td><%= link_to t("views.btn.edit"), edit_settings_lookup_path(settings_lookup),:class => 'btn btn-primary btn-sm waves-effect' %>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_lookup_path(settings_lookup)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
</span></td>
</tr>
</tbody>
</table>
</div>

View File

@@ -1,10 +1,10 @@
<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-8 col-lg-8">
<%= simple_form_for([:settings,@settings_membership_action]) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<div class="form-inputs p-l-15">
<%= f.input :membership_type %>
<%= f.input :is_active %>
<%= f.input :gateway_communication_type %>
@@ -14,12 +14,12 @@
<%= f.input :created_by %>
</div>
<div class="form-actions">
<div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div>
<% end %>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

View File

@@ -46,7 +46,8 @@
<td><%= @settings_membership_action.additional_parameter %></td>
</tr>
<tr>
<td colspan="2" align="right">
<td></td>
<td colspan="" align="">
<%= link_to t("views.btn.edit"), edit_settings_membership_action_path(@settings_membership_action),:class => 'btn btn-primary btn-sm waves-effect' %>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_membership_action_path(@settings_membership_action)%>" data-method="delete" disabled>
<%= t("views.btn.delete") %>

View File

@@ -1,10 +1,10 @@
<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-8 col-lg-8">
<%= simple_form_for([:settings, @settings_membership_setting]) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<div class="form-inputs p-l-15">
<%= f.input :membership_type %>
<%= f.input :is_active %>
<%= f.input :gateway_communication_type %>
@@ -16,12 +16,12 @@
<label><%= f.check_box :point %>Points</label>
</div>
<div class="form-actions">
<div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div>
<% end %>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

View File

@@ -1,9 +1,9 @@
<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-8 col-lg-8">
<%= simple_form_for([:settings, @settings_menu_category]) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<div class="form-inputs p-l-15">
<%= f.input :menu_id, as: :hidden %>
<%= f.input :code, label: "Category Code" %>
<%= f.input :name %>
@@ -13,12 +13,12 @@
<%= f.association :parent %>
</div>
<div class="form-actions">
<div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div>
<% end %>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>

View File

@@ -11,11 +11,12 @@
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
<div class="card">
<ul class="list-group">
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Simple Menu', dashboard_path %></li>
<li class="list-group-item"><%= link_to 'Set Menu', dashboard_path %></li> -->
<li class="list-group-item"><%= link_to 'Items Attributes', settings_menu_item_attributes_path %></li>
<li class="list-group-item"><%= link_to 'Items Options', settings_menu_item_options_path %></li>
</ul>
</div>
</div>
@@ -43,8 +44,8 @@
<td><%= settings_menu_category.is_available rescue false%></td>
<td><%= settings_menu_category.order_by rescue ''%></td>
<td><%= settings_menu_category.parent.name rescue ''%></td>
<td><%= link_to t("views.btn.edit"), edit_settings_menu_category_path(settings_menu_category),:class => 'btn btn-info btn-lg waves-effect' %>
</td>
<td><%= link_to t("views.btn.edit"), edit_settings_menu_category_path(settings_menu_category),:class => 'btn btn-info btn-sm waves-effect' %>
</td></td>
</tr>
<% end %>
</tbody>

View File

@@ -12,13 +12,14 @@
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
<div class="card">
<ul class="list-group">
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Simple Menu', dashboard_path %></li>
<li class="list-group-item"><%= link_to 'Set Menu', dashboard_path %></li> -->
</ul>
<ul class="list-group">
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
<li class="list-group-item"><%= link_to 'Items Attributes', settings_menu_item_attributes_path %></li>
<li class="list-group-item"><%= link_to 'Items Options', settings_menu_item_options_path %></li>
</ul>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
@@ -31,8 +32,8 @@
<th>Menu</th>
<th>Name</th>
<th>Alt name</th>
<th>Is Available</th>
<th>Order by</th>
<th>Available</th>
<!-- <th>Order by</th> -->
<th>Created At</th>
<th>Actions</th>
</tr>
@@ -44,10 +45,10 @@
<td><%= @settings_menu_category.name rescue "-" %></td>
<td><%= @settings_menu_category.alt_name %></td>
<td><%= settings_menu_category.is_available rescue false%></td>
<td><%= @settings_menu_category.order_by %></td>
<!-- <td><%= @settings_menu_category.order_by %></td> -->
<td><%= @settings_menu_category.created_at.utc.getlocal.strftime("%Y-%m-%d") %></td>
<td><%= link_to t("views.btn.edit"), edit_settings_menu_menu_category_path(@settings_menu_category, @settings_menu_category),:class => 'btn btn-primary btn-sm waves-effect' %></td>
<td>
<td><%= link_to t("views.btn.edit"), edit_settings_menu_menu_category_path(@settings_menu_category, @settings_menu_category),:class => 'btn btn-primary btn-sm waves-effect' %>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_menu_category_path(@settings_menu_category)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>

View File

@@ -12,11 +12,12 @@
<div class="card">
<ul class="list-group">
<li class="list-group-item"><%= link_to 'Menu Categories', dashboard_path %></li>
<li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li>
<li class="list-group-item"><%= link_to 'Item Set', dashboard_path %></li>
<li class="list-group-item"><%= link_to 'Simple Menu', dashboard_path %></li>
<li class="list-group-item"><%= link_to 'Set Menu', dashboard_path %></li>
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
<li class="list-group-item"><%= link_to 'Items Attributes', settings_menu_item_attributes_path %></li>
<li class="list-group-item"><%= link_to 'Items Options', settings_menu_item_options_path %></li>
</ul>
</div>
</div>

View File

@@ -1,12 +1,12 @@
<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-8 col-lg-8">
<%= simple_form_for([:settings,@item, @settings_menu_item_instances]) do |f| %>
<%= f.error_notification %>
<div class="col-md- panel">
<div class="form-group">
<div class="form-group p-l-15">
<%= f.input :item_instance_code %>
<%= f.input :item_instance_name %>
<%= f.input :price %>
@@ -28,13 +28,13 @@
</div>
</div>
<div class="form-actions">
<div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div>
</div>
<% end %>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

View File

@@ -83,13 +83,13 @@
<td><%=l settings_menu_item.created_at, :format => :short %></td>
<% if settings_menu_item.type == "SimpleMenuItem" %>
<td><%= link_to t("views.btn.show"), settings_menu_category_simple_menu_item_path(@category, settings_menu_item ) %></td>
<td><%= link_to t("views.btn.edit"), edit_settings_menu_category_simple_menu_item_path(@category, settings_menu_item) %></td>
<td><%= link_to t("views.btn.delete"), settings_menu_category_simple_menu_item_path(@category, settings_menu_item ), method: :delete, data: { confirm: 'Are you sure?' } %></td>
<td><%= link_to t("views.btn.show"), settings_menu_category_simple_menu_item_path(@category, settings_menu_item ),:class=>"btn btn-primary waves-effect btn-sm" %></td>
<td><%= link_to t("views.btn.edit"), edit_settings_menu_category_simple_menu_item_path(@category, settings_menu_item),:class=>"btn btn-info waves-effect btn-sm" %></td>
<td><%= link_to t("views.btn.delete"), settings_menu_category_simple_menu_item_path(@category, settings_menu_item ), method: :delete, data: { confirm: 'Are you sure?' },:class=>"btn btn-danger waves-effect btn-sm" %></td>
<% else %>
<td><%= link_to t("views.btn.show"), settings_menu_category_set_menu_item_path(@category, settings_menu_item ) %></td>
<td><%= link_to t("views.btn.edit"), edit_settings_menu_category_set_menu_item_path(@category, settings_menu_item) %></td>
<td><%= link_to t("views.btn.delete"), settings_menu_category_set_menu_item_path(@category, settings_menu_item ), method: :delete, data: { confirm: 'Are you sure?' } %></td>
<td><%= link_to t("views.btn.show"), settings_menu_category_set_menu_item_path(@category, settings_menu_item ),,:class=>"btn btn-primary waves-effect btn-sm" %></td>
<td><%= link_to t("views.btn.edit"), edit_settings_menu_category_set_menu_item_path(@category, settings_menu_item),,:class=>"btn btn-info waves-effect btn-sm" %></td>
<td><%= link_to t("views.btn.delete"), settings_menu_category_set_menu_item_path(@category, settings_menu_item ), method: :delete, data: { confirm: 'Are you sure?' },,:class=>"btn btn-danger waves-effect btn-sm" %></td>
<% end %>
</tr>
<% end %>

View File

@@ -28,30 +28,37 @@
<div class="card-block">
<h4 class="card-title">Menu Item Instance</h4>
<table class="table">
<thead>
<tr>
<th>Item Instance code</th>
<th>Name</th>
<th>Price</th>
<th>On Promotion</th>
<th>Promotion Price</th>
<th>Available</th>
<th>Is Default</th>
<th>Created At</th>
</tr>
</thead>
<tbody>
<tr>
<tr><th>Item Instance code</th>
<td><%= @settings_menu_item_instances.item_instance_code %></td>
</tr>
<tr><th>Name</th>
<td><%= @settings_menu_item_instances.item_instance_name rescue "-" %></td>
</tr>
<tr><th>Price</th>
<td><%= @settings_menu_item_instances.price %></td>
</tr>
<tr><th>On Promotion</th>
<td><%= @settings_menu_item_instances.is_on_promotion %></td>
</tr>
<tr><th>Promotion Price</th>
<td><%= @settings_menu_item_instances.promotion_price %></td>
</tr>
<tr><th>Available</th>
<td><%= @settings_menu_item_instances.is_available %></td>
</tr>
<tr><th>Is Default</th>
<td><%= @settings_menu_item_instances.is_default %></td>
</tr>
<tr><th>Created At</th>
<td><%= @settings_menu_item_instances.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
</tr>
</tbody>
<% if params[:simple_menu_item_id] %>
<!-- td><%= link_to t("views.btn.edit"), edit_settings_simple_menu_item_menu_item_instance_path(@item,@settings_menu_item_instances) %></td>
<td><button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_simple_menu_item_menu_item_instance_path(@item, @settings_menu_item_instances)%>" data-method="delete">
@@ -76,8 +83,7 @@
</td>-->
<% end %>
</tr>
</tbody>
</table>
</div>
</div>

View File

@@ -13,11 +13,12 @@
<div class="card">
<ul class="list-group">
<li class="list-group-item"><%= link_to 'Menu Categories', dashboard_path %></li>
<li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li>
<li class="list-group-item"><%= link_to 'Item Set', dashboard_path %></li>
<li class="list-group-item"><%= link_to 'Simple Menu', dashboard_path %></li>
<li class="list-group-item"><%= link_to 'Set Menu', dashboard_path %></li>
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
<li class="list-group-item"><%= link_to 'Items Attributes', settings_menu_item_attributes_path %></li>
<li class="list-group-item"><%= link_to 'Items Options', settings_menu_item_options_path %></li>
</ul>
</div>
</div>

View File

@@ -1,9 +1,9 @@
<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-8 col-lg-8">
<%= simple_form_for([:settings,@settings_menu]) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<div class="form-inputs p-l-15">
<%= f.input :name %>
<%= f.input :is_active %>
<%= f.input :valid_days %>
@@ -11,12 +11,12 @@
<%= f.input :valid_time_from %>
</div>
<div class="form-actions">
<div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div>
<% end %>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>

View File

@@ -12,11 +12,12 @@
<br><br>
<div class="card">
<ul class="list-group">
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Simple Menu', dashboard_path %></li>
<li class="list-group-item"><%= link_to 'Set Menu', dashboard_path %></li> -->
<li class="list-group-item"><%= link_to 'Items Attributes', settings_menu_item_attributes_path %></li>
<li class="list-group-item"><%= link_to 'Items Options', settings_menu_item_options_path %></li>
</ul>
</div>
</div>

View File

@@ -12,11 +12,14 @@
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
<div class="card">
<ul class="list-group">
<ul class="list-group">
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Simple Menu', dashboard_path %></li>
<li class="list-group-item"><%= link_to 'Set Menu', dashboard_path %></li> -->
<li class="list-group-item"><%= link_to 'Items Attributes', settings_menu_item_attributes_path %></li>
<li class="list-group-item"><%= link_to 'Items Options', settings_menu_item_options_path %></li>
</ul>
</ul>
</div>
</div>
@@ -33,7 +36,7 @@
<th>Valid To</th>
<th>Created By</th>
<th>Created At</th>
<th colspan="2">Actions</th>
<th >Actions</th>
</tr>
</thead>
<tbody>
@@ -43,9 +46,8 @@
<td><%= @settings_menu.valid_time_from.strftime("%H:%M") rescue "-" %></td>
<td><%= @settings_menu.valid_time_to.strftime("%H:%M") rescue "-" %></td>
<td><%= @settings_menu.created_by %></td>
<td><%= @settings_menu.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
<td><%= link_to t("views.btn.edit"), edit_settings_menu_path(@settings_menu),:class => 'btn btn-primary btn-sm waves-effect' %></td>
<td>
<td><%= @settings_menu.created_at.utc.getlocal.strftime("%Y-%m-%d") %></td>
<td><%= link_to t("views.btn.edit"), edit_settings_menu_path(@settings_menu),:class => 'btn btn-primary btn-sm waves-effect' %>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_menu_path(@settings_menu)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>

Some files were not shown because too many files have changed in this diff Show More