diff --git a/app/assets/javascripts/CRM.js b/app/assets/javascripts/CRM.js index e9c764fe..a57de941 100755 --- a/app/assets/javascripts/CRM.js +++ b/app/assets/javascripts/CRM.js @@ -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 + }); + +}); \ No newline at end of file diff --git a/app/assets/javascripts/OQS.js b/app/assets/javascripts/OQS.js index bd59ffad..620e7490 100755 --- a/app/assets/javascripts/OQS.js +++ b/app/assets/javascripts/OQS.js @@ -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 ='
' + +'
' + +'
' + +''+data[field]["table_type"]+'- ' + +''+ data[field]["zone"] +'' + +''+ data[field]["order_id"] +'' + +'
' + + +'
' + +''+ data[field]["item_name"] +'- ' + +''+ data[field]["qty"] +' ' + +'
' + + +'

'+ options +'

' + + +'

' + +'Order at' + +''+ show_date +' - ' + + +''+ data[field]["item_order_by"] +' ' + +' ' + +'

' + + +' ' + +' ' + +'
' + + +'' + + +'
'; + + + + $('.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 ='
' - +'
' - +'

' - +''+data[field]["table_type"]+'- ' - +''+ data[field]["zone"] +'' - +''+ data[field]["order_id"] +'- ' - +'

' - - +'

' - +''+ data[field]["item_name"] +'- ' - +''+ data[field]["qty"] +'- ' - +'

' - - +'

'+ options +'

' - - +'

' - +'Order at' - +''+ show_date +' - ' - - +''+ data[field]["item_order_by"] +' ' - +' ' - +'

' - - +' ' - +' ' - +'
' - - +'' - - +'
'; - - - - $('.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(); } diff --git a/app/assets/javascripts/addorder.js b/app/assets/javascripts/addorder.js index d523e7e6..c8bb6be3 100755 --- a/app/assets/javascripts/addorder.js +++ b/app/assets/javascripts/addorder.js @@ -37,8 +37,8 @@ $(function(){ } row = '
' - +'
' - +''+ product[field].name +'' + +'
' + +'
'+ product[field].name +'
' +"
" - +"' - +'' + +"" + +'add' +'
' +'
' @@ -65,7 +64,7 @@ $(function(){ +"
" +'' +'
'; $('.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 = '
' - +'
' - +''+ menu_items[field].name +'' + +'
' + +'
'+ menu_items[field].name +'
' +"
" - +"' - +'' + +"" + +add+ '' +'
' +'
' @@ -174,7 +174,7 @@ $(function(){ +"
" +'' +'
'; $('.menu_items_list').append(row); @@ -216,14 +216,14 @@ $(function(){ +"' data-max-qty='"+item_sets[field]["max_selectable_qty"] +"'>" +'
' - +''+result["name"]+'' + +''+result["name"]+'' +'
' +'
' +'' +' ' +'
' +'' +'' @@ -433,8 +433,8 @@ $(function(){ disabled = "disabled"; } row +=""; }); @@ -446,7 +446,7 @@ $(function(){ type = item_options[field]["type"]; row = "

"+type+"

" $(value).each(function(i){ - row +=""; }); $(".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 - } - } - } - } - }); + } + }); } }); }); diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 28a1d23d..1bf91306 100755 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -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({ diff --git a/app/assets/javascripts/custom.js b/app/assets/javascripts/custom.js index e5b09e92..46543c6b 100644 --- a/app/assets/javascripts/custom.js +++ b/app/assets/javascripts/custom.js @@ -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, diff --git a/app/assets/javascripts/origami.js b/app/assets/javascripts/origami.js index 2f9fcee4..c799c0be 100755 --- a/app/assets/javascripts/origami.js +++ b/app/assets/javascripts/origami.js @@ -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 diff --git a/app/assets/stylesheets/addorder.scss b/app/assets/stylesheets/addorder.scss index d81a2d85..91976f41 100755 --- a/app/assets/stylesheets/addorder.scss +++ b/app/assets/stylesheets/addorder.scss @@ -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{ diff --git a/app/assets/stylesheets/origami.scss b/app/assets/stylesheets/origami.scss index d0819198..6e06b1e5 100755 --- a/app/assets/stylesheets/origami.scss +++ b/app/assets/stylesheets/origami.scss @@ -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{ diff --git a/app/assets/stylesheets/reset.css b/app/assets/stylesheets/reset.css index c5c3af2f..b4dba99e 100644 --- a/app/assets/stylesheets/reset.css +++ b/app/assets/stylesheets/reset.css @@ -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 */ /* *************************************************** */ \ No newline at end of file diff --git a/app/controllers/api/bill_controller.rb b/app/controllers/api/bill_controller.rb index ac12e453..aff97bff 100755 --- a/app/controllers/api/bill_controller.rb +++ b/app/controllers/api/bill_controller.rb @@ -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 diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 73495c70..24fe58ec 100755 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -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 diff --git a/app/controllers/origami/addorders_controller.rb b/app/controllers/origami/addorders_controller.rb index 0f1026a2..9e096a04 100755 --- a/app/controllers/origami/addorders_controller.rb +++ b/app/controllers/origami/addorders_controller.rb @@ -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]) diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index 965d6a4c..06174935 100755 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -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 diff --git a/app/controllers/origami/shifts_controller.rb b/app/controllers/origami/shifts_controller.rb index 304b6f75..851be7e5 100755 --- a/app/controllers/origami/shifts_controller.rb +++ b/app/controllers/origami/shifts_controller.rb @@ -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 diff --git a/app/controllers/reports/commission_controller.rb b/app/controllers/reports/commission_controller.rb index 98f98457..aeaa0a11 100755 --- a/app/controllers/reports/commission_controller.rb +++ b/app/controllers/reports/commission_controller.rb @@ -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 diff --git a/app/controllers/reports/stock_check_controller.rb b/app/controllers/reports/stock_check_controller.rb index c6799cb1..c9622999 100755 --- a/app/controllers/reports/stock_check_controller.rb +++ b/app/controllers/reports/stock_check_controller.rb @@ -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 diff --git a/app/models/cashier_terminal.rb b/app/models/cashier_terminal.rb index 4f642d0a..b488f7c1 100755 --- a/app/models/cashier_terminal.rb +++ b/app/models/cashier_terminal.rb @@ -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 diff --git a/app/models/printer/cashier_station_printer.rb b/app/models/printer/cashier_station_printer.rb index 91100145..e62ab4d1 100755 --- a/app/models/printer/cashier_station_printer.rb +++ b/app/models/printer/cashier_station_printer.rb @@ -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 diff --git a/app/models/printer/receipt_printer.rb b/app/models/printer/receipt_printer.rb index 18af1dd1..30bd5ed8 100755 --- a/app/models/printer/receipt_printer.rb +++ b/app/models/printer/receipt_printer.rb @@ -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 diff --git a/app/models/sale.rb b/app/models/sale.rb index 420b1eda..37e284cb 100755 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -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 diff --git a/app/models/seed_generator.rb b/app/models/seed_generator.rb index e620472d..1451b11e 100755 --- a/app/models/seed_generator.rb +++ b/app/models/seed_generator.rb @@ -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 diff --git a/app/models/shift_sale.rb b/app/models/shift_sale.rb index 68c64cff..e9a6dd44 100755 --- a/app/models/shift_sale.rb +++ b/app/models/shift_sale.rb @@ -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 diff --git a/app/pdf/order_item_pdf.rb b/app/pdf/order_item_pdf.rb index 9f916853..4bc57878 100755 --- a/app/pdf/order_item_pdf.rb +++ b/app/pdf/order_item_pdf.rb @@ -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 diff --git a/app/pdf/order_summary_pdf.rb b/app/pdf/order_summary_pdf.rb index 098718a2..50858c47 100755 --- a/app/pdf/order_summary_pdf.rb +++ b/app/pdf/order_summary_pdf.rb @@ -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 diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index 28c33ba6..80749528 100755 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -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", diff --git a/app/views/crm/customers/index.html.erb b/app/views/crm/customers/index.html.erb index b74f33a9..c14ec832 100755 --- a/app/views/crm/customers/index.html.erb +++ b/app/views/crm/customers/index.html.erb @@ -1,4 +1,4 @@ -
+ -
+
diff --git a/app/views/home/dashboard.html.erb b/app/views/home/dashboard.html.erb index 0bffc868..6aaa0624 100755 --- a/app/views/home/dashboard.html.erb +++ b/app/views/home/dashboard.html.erb @@ -5,47 +5,48 @@
-
-
-
- playlist_add_check -
-
-
NEW TASKS
-
-
-
-
help
-
NEW TICKETS
-
+
SALE COUNT
+
-
+
- forum + attach_money
-
NEW COMMENTS
-
+
TOTAL SALE
+
+
+
+
+ +
+
+
+ person_add +
+
+
TOTAL CREDIT
+
- person_add + credit_card
-
NEW VISITORS
-
+
TOTAL CARD
+
diff --git a/app/views/inventory/inventory/_inventory_list.html.erb b/app/views/inventory/inventory/_inventory_list.html.erb index 91a4ac94..bd5f5c38 100755 --- a/app/views/inventory/inventory/_inventory_list.html.erb +++ b/app/views/inventory/inventory/_inventory_list.html.erb @@ -1,48 +1,34 @@ -
-

Inventoy Product Lists

-
-
+ + + + + + + + + + <% + count = 0 + @products.each do |item| + count += 1 + %> + + + + + + + + + <% end %> +
#ProductMin OrderMax StockCreated byCreated Time
<%= count %> + <% 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 %> + <%= item.min_order_level %><%= item.max_stock_level %><%= Employee.find(item.created_by).name rescue '-' %><%= item.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %>
-
-
- - - - - - - - - - <% - count = 0 - @products.each do |item| - count += 1 - %> - - - - - - - - - <% end %> -
#ProductMin OrderMax StockCreated byCreated Time
<%= count %> - <% 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 %> - <%= item.min_order_level %><%= item.max_stock_level %><%= Employee.find(item.created_by).name rescue '-' %><%= item.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %>
-
-
- - diff --git a/app/views/inventory/inventory/index.html.erb b/app/views/inventory/inventory/index.html.erb index 6149198b..ab6b3855 100755 --- a/app/views/inventory/inventory/index.html.erb +++ b/app/views/inventory/inventory/index.html.erb @@ -1,17 +1,48 @@ -
-
-
+ + + +
+
+
+ + + +
+
<%= render 'inventory_list' %>
-
- <% if current_login_employee.role == "administrator" || current_login_employee.role == 'manager' %> - - <% end %> - - -
+
+
+
+
+
list BUTTON LISTS
+

+ 1) <%= t("views.btn.new") + " " + (t :inventory) %> - to create new inventory
+

+

+ 2) New Stock Taking - to create new Stock Taking
+

+

+ 3) Stock Check Report - to go Stock Check Report List
+

+
list LINK LISTS
+

1) Home / Back - go to dashboard

+
+
+ + diff --git a/app/views/inventory/inventory_definitions/_form.html.erb b/app/views/inventory/inventory_definitions/_form.html.erb index 7a5f06ff..e7f3198d 100755 --- a/app/views/inventory/inventory_definitions/_form.html.erb +++ b/app/views/inventory/inventory_definitions/_form.html.erb @@ -1,5 +1,5 @@
-
+
<%= 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 %> -
- +
+
@@ -154,8 +157,8 @@

Total :

- - + +
@@ -183,13 +186,13 @@
@@ -207,7 +210,7 @@
-
+
diff --git a/app/views/origami/credit_payments/index.html.erb b/app/views/origami/credit_payments/index.html.erb index d8f5a263..2d246ce4 100755 --- a/app/views/origami/credit_payments/index.html.erb +++ b/app/views/origami/credit_payments/index.html.erb @@ -90,11 +90,11 @@
-
1000
+
1000
3000
-
5000
+
5000
10000
@@ -106,7 +106,7 @@
- +
diff --git a/app/views/origami/discounts/index.html.erb b/app/views/origami/discounts/index.html.erb index ada238bb..4fbaff3f 100755 --- a/app/views/origami/discounts/index.html.erb +++ b/app/views/origami/discounts/index.html.erb @@ -1,4 +1,7 @@
+
@@ -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, diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 3f48ac92..66fadd48 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -127,7 +127,7 @@
-
+
Receipt No: <% if @status_sale == 'sale' %> @@ -142,7 +142,7 @@
-
+
<% if @status_sale == 'sale' %> diff --git a/app/views/origami/jcb/index.html.erb b/app/views/origami/jcb/index.html.erb index e1ec43d4..c27013d2 100755 --- a/app/views/origami/jcb/index.html.erb +++ b/app/views/origami/jcb/index.html.erb @@ -76,11 +76,11 @@
-
1000
+
1000
3000
-
5000
+
5000
10000
@@ -92,7 +92,7 @@
- +
diff --git a/app/views/origami/master/index.html.erb b/app/views/origami/master/index.html.erb index bdbbf6d4..b817effd 100755 --- a/app/views/origami/master/index.html.erb +++ b/app/views/origami/master/index.html.erb @@ -76,11 +76,11 @@
-
1000
+
1000
3000
-
5000
+
5000
10000
@@ -92,7 +92,7 @@
- +
diff --git a/app/views/origami/movetable/move_dining.html.erb b/app/views/origami/movetable/move_dining.html.erb index 7df2038d..60aa775f 100755 --- a/app/views/origami/movetable/move_dining.html.erb +++ b/app/views/origami/movetable/move_dining.html.erb @@ -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; + } + }); + } }); } diff --git a/app/views/origami/mpu/index.html.erb b/app/views/origami/mpu/index.html.erb index ce2947fd..92a87dd2 100755 --- a/app/views/origami/mpu/index.html.erb +++ b/app/views/origami/mpu/index.html.erb @@ -79,11 +79,11 @@
-
1000
+
1000
3000
-
5000
+
5000
10000
@@ -95,7 +95,7 @@
- +
diff --git a/app/views/origami/orders/show.html.erb b/app/views/origami/orders/show.html.erb index 7d395ab6..28930adf 100755 --- a/app/views/origami/orders/show.html.erb +++ b/app/views/origami/orders/show.html.erb @@ -127,18 +127,18 @@
ORDERS DETAILS
-
+
-

Receipt No: -

+ Receipt No: +
-

Date: <%= @order.created_at.utc.getlocal.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

+ Date: <%= @order.created_at.utc.getlocal.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>
-

Customer :

+ Customer :
diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index af8cde00..0cd18f0f 100755 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -265,7 +265,7 @@ - +
diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb index 5128e6f5..d0b3804b 100755 --- a/app/views/origami/rooms/show.html.erb +++ b/app/views/origami/rooms/show.html.erb @@ -130,27 +130,27 @@
-
+
-

Receipt No: + Receipt No: <% if @status_sale == 'sale' %> <%= @obj_sale.receipt_no rescue '' %> <% end %> -

+
-

Date: <%= @obj_sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

+ Date: <%= @obj_sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>
-
+
<% if @status_sale == 'sale' %> -

Customer : <%= @obj_sale_sale.customer.name rescue '-' %>

+ Customer : <%= @obj_sale_sale.customer.name rescue '-' %> <%else%> -

Customer : <%= @customer.name rescue "-" %>

+ Customer : <%= @customer.name rescue "-" %> <%end%>
diff --git a/app/views/origami/sales/show.html.erb b/app/views/origami/sales/show.html.erb index 2152deb1..dd8a0b4f 100755 --- a/app/views/origami/sales/show.html.erb +++ b/app/views/origami/sales/show.html.erb @@ -25,7 +25,7 @@
<% @complete.each do |sale| %> -
+
<%= sale.receipt_no %><%= sale.sale_status %>
@@ -39,7 +39,7 @@
<% @tables.each do |table| %> <% if table.status == 'occupied' %> -
+
<%= table.name %> <% if table.get_booking.nil? %> @@ -50,7 +50,7 @@
<% else %> -
+
<%= table.name %>
@@ -65,7 +65,7 @@
<% @rooms.each do |room| %> <% if room.status == 'occupied' %> -
+
<%= room.name %> <% if room.get_booking.nil? %> @@ -76,7 +76,7 @@
<% else %> -
+
<%= room.name %>
@@ -90,7 +90,7 @@
<% @orders.each do |order| %> -
+
<%= order.order_id %>
@@ -112,20 +112,19 @@
INVOICE DETAILS
-
+
-

Receipt No: + Receipt No: <%= @sale.receipt_no rescue '' %> -

+
-

Date: <%= @sale.created_at.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

+ Date: <%= @sale.created_at.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>
-
+
- -

Customer : <%= @sale.customer.name rescue "-" %>

+ Customer : <%= @sale.customer.name rescue "-" %>
@@ -198,9 +197,9 @@
<% if @sale.sale_status != 'void' %> - + <% end %> - +
diff --git a/app/views/origami/visa/index.html.erb b/app/views/origami/visa/index.html.erb index 53cf8dcf..53589c89 100755 --- a/app/views/origami/visa/index.html.erb +++ b/app/views/origami/visa/index.html.erb @@ -76,11 +76,11 @@
-
1000
+
1000
3000
-
5000
+
5000
10000
@@ -92,7 +92,7 @@
- +
diff --git a/app/views/reports/commission/_commission_report_filter.html.erb b/app/views/reports/commission/_commission_report_filter.html.erb index b5791993..bb04b4f5 100755 --- a/app/views/reports/commission/_commission_report_filter.html.erb +++ b/app/views/reports/commission/_commission_report_filter.html.erb @@ -1,41 +1,50 @@ - +
<%= form_tag report_path, :method => :get, :id => "frm_report", :class => "form" do %> <% if period_type != false %> -
+
-
- - <% if @daterange %> - - <% else %> - - <% end %> + +
+ + + +
+
+ + +
+
+ + +
+
+
+ +
+
-
- - -
-
- -
-
- -
-
<% end %> - <% end %> - - diff --git a/app/views/reports/saleitem/index.html.erb b/app/views/reports/saleitem/index.html.erb index ced2cc17..485ea3ed 100755 --- a/app/views/reports/saleitem/index.html.erb +++ b/app/views/reports/saleitem/index.html.erb @@ -20,7 +20,7 @@ diff --git a/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb b/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb index e83183ba..5e44051e 100755 --- a/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb +++ b/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb @@ -1,44 +1,44 @@ - -<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> - <% if period_type != false %> -
-
- - -
- -
- - - -
-
- - -
-
- - -
-

- -
-
+
+ <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> + <% if period_type != false %> +
+
+ + +
+ +
+ + + +
+
+ + +
+
+ + +
+

+ +
+
+ <% end %> <% end %> - -<% end %> +
--> diff --git a/app/views/settings/commissioners/edit.html.erb b/app/views/settings/commissioners/edit.html.erb index b5da1ebe..5a8701a5 100755 --- a/app/views/settings/commissioners/edit.html.erb +++ b/app/views/settings/commissioners/edit.html.erb @@ -1,14 +1,4 @@ - + +
-
-
- - +
+
+ @@ -61,6 +61,15 @@
Payment method:
-
+
+
+
+
+ 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 +
+
\ No newline at end of file diff --git a/app/views/settings/processing_items/_form.html.erb b/app/views/settings/processing_items/_form.html.erb index 8230e4e6..b97f43bb 100755 --- a/app/views/settings/processing_items/_form.html.erb +++ b/app/views/settings/processing_items/_form.html.erb @@ -18,7 +18,7 @@
-

<%= category.name %>

+
<%= category.name %>
diff --git a/app/views/settings/tax_profiles/_form.html.erb b/app/views/settings/tax_profiles/_form.html.erb index 315a3f00..5a490d13 100755 --- a/app/views/settings/tax_profiles/_form.html.erb +++ b/app/views/settings/tax_profiles/_form.html.erb @@ -5,14 +5,14 @@ <%= simple_form_for([:settings, @settings_tax_profile ]) do |f| %> <%= f.error_notification %> -
+
<%= f.input :name %> <%= f.input :rate %> <%= f.input :inclusive %> <%= f.input :order_by %>
-
+
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
<% end %> diff --git a/app/views/settings/tax_profiles/index.html.erb b/app/views/settings/tax_profiles/index.html.erb index 2f94e0e2..de3ab94e 100755 --- a/app/views/settings/tax_profiles/index.html.erb +++ b/app/views/settings/tax_profiles/index.html.erb @@ -35,7 +35,7 @@ <%= settings_tax_profile.order_by %> <%= settings_tax_profile.created_by %> <%= link_to t("views.btn.show"), settings_tax_profile_path(settings_tax_profile), :class => "btn btn-info btn-sm waves-effect" %> - <%= link_to t("views.btn.edit"), edit_settings_tax_profile_path(settings_tax_profile),:class => 'btn btn-info btn-lg waves-effect' %> + <%= link_to t("views.btn.edit"), edit_settings_tax_profile_path(settings_tax_profile),:class => 'btn btn-info btn-sm waves-effect' %> <% end %> diff --git a/app/views/settings/tax_profiles/new.html.erb b/app/views/settings/tax_profiles/new.html.erb index 4ce9ffb0..a5f3663e 100755 --- a/app/views/settings/tax_profiles/new.html.erb +++ b/app/views/settings/tax_profiles/new.html.erb @@ -1,4 +1,4 @@ -<%= link_to 'Back', settings_tax_profiles_path %> --> +