Merge branch 'master' into license

This commit is contained in:
Yan
2017-11-24 10:15:37 +06:30
143 changed files with 23874 additions and 3746 deletions

1
.gitignore vendored
View File

@@ -36,6 +36,7 @@ pickle-email-*.html
._*.* ._*.*
.rbenv-version .rbenv-version
config/deploy/config/* config/deploy/config/*
config/puma.rb
!/log/.keep !/log/.keep
!/tmp/.keep !/tmp/.keep
.ruby-version .ruby-version

8
.idea/.generators generated
View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Settings><!--This file was automatically generated by Ruby plugin.
You are allowed to:
1. Reorder generators
2. Remove generators
3. Add installed generators
To add new installed generators automatically delete this file and reload the project.
--><GeneratorsGroup><Generator name="assets" /><Generator name="cancan:ability" /><Generator name="channel" /><Generator name="coffee:assets" /><Generator name="controller" /><Generator name="factory_girl:model" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="jbuilder" /><Generator name="job" /><Generator name="js:assets" /><Generator name="kaminari:config" /><Generator name="kaminari:views" /><Generator name="mailer" /><Generator name="migration" /><Generator name="model" /><Generator name="nested_form:install" /><Generator name="resource" /><Generator name="rspec:controller" /><Generator name="rspec:feature" /><Generator name="rspec:helper" /><Generator name="rspec:install" /><Generator name="rspec:integration" /><Generator name="rspec:job" /><Generator name="rspec:mailer" /><Generator name="rspec:model" /><Generator name="rspec:observer" /><Generator name="rspec:request" /><Generator name="rspec:scaffold" /><Generator name="rspec:view" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="sidekiq:worker" /><Generator name="simple_form:install" /><Generator name="system_test" /><Generator name="task" /><Generator name="test_unit:controller" /><Generator name="test_unit:generator" /><Generator name="test_unit:helper" /><Generator name="test_unit:integration" /><Generator name="test_unit:job" /><Generator name="test_unit:mailer" /><Generator name="test_unit:model" /><Generator name="test_unit:plugin" /><Generator name="test_unit:scaffold" /><Generator name="test_unit:system" /><Generator name="uploader" /></GeneratorsGroup></Settings>

7
.idea/.rakeTasks generated

File diff suppressed because one or more lines are too long

4
.idea/misc.xml generated
View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 2.3.3" project-jdk-type="RUBY_SDK" />
</project>

8
.idea/modules.xml generated
View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/sxrestaurant.iml" filepath="$PROJECT_DIR$/.idea/sxrestaurant.iml" />
</modules>
</component>
</project>

144
.idea/sxrestaurant.iml generated
View File

@@ -1,144 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="RUBY_MODULE" version="4">
<component name="FacetManager">
<facet type="RailsFacetType" name="Ruby on Rails">
<configuration>
<RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_SUPPORT_REMOVED" VALUE="false" />
<RAILS_FACET_CONFIG_ID NAME="RAILS_TESTS_SOURCES_PATCHED" VALUE="true" />
<RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_APPLICATION_ROOT" VALUE="$MODULE_DIR$" />
</configuration>
</facet>
</component>
<component name="ModuleRunConfigurationManager">
<shared />
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/.bundle" />
<excludeFolder url="file://$MODULE_DIR$/components" />
<excludeFolder url="file://$MODULE_DIR$/public/system" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
<excludeFolder url="file://$MODULE_DIR$/vendor/bundle" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="actioncable (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionpack (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionview (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activejob (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activemodel (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activerecord (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activesupport (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="arel (v8.0.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="autoprefixer-rails (v7.1.1.2, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bcrypt (v3.1.11, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bindex (v0.5.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bootstrap (v4.0.0.alpha6, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bootstrap-datepicker-rails (v1.6.4.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bootstrap-daterangepicker-rails (v0.0.8, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.14.6, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="byebug (v9.0.6, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="cancancan (v1.17.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="carrierwave (v1.1.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="chronic (v0.10.2, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-rails (v4.2.2, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-script (v2.4.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-script-source (v1.12.2, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.0.5, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="connection_pool (v2.2.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="cups (v0.0.7, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="database_cleaner (v1.6.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="erubi (v1.6.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="execjs (v2.7.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="factory_girl (v4.8.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="factory_girl_rails (v4.8.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="faker (v1.7.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.9.18, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="filterrific (v2.1.2, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="font-awesome-rails (v4.7.0.2, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="globalid (v0.4.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="httparty (v0.15.5, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.8.6, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jbuilder (v2.7.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jquery-datetimepicker-rails (v2.4.1.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jquery-rails (v4.3.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jquery-ui-rails (v6.0.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="kaminari (v1.0.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="kaminari-actionview (v1.0.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="kaminari-activerecord (v1.0.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="kaminari-core (v1.0.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="listen (v3.0.8, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="loofah (v2.0.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mail (v2.6.6, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="method_source (v0.8.2, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mime-types (v3.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2016.0521, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.2.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.10.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="momentjs-rails (v2.17.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.12.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="multi_xml (v0.6.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mysql2 (v0.4.6, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nested_form (v0.3.2, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nio4r (v2.1.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.8.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="pdf-core (v0.7.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="pg (v0.20.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="prawn (v2.2.2, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="prawn-table (v0.2.2, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="puma (v3.9.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack (v2.0.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack-cors (v0.4.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack-protection (v2.0.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack-test (v0.6.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.0.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="railties (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rake (v12.0.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.9.8, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.9.10, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="redis (v3.3.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.6.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.6.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.6.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-rails (v3.6.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.6.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ruby-ole (v1.2.12.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sass (v3.4.24, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sass-rails (v5.0.6, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="schema_to_scaffold (v0.8.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="select2-rails (v4.0.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="shoulda-matchers (v3.1.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sidekiq (v5.0.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="simple_form (v3.5.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="spreadsheet (v1.1.4, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="spring (v2.0.2, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="spring-watcher-listen (v2.0.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets (v3.7.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets-rails (v3.2.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tether-rails (v1.4.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thor (v0.19.4, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.6, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.7, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="to_xls-rails (v1.3.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ttfunk (v1.5.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="turbolinks (v5.0.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="turbolinks-source (v5.0.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.3, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="uglifier (v3.2.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="web-console (v3.5.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.6.5, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.2, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="whenever (v0.9.7, rbenv: 2.3.3) [gem]" level="application" />
</component>
<component name="RModuleSettingsStorage">
<LOAD_PATH number="0" />
<I18N_FOLDERS number="1" string0="$MODULE_DIR$/config/locales" />
</component>
</module>

6
.idea/vcs.xml generated
View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

1290
.idea/workspace.xml generated

File diff suppressed because it is too large Load Diff

View File

@@ -40,6 +40,7 @@ gem 'rack-cors'
# image upload # image upload
gem 'carrierwave', '~> 1.0' gem 'carrierwave', '~> 1.0'
gem 'mini_magick'
#Report and Printing gems #Report and Printing gems
gem 'cups', '~> 0.0.7' gem 'cups', '~> 0.0.7'

View File

@@ -118,6 +118,7 @@ GEM
mime-types (3.1) mime-types (3.1)
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521) mime-types-data (3.2016.0521)
mini_magick (4.8.0)
mini_mime (1.0.0) mini_mime (1.0.0)
mini_portile2 (2.3.0) mini_portile2 (2.3.0)
minitest (5.10.3) minitest (5.10.3)
@@ -277,6 +278,7 @@ DEPENDENCIES
kaminari (~> 1.0.1) kaminari (~> 1.0.1)
listen (~> 3.0.5) listen (~> 3.0.5)
material_icons material_icons
mini_magick
momentjs-rails momentjs-rails
mysql2 (>= 0.3.18, < 0.5) mysql2 (>= 0.3.18, < 0.5)
nested_form nested_form

View File

@@ -11,10 +11,11 @@
// about supported directives. // about supported directives.
//= require jquery //= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require tether //= require tether
//= require bootstrap/js/popper.min //= require bootstrap/js/popper.min
//= require bootstrap/js/bootstrap-material-design.min //= require bootstrap/js/bootstrap-material-design.min
//= require jquery_ujs
//= require turbolinks //= require turbolinks
//= require momentjs/moment //= require momentjs/moment
//= require bootstrap-material-datetimepicker/js/bootstrap-material-datetimepicker //= require bootstrap-material-datetimepicker/js/bootstrap-material-datetimepicker

View File

@@ -67,7 +67,7 @@ $(document).on('turbolinks:load', function() {
var date = new Date(data[field]["created_at"]); var date = new Date(data[field]["created_at"]);
var show_date = date.getDate() + "-" + date.getMonth() + "-" + date.getFullYear() + ' ' + date.getHours()+ ':' + date.getMinutes(); 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"]+'">' row ='<div class="card queue_station animated " data-order-no="'+data[field]["order_id"]+'">'
+'<div class="card-block">' +'<div class="card-block">'
+'<div class="row">' +'<div class="row">'
+'<span class="col-md-4 order-zone-type font-13">'+data[field]["table_type"]+'-'+ data[field]["zone"] +'</span>' +'<span class="col-md-4 order-zone-type font-13">'+data[field]["table_type"]+'-'+ data[field]["zone"] +'</span>'
@@ -101,17 +101,15 @@ $(document).on('turbolinks:load', function() {
+'</div>'; +'</div>';
$('.oqs_append').append(row); $('.oqs_append').append(row);
} }
} }
}); });
//end Ajax //end Ajax
} }
$(document).on('click', '.queue_station', function(event){ $(document).on('click', '.queue_station', function(event){
var orderNo = $(this).attr('data-order-no');
var orderZone=$(this).children().children().children('.order-zone').text().trim(); var orderZone=$(this).children().children().children('.order-zone').text().trim();
var orderZoneType=$(this).children().children().children('.order-zone-type').text().trim(); var orderZoneType=$(this).children().children().children('.order-zone-type').text().trim();
// var orderItem=$(this).children().children().children('.order-item').text(); // var orderItem=$(this).children().children().children('.order-item').text();
@@ -132,7 +130,7 @@ $(document).on('turbolinks:load', function() {
// Call get_order_items() for Order Items by dining // Call get_order_items() for Order Items by dining
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
url: '/oqs/' + orderZone, url: '/oqs/' + orderNo,
data: { 'status' : order_status }, data: { 'status' : order_status },
success: function(res){ success: function(res){
@@ -234,6 +232,7 @@ $(document).on('turbolinks:load', function() {
// Print Order Summary // Print Order Summary
// $('#print_order_summary').on('click',function(){ // $('#print_order_summary').on('click',function(){
$(document).on('click', '#print_order_summary', function(event){ $(document).on('click', '#print_order_summary', function(event){
var orderNo = $('.selected-item').attr('data-order-no');
var table_name=$('.selected-item').children().children().children('.order-zone').text().trim(); var table_name=$('.selected-item').children().children().children('.order-zone').text().trim();
var assigned_item_id=$('.selected-item').children('.card-block').children('.assigned-order-item').text(); var assigned_item_id=$('.selected-item').children('.card-block').children('.assigned-order-item').text();
var params = { 'table_name':table_name }; var params = { 'table_name':table_name };

View File

@@ -22,9 +22,7 @@ $(function() {
product = data; product = data;
for(var field in product) { for(var field in product) {
console.log(product[field].name);
if (product[field].unit_price > 0) { if (product[field].unit_price > 0) {
console.log("hi");
qty = 1; qty = 1;
options = []; options = [];
item_attributes = []; item_attributes = [];
@@ -101,8 +99,14 @@ $(function() {
for(var field in menu_items) { for(var field in menu_items) {
if (menu_items[field].is_sub_item == false) { if (menu_items[field].is_sub_item == false) {
instances = menu_items[field].instances ; instances = menu_items[field].instances ;
if (!instances.length > 0) {
swal("Hello Please Check!","doesn't not have instance item in this menu items ("+ menu_items[field].name+")","warning");
}
if (instances.length > 0) {
qty = 1; qty = 1;
options = []; options = [];
price = 0;
if (JSON.stringify(menu_items[field].item_sets)!='[]') { if (JSON.stringify(menu_items[field].item_sets)!='[]') {
fa_plus = ''; fa_plus = '';
@@ -135,7 +139,6 @@ $(function() {
code = instances[i].code; code = instances[i].code;
} }
}); });
} }
if (menu_items[field].image) { if (menu_items[field].image) {
@@ -177,6 +180,9 @@ $(function() {
+'</div>'; +'</div>';
$('.menu_items_list').append(row); $('.menu_items_list').append(row);
} }
//end instances in menu-items alest 1 instance
}
//end is_sub_item false
} }
} }
}); });
@@ -187,6 +193,7 @@ $(function() {
$(document).on('click', '.set_item_box', function(event){ $(document).on('click', '.set_item_box', function(event){
$(".instance-list").empty(); $(".instance-list").empty();
$(".options-list").empty(); $(".options-list").empty();
$('.set_change_qty').val(1);
change_qty_plus_minus("set_count","set_plus","set_minus"); change_qty_plus_minus("set_count","set_plus","set_minus");
data = $(this).parent().children().children('.add_icon'); data = $(this).parent().children().children('.add_icon');
@@ -366,6 +373,8 @@ $(function() {
$('.add_to_order').removeAttr('data-attributes'); $('.add_to_order').removeAttr('data-attributes');
$('.add_to_order').removeAttr('data-options'); $('.add_to_order').removeAttr('data-options');
$('.keypress_qty').val(1);
change_qty_plus_minus("count","plus","minus"); change_qty_plus_minus("count","plus","minus");
data = $(this).parent().children().children('.add_icon'); data = $(this).parent().children().children('.add_icon');
@@ -451,7 +460,7 @@ $(function() {
$(".options-list").append(row); $(".options-list").append(row);
} }
$('#count').val(1); // $('#count').val(1);
$('#item_instances').text(instances); $('#item_instances').text(instances);
$('#title_name').text(data.attr('data-name')); $('#title_name').text(data.attr('data-name'));
$('#item_code').text(data.attr('data-item-code')); $('#item_code').text(data.attr('data-item-code'));
@@ -465,7 +474,7 @@ $(function() {
// click select option icon for add // click select option icon for add
$(document).on('click', '.attribute_btn', function(event){ $(document).on('click', '.attribute_btn', function(event){
$('.change_qty').val(1); // $('.change_qty').val(1);
value = $(this).data('value'); value = $(this).data('value');
type = $(this).data('type'); type = $(this).data('type');
instances = $(this).data('instances'); instances = $(this).data('instances');
@@ -505,6 +514,7 @@ $(function() {
// click select option icon for add // click select option icon for add
$(document).on('click', '.option_btn', function(event){ $(document).on('click', '.option_btn', function(event){
active =$(this).hasClass('selected-option');
value = $(this).data('value'); value = $(this).data('value');
type = $(this).data('type'); type = $(this).data('type');
group = $(this).data('group'); group = $(this).data('group');
@@ -514,7 +524,12 @@ $(function() {
$('.'+type).removeClass("selected-option"); $('.'+type).removeClass("selected-option");
} }
}); });
if (active) {
$(this).revoveClass('selected-option');
}else{
$(this).addClass('selected-option'); $(this).addClass('selected-option');
}
if(group == "set_menu"){ if(group == "set_menu"){
code = $(this).data('code'); code = $(this).data('code');
@@ -544,7 +559,22 @@ $(function() {
if (item_row.length>0) { if (item_row.length>0) {
var instances = jQuery.parseJSON(item_row.attr('data-instances')); var instances = jQuery.parseJSON(item_row.attr('data-instances'));
for(var field in instances) { for(var field in instances) {
attrbu = JSON.stringify(attribute_arr);
instan = JSON.stringify(instances[field].values);
var newarr = new Set(instan);
result = false;
for(var i in attrbu) {
if (newarr.has(attrbu[i])) {
result = true;
break;
}
}
if (JSON.stringify(attribute_arr) === JSON.stringify(instances[field].values)) { if (JSON.stringify(attribute_arr) === JSON.stringify(instances[field].values)) {
$('.add_to_order').attr('data-instance-code',instances[field].code); $('.add_to_order').attr('data-instance-code',instances[field].code);
$('.add_to_order').attr('data-instance',instances[field].name); $('.add_to_order').attr('data-instance',instances[field].name);
@@ -732,7 +762,7 @@ $(function() {
$('#sub_total').empty(); $('#sub_total').empty();
$('#sub_total').append(fixed_total_price); $('#sub_total').append(fixed_total_price);
if (fixed_total_price > 0) { if (item_row.length > 0) {
$('.create').removeAttr("disabled", false); $('.create').removeAttr("disabled", false);
}else{ }else{
$('.create').attr("disabled", true); $('.create').attr("disabled", true);
@@ -795,10 +825,14 @@ $(function() {
// Get Selected Class // Get Selected Class
function change_qty_plus_minus(id,plus,minus) { function change_qty_plus_minus(id,plus,minus) {
var count = parseInt($('#'+id).val())
var countEl = document.getElementById(id);
$('#'+plus).on("click", function(){ $('#'+plus).on("click", function(){
var count = parseInt($('#'+id).val());
var countEl = document.getElementById(id);
count++; count++;
countEl.value = count; countEl.value = count;
@@ -826,6 +860,10 @@ $(function() {
}); });
$('#'+minus).on("click", function(){ $('#'+minus).on("click", function(){
var count = parseInt($('#'+id).val());
var countEl = document.getElementById(id);
if (count > 1) { if (count > 1) {
count--; count--;
countEl.value = count; countEl.value = count;
@@ -853,20 +891,22 @@ $(function() {
}) })
} }
$(".keypress_qty").on('keyup change', function (){
$('.keypress_qty').keyup(function(e){ // $('.keypress_qty').keyup(function(e){
id = $(this).attr('id'); id = $(this).attr('id');
value = $(this).val(); value = $(this).val();
if ($.isNumeric(value)) {
if (id=="count") { if (id=="count") {
$('.change_qty').attr('value',value);
price = $("#unit_price").text(); price = $("#unit_price").text();
$("#total_price").text(value*price); $("#total_price").text(value*price);
}else{ }else{
var item_row = $('.selected-instance'); var item_row = $('.selected-instance');
price = $("#set_unit_price").text(); price = $("#set_unit_price").text();
set_total_price = $("#set_total_price").text(); set_total_price = $("#set_total_price").text();
$("#set_count").val(value); $(".set_change_qty").val(value);
if (item_row.length > 1) { if (item_row.length > 1) {
total = 0 ; total = 0 ;
$(item_row).each(function(i){ $(item_row).each(function(i){
@@ -878,6 +918,10 @@ $(function() {
} }
$("#set_total_price").text(total_price); $("#set_total_price").text(total_price);
} }
}else{
$('#'+id).val(1);
swal("Opps","Please enter number for qty","warning");
}
}); });
/* $("input").keypress(function(){ /* $("input").keypress(function(){

View File

@@ -115,236 +115,3 @@ function export_to(path)
var form_params = $("#frm_report").serialize(); var form_params = $("#frm_report").serialize();
window.location = path+"?"+ form_params; window.location = path+"?"+ form_params;
} }
/*Oqs Js file */
$(document).ready(function(){
$(".nav-completed").on("click", function(){
$("#completed").removeClass('hide')
$(".oqs_append").addClass('hide')
});
$(".oqs_click").on("click", function(){
$(".oqs_click").removeClass('oqs_active');
$(".queue_station").removeClass('queue_station_box');
$("#completed").addClass('hide');
$(".oqs_append").removeClass('hide');
$(this).addClass('oqs_active');
$(".queue_station").addClass('queue_station_box');
var oqs_id = $(this).find(".oqs-id").text();
var url = 'oqs/get_items/'+oqs_id;
show_details(url);
}); //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);
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" 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
}
$(document).on('click', '.queue_station', function(event){
var orderZone=$(this).children().children().children('.order-zone').text().trim();
// var orderItem=$(this).children().children().children('.order-item').text();
var assigned_item_id = $(this).children().find(".assigned-order-item").text();
var orderQty = $(this).children().children().children('.order-qty').text();
var orderBy = $(this).children().children().children().children('.order-by').text();
var orderAt = $(this).children().children().children().children('.order-at').text();
var orderCustomer = $(this).children().children('.order-customer').text();
var order_status = $(this).children().children('.order-status').text();
$('#order-title').text("ORDER DETAILS - " + orderZone);
$('#order-by').text(orderBy);
$('#order-at').text(orderAt);
$('#order-customer').text(orderCustomer);
$('#order-from').text(orderZone);
// clear order items
$("#oqs-order-details-table").children("tbody").empty();
// Call get_order_items() for Order Items by dining
$.ajax({
type: 'GET',
url: '/oqs/' + orderZone,
data: { 'status' : order_status },
success: function(res){
for (i = 0; i < res.length; i++) {
var data = JSON.stringify(res[i]);
var parse_data = JSON.parse(data);
var order_item_row = "<tr>" +
"<td class='order-items' style='width:80%; text-align:left'>" + parse_data.item_name + "</td>" +
"<td class='order-qty' style='width:20%; text-align:right'>" + parse_data.qty + "</td>" +
"</tr>";
$("#oqs-order-details-table").children("tbody").append(order_item_row);
}
}
})
// $('#order-items').text(orderItem);
// $('#order-qty').text(orderQty);
$('.queue_station').removeClass('selected-item');
$(this).addClass('selected-item');
});
$(document).on('click', '.order-item-edit', function(event){
var _self = $(this); // To know in ajax return
var assigned_item_id=$(this).attr('id').substr(5);
window.location.href = '/oqs/'+ assigned_item_id + "/edit"
});
// complete for queue item
$(document).on('click', '.order-complete', function(event){
//e.preventDefault();
var _self = $(this); // To know in ajax return
var assigned_item_id=$(this).attr('id').substr(15);
var params = { 'id':assigned_item_id };
// Call update_delivery_status() for changed delivery and move to delivery
$.ajax({
type: 'POST',
url: '/oqs/update_delivery',
data: params,
dataType: 'json',
success: function(data){
for (i = 0; i < data.length; i++) {
var queue_station = $('#assigned_queue_' + data[i]).parent().parent(".queue_station");
var station = queue_station.parent().parent().attr('id');
// Remove a queue card from current station
queue_station.remove();
// Remove a queue card from current station
queue_station.children('.card-footer').remove();
// Add removed queue card from station to completed
$("#completed").children('.card-columns').append(queue_station);
// update queue item count in each station
var station_count=parseInt($("#"+station+"_count").text()) - 1;
$("#"+station+"_count").text(station_count);
}
// update queue item count in completed station
$("#completed_count").text(parseInt($("#completed_count").text()) + data.length);
alert("updated!");
// Page reload
location.reload();
}
});
});
// Print Order Item
$(document).on('click', '#print_order_item', function(event){
var assigned_item_id = $('.selected-item').children('.card-block').children('.assigned-order-item').text();
var options = $('.selected-item').children('.card-block').find('.item-options').text();
var params = { 'options':options };
$.ajax({
type: 'GET',
url: '/oqs/print/print/'+assigned_item_id,
success: function(data){ }
});
});
// Print Order Summary
// $('#print_order_summary').on('click',function(){
$(document).on('click', '#print_order_summary', function(event){
var table_name=$('.selected-item').children().children().children('.order-zone').text().trim();
var assigned_item_id=$('.selected-item').children('.card-block').children('.assigned-order-item').text();
var params = { 'table_name':table_name };
$.ajax({
type: 'GET',
url: '/oqs/print/print_order_summary/'+assigned_item_id,
data: params,
success: function(data){ }
});
});
// Qty update for OQS Edit Controller
$('#qty-update').on('click', function(){
var qty_weight = $("input[name='qty_weight']").val();
var remarks = $("textarea[name='remarks']").val();
var order_items_id = $(this).attr('data-id');
var params = { 'order_items_id': order_items_id, 'qty_weight': qty_weight, 'remarks': remarks }
$.ajax({
type: 'POST',
url: '/oqs/' + order_items_id,
data: params,
success: function(result){
alert("Updated!");
window.location.href = '/oqs';
}
});
});
});

View File

@@ -34,7 +34,7 @@ App.order_queue_station = App.cable.subscriptions.create('OrderQueueStationChann
if (oqs_id == items[field]["order_queue_station_id"]) { if (oqs_id == items[field]["order_queue_station_id"]) {
row ='<div class="card queue_station animated shake queue_station_box" data-date="'+items[field]["order_id"]+'">' row ='<div class="card queue_station animated shake queue_station_box" data-order-no="'+items[field]["order_id"]+'">'
+'<strong class="hidden">'+items[field]["order_id"]+'</strong>' +'<strong class="hidden">'+items[field]["order_id"]+'</strong>'
+'<div class="card-block">' +'<div class="card-block">'
@@ -75,11 +75,9 @@ App.order_queue_station = App.cable.subscriptions.create('OrderQueueStationChann
var $divs = $("div.queue_station"); var $divs = $("div.queue_station");
var SortListDivs = $divs.sort(function (a, b) { var SortListDivs = $divs.sort(function (a, b) {
first = $(a).attr('data-date'); first = $(a).attr('data-order-no');
next = $(b).attr('data-date'); next = $(b).attr('data-order-no');
console.log(first);
console.log("hi")
console.log(next);
return parseInt(next.substring(4, 16)) - parseInt(first.substring(4, 16)); return parseInt(next.substring(4, 16)) - parseInt(first.substring(4, 16));
}); });
$("#oqs_container").html(SortListDivs); $("#oqs_container").html(SortListDivs);

File diff suppressed because one or more lines are too long

1312
app/assets/plugins/jquery-ui/jquery-ui.css vendored Normal file

File diff suppressed because it is too large Load Diff

18706
app/assets/plugins/jquery-ui/jquery-ui.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,886 @@
/*!
* jQuery UI CSS Framework 1.12.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/theming/
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden {
display: none;
}
.ui-helper-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.ui-helper-reset {
margin: 0;
padding: 0;
border: 0;
outline: 0;
line-height: 1.3;
text-decoration: none;
font-size: 100%;
list-style: none;
}
.ui-helper-clearfix:before,
.ui-helper-clearfix:after {
content: "";
display: table;
border-collapse: collapse;
}
.ui-helper-clearfix:after {
clear: both;
}
.ui-helper-zfix {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
opacity: 0;
filter:Alpha(Opacity=0); /* support: IE8 */
}
.ui-front {
z-index: 100;
}
/* Interaction Cues
----------------------------------*/
.ui-state-disabled {
cursor: default !important;
pointer-events: none;
}
/* Icons
----------------------------------*/
.ui-icon {
display: inline-block;
vertical-align: middle;
margin-top: -.25em;
position: relative;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
}
.ui-widget-icon-block {
left: 50%;
margin-left: -8px;
display: block;
}
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ui-accordion .ui-accordion-header {
display: block;
cursor: pointer;
position: relative;
margin: 2px 0 0 0;
padding: .5em .5em .5em .7em;
font-size: 100%;
}
.ui-accordion .ui-accordion-content {
padding: 1em 2.2em;
border-top: 0;
overflow: auto;
}
.ui-autocomplete {
position: absolute;
top: 0;
left: 0;
cursor: default;
}
.ui-menu {
list-style: none;
padding: 0;
margin: 0;
display: block;
outline: 0;
}
.ui-menu .ui-menu {
position: absolute;
}
.ui-menu .ui-menu-item {
margin: 0;
cursor: pointer;
/* support: IE10, see #8844 */
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
}
.ui-menu .ui-menu-item-wrapper {
position: relative;
padding: 3px 1em 3px .4em;
}
.ui-menu .ui-menu-divider {
margin: 5px 0;
height: 0;
font-size: 0;
line-height: 0;
border-width: 1px 0 0 0;
}
.ui-menu .ui-state-focus,
.ui-menu .ui-state-active {
margin: -1px;
}
/* icon support */
.ui-menu-icons {
position: relative;
}
.ui-menu-icons .ui-menu-item-wrapper {
padding-left: 2em;
}
/* left-aligned */
.ui-menu .ui-icon {
position: absolute;
top: 0;
bottom: 0;
left: .2em;
margin: auto 0;
}
/* right-aligned */
.ui-menu .ui-menu-icon {
left: auto;
right: 0;
}
.ui-button {
padding: .4em 1em;
display: inline-block;
position: relative;
line-height: normal;
margin-right: .1em;
cursor: pointer;
vertical-align: middle;
text-align: center;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
/* Support: IE <= 11 */
overflow: visible;
}
.ui-button,
.ui-button:link,
.ui-button:visited,
.ui-button:hover,
.ui-button:active {
text-decoration: none;
}
/* to make room for the icon, a width needs to be set here */
.ui-button-icon-only {
width: 2em;
box-sizing: border-box;
text-indent: -9999px;
white-space: nowrap;
}
/* no icon support for input elements */
input.ui-button.ui-button-icon-only {
text-indent: 0;
}
/* button icon element(s) */
.ui-button-icon-only .ui-icon {
position: absolute;
top: 50%;
left: 50%;
margin-top: -8px;
margin-left: -8px;
}
.ui-button.ui-icon-notext .ui-icon {
padding: 0;
width: 2.1em;
height: 2.1em;
text-indent: -9999px;
white-space: nowrap;
}
input.ui-button.ui-icon-notext .ui-icon {
width: auto;
height: auto;
text-indent: 0;
white-space: normal;
padding: .4em 1em;
}
/* workarounds */
/* Support: Firefox 5 - 40 */
input.ui-button::-moz-focus-inner,
button.ui-button::-moz-focus-inner {
border: 0;
padding: 0;
}
.ui-controlgroup {
vertical-align: middle;
display: inline-block;
}
.ui-controlgroup > .ui-controlgroup-item {
float: left;
margin-left: 0;
margin-right: 0;
}
.ui-controlgroup > .ui-controlgroup-item:focus,
.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus {
z-index: 9999;
}
.ui-controlgroup-vertical > .ui-controlgroup-item {
display: block;
float: none;
width: 100%;
margin-top: 0;
margin-bottom: 0;
text-align: left;
}
.ui-controlgroup-vertical .ui-controlgroup-item {
box-sizing: border-box;
}
.ui-controlgroup .ui-controlgroup-label {
padding: .4em 1em;
}
.ui-controlgroup .ui-controlgroup-label span {
font-size: 80%;
}
.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item {
border-left: none;
}
.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item {
border-top: none;
}
.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content {
border-right: none;
}
.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content {
border-bottom: none;
}
/* Spinner specific style fixes */
.ui-controlgroup-vertical .ui-spinner-input {
/* Support: IE8 only, Android < 4.4 only */
width: 75%;
width: calc( 100% - 2.4em );
}
.ui-controlgroup-vertical .ui-spinner .ui-spinner-up {
border-top-style: solid;
}
.ui-checkboxradio-label .ui-icon-background {
box-shadow: inset 1px 1px 1px #ccc;
border-radius: .12em;
border: none;
}
.ui-checkboxradio-radio-label .ui-icon-background {
width: 16px;
height: 16px;
border-radius: 1em;
overflow: visible;
border: none;
}
.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,
.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon {
background-image: none;
width: 8px;
height: 8px;
border-width: 4px;
border-style: solid;
}
.ui-checkboxradio-disabled {
pointer-events: none;
}
.ui-datepicker {
width: 17em;
padding: .2em .2em 0;
display: none;
}
.ui-datepicker .ui-datepicker-header {
position: relative;
padding: .2em 0;
}
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
position: absolute;
top: 2px;
width: 1.8em;
height: 1.8em;
}
.ui-datepicker .ui-datepicker-prev-hover,
.ui-datepicker .ui-datepicker-next-hover {
top: 1px;
}
.ui-datepicker .ui-datepicker-prev {
left: 2px;
}
.ui-datepicker .ui-datepicker-next {
right: 2px;
}
.ui-datepicker .ui-datepicker-prev-hover {
left: 1px;
}
.ui-datepicker .ui-datepicker-next-hover {
right: 1px;
}
.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
display: block;
position: absolute;
left: 50%;
margin-left: -8px;
top: 50%;
margin-top: -8px;
}
.ui-datepicker .ui-datepicker-title {
margin: 0 2.3em;
line-height: 1.8em;
text-align: center;
}
.ui-datepicker .ui-datepicker-title select {
font-size: 1em;
margin: 1px 0;
}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
width: 45%;
}
.ui-datepicker table {
width: 100%;
font-size: .9em;
border-collapse: collapse;
margin: 0 0 .4em;
}
.ui-datepicker th {
padding: .7em .3em;
text-align: center;
font-weight: bold;
border: 0;
}
.ui-datepicker td {
border: 0;
padding: 1px;
}
.ui-datepicker td span,
.ui-datepicker td a {
display: block;
padding: .2em;
text-align: right;
text-decoration: none;
}
.ui-datepicker .ui-datepicker-buttonpane {
background-image: none;
margin: .7em 0 0 0;
padding: 0 .2em;
border-left: 0;
border-right: 0;
border-bottom: 0;
}
.ui-datepicker .ui-datepicker-buttonpane button {
float: right;
margin: .5em .2em .4em;
cursor: pointer;
padding: .2em .6em .3em .6em;
width: auto;
overflow: visible;
}
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
float: left;
}
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi {
width: auto;
}
.ui-datepicker-multi .ui-datepicker-group {
float: left;
}
.ui-datepicker-multi .ui-datepicker-group table {
width: 95%;
margin: 0 auto .4em;
}
.ui-datepicker-multi-2 .ui-datepicker-group {
width: 50%;
}
.ui-datepicker-multi-3 .ui-datepicker-group {
width: 33.3%;
}
.ui-datepicker-multi-4 .ui-datepicker-group {
width: 25%;
}
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
border-left-width: 0;
}
.ui-datepicker-multi .ui-datepicker-buttonpane {
clear: left;
}
.ui-datepicker-row-break {
clear: both;
width: 100%;
font-size: 0;
}
/* RTL support */
.ui-datepicker-rtl {
direction: rtl;
}
.ui-datepicker-rtl .ui-datepicker-prev {
right: 2px;
left: auto;
}
.ui-datepicker-rtl .ui-datepicker-next {
left: 2px;
right: auto;
}
.ui-datepicker-rtl .ui-datepicker-prev:hover {
right: 1px;
left: auto;
}
.ui-datepicker-rtl .ui-datepicker-next:hover {
left: 1px;
right: auto;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane {
clear: right;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
float: left;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
.ui-datepicker-rtl .ui-datepicker-group {
float: right;
}
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
border-right-width: 0;
border-left-width: 1px;
}
/* Icons */
.ui-datepicker .ui-icon {
display: block;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
left: .5em;
top: .3em;
}
.ui-dialog {
position: absolute;
top: 0;
left: 0;
padding: .2em;
outline: 0;
}
.ui-dialog .ui-dialog-titlebar {
padding: .4em 1em;
position: relative;
}
.ui-dialog .ui-dialog-title {
float: left;
margin: .1em 0;
white-space: nowrap;
width: 90%;
overflow: hidden;
text-overflow: ellipsis;
}
.ui-dialog .ui-dialog-titlebar-close {
position: absolute;
right: .3em;
top: 50%;
width: 20px;
margin: -10px 0 0 0;
padding: 1px;
height: 20px;
}
.ui-dialog .ui-dialog-content {
position: relative;
border: 0;
padding: .5em 1em;
background: none;
overflow: auto;
}
.ui-dialog .ui-dialog-buttonpane {
text-align: left;
border-width: 1px 0 0 0;
background-image: none;
margin-top: .5em;
padding: .3em 1em .5em .4em;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
float: right;
}
.ui-dialog .ui-dialog-buttonpane button {
margin: .5em .4em .5em 0;
cursor: pointer;
}
.ui-dialog .ui-resizable-n {
height: 2px;
top: 0;
}
.ui-dialog .ui-resizable-e {
width: 2px;
right: 0;
}
.ui-dialog .ui-resizable-s {
height: 2px;
bottom: 0;
}
.ui-dialog .ui-resizable-w {
width: 2px;
left: 0;
}
.ui-dialog .ui-resizable-se,
.ui-dialog .ui-resizable-sw,
.ui-dialog .ui-resizable-ne,
.ui-dialog .ui-resizable-nw {
width: 7px;
height: 7px;
}
.ui-dialog .ui-resizable-se {
right: 0;
bottom: 0;
}
.ui-dialog .ui-resizable-sw {
left: 0;
bottom: 0;
}
.ui-dialog .ui-resizable-ne {
right: 0;
top: 0;
}
.ui-dialog .ui-resizable-nw {
left: 0;
top: 0;
}
.ui-draggable .ui-dialog-titlebar {
cursor: move;
}
.ui-draggable-handle {
-ms-touch-action: none;
touch-action: none;
}
.ui-resizable {
position: relative;
}
.ui-resizable-handle {
position: absolute;
font-size: 0.1px;
display: block;
-ms-touch-action: none;
touch-action: none;
}
.ui-resizable-disabled .ui-resizable-handle,
.ui-resizable-autohide .ui-resizable-handle {
display: none;
}
.ui-resizable-n {
cursor: n-resize;
height: 7px;
width: 100%;
top: -5px;
left: 0;
}
.ui-resizable-s {
cursor: s-resize;
height: 7px;
width: 100%;
bottom: -5px;
left: 0;
}
.ui-resizable-e {
cursor: e-resize;
width: 7px;
right: -5px;
top: 0;
height: 100%;
}
.ui-resizable-w {
cursor: w-resize;
width: 7px;
left: -5px;
top: 0;
height: 100%;
}
.ui-resizable-se {
cursor: se-resize;
width: 12px;
height: 12px;
right: 1px;
bottom: 1px;
}
.ui-resizable-sw {
cursor: sw-resize;
width: 9px;
height: 9px;
left: -5px;
bottom: -5px;
}
.ui-resizable-nw {
cursor: nw-resize;
width: 9px;
height: 9px;
left: -5px;
top: -5px;
}
.ui-resizable-ne {
cursor: ne-resize;
width: 9px;
height: 9px;
right: -5px;
top: -5px;
}
.ui-progressbar {
height: 2em;
text-align: left;
overflow: hidden;
}
.ui-progressbar .ui-progressbar-value {
margin: -1px;
height: 100%;
}
.ui-progressbar .ui-progressbar-overlay {
background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
height: 100%;
filter: alpha(opacity=25); /* support: IE8 */
opacity: 0.25;
}
.ui-progressbar-indeterminate .ui-progressbar-value {
background-image: none;
}
.ui-selectable {
-ms-touch-action: none;
touch-action: none;
}
.ui-selectable-helper {
position: absolute;
z-index: 100;
border: 1px dotted black;
}
.ui-selectmenu-menu {
padding: 0;
margin: 0;
position: absolute;
top: 0;
left: 0;
display: none;
}
.ui-selectmenu-menu .ui-menu {
overflow: auto;
overflow-x: hidden;
padding-bottom: 1px;
}
.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
font-size: 1em;
font-weight: bold;
line-height: 1.5;
padding: 2px 0.4em;
margin: 0.5em 0 0 0;
height: auto;
border: 0;
}
.ui-selectmenu-open {
display: block;
}
.ui-selectmenu-text {
display: block;
margin-right: 20px;
overflow: hidden;
text-overflow: ellipsis;
}
.ui-selectmenu-button.ui-button {
text-align: left;
white-space: nowrap;
width: 14em;
}
.ui-selectmenu-icon.ui-icon {
float: right;
margin-top: 0;
}
.ui-slider {
position: relative;
text-align: left;
}
.ui-slider .ui-slider-handle {
position: absolute;
z-index: 2;
width: 1.2em;
height: 1.2em;
cursor: default;
-ms-touch-action: none;
touch-action: none;
}
.ui-slider .ui-slider-range {
position: absolute;
z-index: 1;
font-size: .7em;
display: block;
border: 0;
background-position: 0 0;
}
/* support: IE8 - See #6727 */
.ui-slider.ui-state-disabled .ui-slider-handle,
.ui-slider.ui-state-disabled .ui-slider-range {
filter: inherit;
}
.ui-slider-horizontal {
height: .8em;
}
.ui-slider-horizontal .ui-slider-handle {
top: -.3em;
margin-left: -.6em;
}
.ui-slider-horizontal .ui-slider-range {
top: 0;
height: 100%;
}
.ui-slider-horizontal .ui-slider-range-min {
left: 0;
}
.ui-slider-horizontal .ui-slider-range-max {
right: 0;
}
.ui-slider-vertical {
width: .8em;
height: 100px;
}
.ui-slider-vertical .ui-slider-handle {
left: -.3em;
margin-left: 0;
margin-bottom: -.6em;
}
.ui-slider-vertical .ui-slider-range {
left: 0;
width: 100%;
}
.ui-slider-vertical .ui-slider-range-min {
bottom: 0;
}
.ui-slider-vertical .ui-slider-range-max {
top: 0;
}
.ui-sortable-handle {
-ms-touch-action: none;
touch-action: none;
}
.ui-spinner {
position: relative;
display: inline-block;
overflow: hidden;
padding: 0;
vertical-align: middle;
}
.ui-spinner-input {
border: none;
background: none;
color: inherit;
padding: .222em 0;
margin: .2em 0;
vertical-align: middle;
margin-left: .4em;
margin-right: 2em;
}
.ui-spinner-button {
width: 1.6em;
height: 50%;
font-size: .5em;
padding: 0;
margin: 0;
text-align: center;
position: absolute;
cursor: default;
display: block;
overflow: hidden;
right: 0;
}
/* more specificity required here to override default borders */
.ui-spinner a.ui-spinner-button {
border-top-style: none;
border-bottom-style: none;
border-right-style: none;
}
.ui-spinner-up {
top: 0;
}
.ui-spinner-down {
bottom: 0;
}
.ui-tabs {
position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
padding: .2em;
}
.ui-tabs .ui-tabs-nav {
margin: 0;
padding: .2em .2em 0;
}
.ui-tabs .ui-tabs-nav li {
list-style: none;
float: left;
position: relative;
top: 0;
margin: 1px .2em 0 0;
border-bottom-width: 0;
padding: 0;
white-space: nowrap;
}
.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
float: left;
padding: .5em 1em;
text-decoration: none;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
margin-bottom: -1px;
padding-bottom: 1px;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
cursor: text;
}
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
cursor: pointer;
}
.ui-tabs .ui-tabs-panel {
display: block;
border-width: 0;
padding: 1em 1.4em;
background: none;
}
.ui-tooltip {
padding: 8px;
position: absolute;
z-index: 9999;
max-width: 300px;
}
body .ui-tooltip {
border-width: 2px;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,443 @@
/*!
* jQuery UI CSS Framework 1.12.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/theming/
*
* To view and modify this theme, visit http://jqueryui.com/themeroller/?bgShadowXPos=&bgOverlayXPos=&bgErrorXPos=&bgHighlightXPos=&bgContentXPos=&bgHeaderXPos=&bgActiveXPos=&bgHoverXPos=&bgDefaultXPos=&bgShadowYPos=&bgOverlayYPos=&bgErrorYPos=&bgHighlightYPos=&bgContentYPos=&bgHeaderYPos=&bgActiveYPos=&bgHoverYPos=&bgDefaultYPos=&bgShadowRepeat=&bgOverlayRepeat=&bgErrorRepeat=&bgHighlightRepeat=&bgContentRepeat=&bgHeaderRepeat=&bgActiveRepeat=&bgHoverRepeat=&bgDefaultRepeat=&iconsHover=url(%22images%2Fui-icons_555555_256x240.png%22)&iconsHighlight=url(%22images%2Fui-icons_777620_256x240.png%22)&iconsHeader=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsError=url(%22images%2Fui-icons_cc0000_256x240.png%22)&iconsDefault=url(%22images%2Fui-icons_777777_256x240.png%22)&iconsContent=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsActive=url(%22images%2Fui-icons_ffffff_256x240.png%22)&bgImgUrlShadow=&bgImgUrlOverlay=&bgImgUrlHover=&bgImgUrlHighlight=&bgImgUrlHeader=&bgImgUrlError=&bgImgUrlDefault=&bgImgUrlContent=&bgImgUrlActive=&opacityFilterShadow=Alpha(Opacity%3D30)&opacityFilterOverlay=Alpha(Opacity%3D30)&opacityShadowPerc=30&opacityOverlayPerc=30&iconColorHover=%23555555&iconColorHighlight=%23777620&iconColorHeader=%23444444&iconColorError=%23cc0000&iconColorDefault=%23777777&iconColorContent=%23444444&iconColorActive=%23ffffff&bgImgOpacityShadow=0&bgImgOpacityOverlay=0&bgImgOpacityError=95&bgImgOpacityHighlight=55&bgImgOpacityContent=75&bgImgOpacityHeader=75&bgImgOpacityActive=65&bgImgOpacityHover=75&bgImgOpacityDefault=75&bgTextureShadow=flat&bgTextureOverlay=flat&bgTextureError=flat&bgTextureHighlight=flat&bgTextureContent=flat&bgTextureHeader=flat&bgTextureActive=flat&bgTextureHover=flat&bgTextureDefault=flat&cornerRadius=3px&fwDefault=normal&ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&cornerRadiusShadow=8px&thicknessShadow=5px&offsetLeftShadow=0px&offsetTopShadow=0px&opacityShadow=.3&bgColorShadow=%23666666&opacityOverlay=.3&bgColorOverlay=%23aaaaaa&fcError=%235f3f3f&borderColorError=%23f1a899&bgColorError=%23fddfdf&fcHighlight=%23777620&borderColorHighlight=%23dad55e&bgColorHighlight=%23fffa90&fcContent=%23333333&borderColorContent=%23dddddd&bgColorContent=%23ffffff&fcHeader=%23333333&borderColorHeader=%23dddddd&bgColorHeader=%23e9e9e9&fcActive=%23ffffff&borderColorActive=%23003eff&bgColorActive=%23007fff&fcHover=%232b2b2b&borderColorHover=%23cccccc&bgColorHover=%23ededed&fcDefault=%23454545&borderColorDefault=%23c5c5c5&bgColorDefault=%23f6f6f6
*/
/* Component containers
----------------------------------*/
.ui-widget {
font-family: Arial,Helvetica,sans-serif;
font-size: 1em;
}
.ui-widget .ui-widget {
font-size: 1em;
}
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
font-family: Arial,Helvetica,sans-serif;
font-size: 1em;
}
.ui-widget.ui-widget-content {
border: 1px solid #c5c5c5;
}
.ui-widget-content {
border: 1px solid #dddddd;
background: #ffffff;
color: #333333;
}
.ui-widget-content a {
color: #333333;
}
.ui-widget-header {
border: 1px solid #dddddd;
background: #e9e9e9;
color: #333333;
font-weight: bold;
}
.ui-widget-header a {
color: #333333;
}
/* Interaction states
----------------------------------*/
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default,
.ui-button,
/* We use html here because we need a greater specificity to make sure disabled
works properly when clicked or hovered */
html .ui-button.ui-state-disabled:hover,
html .ui-button.ui-state-disabled:active {
border: 1px solid #c5c5c5;
background: #f6f6f6;
font-weight: normal;
color: #454545;
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited,
a.ui-button,
a:link.ui-button,
a:visited.ui-button,
.ui-button {
color: #454545;
text-decoration: none;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus,
.ui-button:hover,
.ui-button:focus {
border: 1px solid #cccccc;
background: #ededed;
font-weight: normal;
color: #2b2b2b;
}
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
.ui-state-hover a:visited,
.ui-state-focus a,
.ui-state-focus a:hover,
.ui-state-focus a:link,
.ui-state-focus a:visited,
a.ui-button:hover,
a.ui-button:focus {
color: #2b2b2b;
text-decoration: none;
}
.ui-visual-focus {
box-shadow: 0 0 3px 1px rgb(94, 158, 214);
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
a.ui-button:active,
.ui-button:active,
.ui-button.ui-state-active:hover {
border: 1px solid #003eff;
background: #007fff;
font-weight: normal;
color: #ffffff;
}
.ui-icon-background,
.ui-state-active .ui-icon-background {
border: #003eff;
background-color: #ffffff;
}
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
color: #ffffff;
text-decoration: none;
}
/* Interaction Cues
----------------------------------*/
.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
border: 1px solid #dad55e;
background: #fffa90;
color: #777620;
}
.ui-state-checked {
border: 1px solid #dad55e;
background: #fffa90;
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a {
color: #777620;
}
.ui-state-error,
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
border: 1px solid #f1a899;
background: #fddfdf;
color: #5f3f3f;
}
.ui-state-error a,
.ui-widget-content .ui-state-error a,
.ui-widget-header .ui-state-error a {
color: #5f3f3f;
}
.ui-state-error-text,
.ui-widget-content .ui-state-error-text,
.ui-widget-header .ui-state-error-text {
color: #5f3f3f;
}
.ui-priority-primary,
.ui-widget-content .ui-priority-primary,
.ui-widget-header .ui-priority-primary {
font-weight: bold;
}
.ui-priority-secondary,
.ui-widget-content .ui-priority-secondary,
.ui-widget-header .ui-priority-secondary {
opacity: .7;
filter:Alpha(Opacity=70); /* support: IE8 */
font-weight: normal;
}
.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
opacity: .35;
filter:Alpha(Opacity=35); /* support: IE8 */
background-image: none;
}
.ui-state-disabled .ui-icon {
filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
width: 16px;
height: 16px;
}
.ui-icon,
.ui-widget-content .ui-icon {
background-image: url("images/ui-icons_444444_256x240.png");
}
.ui-widget-header .ui-icon {
background-image: url("images/ui-icons_444444_256x240.png");
}
.ui-state-hover .ui-icon,
.ui-state-focus .ui-icon,
.ui-button:hover .ui-icon,
.ui-button:focus .ui-icon {
background-image: url("images/ui-icons_555555_256x240.png");
}
.ui-state-active .ui-icon,
.ui-button:active .ui-icon {
background-image: url("images/ui-icons_ffffff_256x240.png");
}
.ui-state-highlight .ui-icon,
.ui-button .ui-state-highlight.ui-icon {
background-image: url("images/ui-icons_777620_256x240.png");
}
.ui-state-error .ui-icon,
.ui-state-error-text .ui-icon {
background-image: url("images/ui-icons_cc0000_256x240.png");
}
.ui-button .ui-icon {
background-image: url("images/ui-icons_777777_256x240.png");
}
/* positioning */
.ui-icon-blank { background-position: 16px 16px; }
.ui-icon-caret-1-n { background-position: 0 0; }
.ui-icon-caret-1-ne { background-position: -16px 0; }
.ui-icon-caret-1-e { background-position: -32px 0; }
.ui-icon-caret-1-se { background-position: -48px 0; }
.ui-icon-caret-1-s { background-position: -65px 0; }
.ui-icon-caret-1-sw { background-position: -80px 0; }
.ui-icon-caret-1-w { background-position: -96px 0; }
.ui-icon-caret-1-nw { background-position: -112px 0; }
.ui-icon-caret-2-n-s { background-position: -128px 0; }
.ui-icon-caret-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -65px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -65px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 1px -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-on { background-position: -96px -144px; }
.ui-icon-radio-off { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-all,
.ui-corner-top,
.ui-corner-left,
.ui-corner-tl {
border-top-left-radius: 3px;
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-right,
.ui-corner-tr {
border-top-right-radius: 3px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-left,
.ui-corner-bl {
border-bottom-left-radius: 3px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br {
border-bottom-right-radius: 3px;
}
/* Overlays */
.ui-widget-overlay {
background: #aaaaaa;
opacity: .003;
filter: Alpha(Opacity=.3); /* support: IE8 */
}
.ui-widget-shadow {
-webkit-box-shadow: 0px 0px 5px #666666;
box-shadow: 0px 0px 5px #666666;
}

File diff suppressed because one or more lines are too long

View File

@@ -6,6 +6,9 @@
@import "sweetalert/sweetalert.css"; @import "sweetalert/sweetalert.css";
@import "multi-select/css/multi-select.css"; @import "multi-select/css/multi-select.css";
@import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker"; @import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker";
@import "jquery-ui/jquery-ui.css";
@import "jquery-ui/jquery-ui.structure.css";
@import "jquery-ui/jquery-ui.theme.css";
@import "morrisjs/morris"; @import "morrisjs/morris";
@import "BSBMaterial/style"; @import "BSBMaterial/style";
@import "BSBMaterial/themes/all-themes"; @import "BSBMaterial/themes/all-themes";
@@ -117,3 +120,32 @@
.bottom{ .bottom{
margin-bottom:1px; margin-bottom:1px;
} }
/*Pagination*/
nav.pagination {
margin:10px;
}
nav.pagination .current{
background-color:#1f91f3;
color:#fff;
padding:4px 10px;
margin-top:-4px;
}
nav.pagination .page a,.next a,.last a,.prev a,.first a{
padding:6.5px 10px;
margin-left: 3px;
}
nav.pagination .page a:hover,
a:focus {
background-color: #ccc;
text-decoration: none;
}
nav.pagination .page a:hover,
.first a:hover,.last a:hover,.prev a:hover,.next a:hover{
background-color: #ccc;
text-decoration: none;
}

View File

@@ -59,11 +59,13 @@ select.form-control {
padding: 0px 0px 7px 0px; padding: 0px 0px 7px 0px;
} }
/*
.order-info { .order-info {
min-height:300px; min-height:300px;
max-height:500px; max-height:500px;
overflow:auto overflow:auto
} }
*/
.others-payment{ .others-payment{
line-height:100px; line-height:100px;

View File

@@ -33,12 +33,14 @@ class Crm::CustomersController < BaseCrmController
end end
end end
end end
@crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(15) @crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(20)
@crm_customer = Customer.new @crm_customer = Customer.new
@count_customer = Customer.count_customer @count_customer = Customer.count_customer
@taxes = TaxProfile.all.order("order_by asc") @taxes = TaxProfile.all.order("order_by asc")
@filter = filter
# if flash["errors"] # if flash["errors"]
# @crm_customer.valid? # @crm_customer.valid?
# end # end

View File

@@ -8,6 +8,17 @@ class Crm::DiningQueuesController < BaseCrmController
today = DateTime.now.strftime('%Y-%m-%d') today = DateTime.now.strftime('%Y-%m-%d')
@dining_queues = DiningQueue.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and status is NULL ", today).order("queue_no asc") @dining_queues = DiningQueue.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and status is NULL ", today).order("queue_no asc")
@complete_queue = DiningQueue.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and status = 'Assign' ", today).order("queue_no asc") @complete_queue = DiningQueue.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and status = 'Assign' ", today).order("queue_no asc")
if params[:term]
@customer = Customer.order(:name).where('lower(name) LIKE ?', "%#{params[:term].downcase}%")
else
@customer = Customer.all
end
respond_to do |format|
format.html
format.json { render :json => @customer.to_json }
end
end end
# GET /crm/dining_queues/1 # GET /crm/dining_queues/1
@@ -28,6 +39,7 @@ class Crm::DiningQueuesController < BaseCrmController
# POST /crm/dining_queues # POST /crm/dining_queues
# POST /crm/dining_queues.json # POST /crm/dining_queues.json
def create def create
puts dining_queue_params
@dining_queue = DiningQueue.new(dining_queue_params) @dining_queue = DiningQueue.new(dining_queue_params)
respond_to do |format| respond_to do |format|
@@ -128,6 +140,6 @@ class Crm::DiningQueuesController < BaseCrmController
# Never trust parameters from the scary internet, only allow the white list through. # Never trust parameters from the scary internet, only allow the white list through.
def dining_queue_params def dining_queue_params
params.require(:dining_queue).permit(:name, :contact_no, :queue_no,:status,:seater,:remark) params.require(:dining_queue).permit(:customer_id, :name, :contact_no, :queue_no,:status,:seater,:remark)
end end
end end

View File

@@ -45,7 +45,7 @@ class HomeController < ApplicationController
elsif @employee.role == "manager" elsif @employee.role == "manager"
session[:session_token] = @employee.token_session session[:session_token] = @employee.token_session
redirect_to dashboard_path redirect_to dashboard_path
elsif @employee.role == "supervisour" elsif @employee.role == "supervisor"
session[:session_token] = @employee.token_session session[:session_token] = @employee.token_session
redirect_to origami_root_path redirect_to origami_root_path
elsif @employee.role == "account" elsif @employee.role == "account"
@@ -82,6 +82,7 @@ class HomeController < ApplicationController
@sale_data = Array.new @sale_data = Array.new
@total_payment_methods = Sale.total_payment_methods(today) @total_payment_methods = Sale.total_payment_methods(today)
@total_payment_methods.each do |payment| @total_payment_methods.each do |payment|
if payment.payment_method == "mpu" || payment.payment_method == "visa" || payment.payment_method == "master" || payment.payment_method == "jcb" if payment.payment_method == "mpu" || payment.payment_method == "visa" || payment.payment_method == "master" || payment.payment_method == "jcb"
pay = Sale.payment_sale('card', today) pay = Sale.payment_sale('card', today)
@@ -92,7 +93,6 @@ class HomeController < ApplicationController
end end
end end
@summ_sale = Sale.summary_sale_receipt(today) @summ_sale = Sale.summary_sale_receipt(today)
p @summ_sale
@total_customer = Sale.total_customer(today) @total_customer = Sale.total_customer(today)
@total_dinein = Sale.total_dinein(today) @total_dinein = Sale.total_dinein(today)
@total_takeaway = Sale.total_takeaway(today) @total_takeaway = Sale.total_takeaway(today)
@@ -151,7 +151,7 @@ class HomeController < ApplicationController
redirect_to oqs_root_path redirect_to oqs_root_path
elsif employee.role == "crm" elsif employee.role == "crm"
redirect_to crm_root_path redirect_to crm_root_path
elsif @employee.role == "supervisour" elsif @employee.role == "supervisor"
redirect_to origami_root_path redirect_to origami_root_path
elsif @employee.role == "account" elsif @employee.role == "account"
redirect_to reports_dailysale_index_path redirect_to reports_dailysale_index_path

View File

@@ -44,9 +44,9 @@ class Oqs::HomeController < BaseOqsController
# Get Order items # Get Order items
def get_order_items def get_order_items
items = [] items = []
table_name = params[:table_id] order_no = params[:order_no]
status = params[:status] status = params[:status]
dining = DiningFacility.find_by_name(table_name); # dining = DiningFacility.find_by_name(table_name);
# oqpz = OrderQueueProcessByZone.find_by_zone_id(dining.zone_id) # oqpz = OrderQueueProcessByZone.find_by_zone_id(dining.zone_id)
# if status == "" # if status == ""
# AssignedOrderItem.where("order_queue_station_id=#{ oqpz.order_queue_station_id } AND delivery_status=0").find_each do |aoi| # AssignedOrderItem.where("order_queue_station_id=#{ oqpz.order_queue_station_id } AND delivery_status=0").find_each do |aoi|
@@ -60,22 +60,18 @@ class Oqs::HomeController < BaseOqsController
# end # end
# end # end
booking = Booking.find_by_dining_facility_id(dining.id) # booking = Booking.find_by_dining_facility_id(dining.id)
BookingOrder.where("booking_id='#{ booking.booking_id }'").find_each do |bo| # BookingOrder.where("booking_id='#{ booking.booking_id }'").find_each do |bo|
order=Order.find(bo.order_id) # order=Order.find(bo.order_id)
order.order_items.each do |oi|
items.push(oi)
end
end
# booking_id = dining.get_new_booking
# BookingOrder.where("booking_id='#{ booking_id }'").find_each do |bo|
# order=Order.find(bo.order_id);
# order.order_items.each do |oi| # order.order_items.each do |oi|
# items.push(oi) # items.push(oi)
# end # end
# end # end
OrderItem.where("order_id='#{ order_no }'").find_each do |oi|
items.push(oi)
end
render :json => items.to_json render :json => items.to_json
end end
@@ -129,10 +125,10 @@ class Oqs::HomeController < BaseOqsController
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
left join bookings as bk on bk.booking_id = bo.booking_id left join bookings as bk on bk.booking_id = bo.booking_id
left join dining_facilities as df on df.id = bk.dining_facility_id") left join dining_facilities as df on df.id = bk.dining_facility_id")
.where("assigned_order_items.delivery_status = #{status} AND odt.price <> 0 AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' #{oqs} ") .where("assigned_order_items.delivery_status = #{status} AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' #{oqs} ")
query = query.where("df.name LIKE ? OR odt.order_id LIKE ? OR odt.item_name LIKE ? OR cus.name = '#{filter}'","%#{filter}%","%#{filter}%","%#{filter}%",) query = query.where("df.name LIKE ? OR odt.order_id LIKE ? OR odt.item_name LIKE ? OR cus.name = '#{filter}'","%#{filter}%","%#{filter}%","%#{filter}%",)
.order("assigned_order_items.assigned_order_item_id desc") .order("assigned_order_items.assigned_order_item_id desc")
.group("assigned_order_items.assigned_order_item_id") .group("odt.order_items_id")
end end
@@ -147,7 +143,7 @@ class Oqs::HomeController < BaseOqsController
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
left join bookings as bk on bk.booking_id = bo.booking_id left join bookings as bk on bk.booking_id = bo.booking_id
left join dining_facilities as df on df.id = bk.dining_facility_id") left join dining_facilities as df on df.id = bk.dining_facility_id")
.where("assigned_order_items.delivery_status = true AND odt.price <> 0 AND assigned_order_items.created_at between '#{Time.now.beginning_of_day.utc}' and '#{Time.now.end_of_day.utc}'") .where("assigned_order_items.delivery_status = true AND assigned_order_items.created_at between '#{Time.now.beginning_of_day.utc}' and '#{Time.now.end_of_day.utc}'")
query = query.where("df.name LIKE ? OR odt.order_id LIKE ? OR odt.item_name LIKE ? OR cus.name = '#{filter}'","%#{filter}%","%#{filter}%","%#{filter}%",) query = query.where("df.name LIKE ? OR odt.order_id LIKE ? OR odt.item_name LIKE ? OR cus.name = '#{filter}'","%#{filter}%","%#{filter}%","%#{filter}%",)
.group("assigned_order_items.order_id") .group("assigned_order_items.order_id")
.limit(20) .limit(20)
@@ -166,7 +162,7 @@ class Oqs::HomeController < BaseOqsController
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
left join bookings as bk on bk.booking_id = bo.booking_id left join bookings as bk on bk.booking_id = bo.booking_id
left join dining_facilities as df on df.id = bk.dining_facility_id") left join dining_facilities as df on df.id = bk.dining_facility_id")
.where("assigned_order_items.delivery_status = #{status} AND odt.price <> 0 AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' ") .where("assigned_order_items.delivery_status = #{status} AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' ")
query = query.where("df.name LIKE ? OR odt.order_id LIKE ? OR odt.item_name LIKE ? OR cus.name = '#{filter}'","%#{filter}%","%#{filter}%","%#{filter}%",) query = query.where("df.name LIKE ? OR odt.order_id LIKE ? OR odt.item_name LIKE ? OR cus.name = '#{filter}'","%#{filter}%","%#{filter}%","%#{filter}%",)
.group("oqs.id") .group("oqs.id")

View File

@@ -16,7 +16,7 @@ class Oqs::PrintController < ApplicationController
# print when complete click # print when complete click
print_settings = PrintSetting.find_by_unique_code(unique_code) print_settings = PrintSetting.find_by_unique_code(unique_code)
order_queue_printer = Printer::OrderQueuePrinter.new(print_settings) order_queue_printer = Printer::OrderQueuePrinter.new(print_settings)
order_queue_printer.print_order_item(print_settings,oqs, assigned_item.order_id, assigned_item.item_code, print_status, options ) order_queue_printer.print_order_item(print_settings,oqs, assigned_item.order_id, assigned_item.instance_code, print_status, options )
# update print status for completed same order items # update print status for completed same order items
assigned_items.each do |ai| assigned_items.each do |ai|
@@ -40,13 +40,16 @@ class Oqs::PrintController < ApplicationController
print_status = assigned_item.print_status == true ? " (Re-Print)" : "" print_status = assigned_item.print_status == true ? " (Re-Print)" : ""
# get dining # get dining
dining = DiningFacility.find_by_name(table_name); # dining = DiningFacility.find_by_name(table_name);
booking = Booking.find_by_dining_facility_id(dining.id) # booking = Booking.find_by_dining_facility_id(dining.id)
# Get Booking ID
booking_id = BookingOrder.where("order_id='#{assigned_item.order_id}'").pluck(:booking_id)[0]
# print when complete click # print when complete click
print_settings = PrintSetting.find_by_unique_code(unique_code) print_settings = PrintSetting.find_by_unique_code(unique_code)
order_queue_printer = Printer::OrderQueuePrinter.new(print_settings) order_queue_printer = Printer::OrderQueuePrinter.new(print_settings)
order_queue_printer.print_booking_summary(print_settings,oqs, booking.booking_id, print_status) order_queue_printer.print_booking_summary(print_settings,oqs, booking_id, print_status)
# update print status for completed same order items # update print status for completed same order items
assigned_items.each do |ai| assigned_items.each do |ai|

View File

@@ -40,10 +40,10 @@ class Origami::DiscountsController < BaseOrigamiController
sale_item.product_alt_name = "" sale_item.product_alt_name = ""
sale_item.remark = "Discount" sale_item.remark = "Discount"
sale_item.qty = 1 sale_item.qty = -1
sale_item.unit_price = di["price"] sale_item.unit_price = di["price"].to_f * (-1)
sale_item.taxable_price = di["price"] sale_item.taxable_price = di["price"]
sale_item.is_taxable = 0 sale_item.is_taxable = 1
sale_item.account_id = origin_sale_item.account_id sale_item.account_id = origin_sale_item.account_id
sale_item.price = di["price"] sale_item.price = di["price"]

View File

@@ -36,11 +36,11 @@ class Origami::OtherChargesController < BaseOrigamiController
sale_item.qty = 1 sale_item.qty = 1
sale_item.unit_price = di["price"] sale_item.unit_price = di["price"]
sale_item.taxable_price = 0 sale_item.taxable_price = di["price"] * 1
sale_item.is_taxable = 0 sale_item.is_taxable = 1
sale_item.account_id = 0 sale_item.account_id = 0
sale_item.price = di["price"] sale_item.price = di["price"] * 1
sale_item.save sale_item.save
action_by = current_user.id action_by = current_user.id

View File

@@ -233,6 +233,9 @@ class Origami::PaymentsController < BaseOrigamiController
cashier_zone = CashierTerminalByZone.find_by_zone_id(table.zone_id) cashier_zone = CashierTerminalByZone.find_by_zone_id(table.zone_id)
cashier_terminal = CashierTerminal.find(cashier_zone.cashier_terminal_id) cashier_terminal = CashierTerminal.find(cashier_zone.cashier_terminal_id)
# Re-call Sale Data
saleObj = Sale.find(sale_id)
unique_code = "ReceiptBillPdf" unique_code = "ReceiptBillPdf"
customer= Customer.find(saleObj.customer_id) customer= Customer.find(saleObj.customer_id)

View File

@@ -19,6 +19,7 @@ class Origami::SaleEditController < BaseOrigamiController
@newsaleitem.qty = saleitemObj.qty * -1 @newsaleitem.qty = saleitemObj.qty * -1
@newsaleitem.price = saleitemObj.price * -1 @newsaleitem.price = saleitemObj.price * -1
@newsaleitem.is_taxable = 1 @newsaleitem.is_taxable = 1
@newsaleitem.taxable_price = saleitemObj.taxable_price * -1
@newsaleitem.product_name = saleitemObj.product_name + ' (VOID)' @newsaleitem.product_name = saleitemObj.product_name + ' (VOID)'
@newsaleitem.save @newsaleitem.save
@@ -29,7 +30,7 @@ class Origami::SaleEditController < BaseOrigamiController
remark = "Void Sale Item ID #{saleitemObj.sale_item_id} | Receipt No #{saleObj.receipt_no} | Item Name ->#{saleitemObj.product_name}-Product Code ->#{saleitemObj.product_code}-Instance Code ->#{saleitemObj.item_instance_code}" remark = "Void Sale Item ID #{saleitemObj.sale_item_id} | Receipt No #{saleObj.receipt_no} | Item Name ->#{saleitemObj.product_name}-Product Code ->#{saleitemObj.product_code}-Instance Code ->#{saleitemObj.item_instance_code}"
sale_audit = SaleAudit.record_audit_for_edit(saleitemObj.sale_id,saleObj.cashier_id, action_by,remark,"SALEITEMVOID" ) sale_audit = SaleAudit.record_audit_for_edit(saleitemObj.sale_id,saleObj.cashier_id, action_by,remark,"SALEITEMVOID" )
saleObj.compute_without_void saleObj.compute_by_sale_items(saleObj.sale_id, saleObj.sale_items, saleObj.total_discount)
ProductCommission.create_product_commission(@newsaleitem, saleitemObj) ProductCommission.create_product_commission(@newsaleitem, saleitemObj)
end end
@@ -42,8 +43,9 @@ class Origami::SaleEditController < BaseOrigamiController
@newsaleitem = saleitemObj.dup @newsaleitem = saleitemObj.dup
@newsaleitem.save @newsaleitem.save
@newsaleitem.qty = saleitemObj.qty * -1 @newsaleitem.qty = saleitemObj.qty * -1
@newsaleitem.unit_price = saleitemObj.unit_price * -1
@newsaleitem.taxable_price = saleitemObj.taxable_price * -1
@newsaleitem.price = saleitemObj.price * -1 @newsaleitem.price = saleitemObj.price * -1
@newsaleitem.is_taxable = 1
@newsaleitem.product_name = saleitemObj.product_name + ' (FOC)' @newsaleitem.product_name = saleitemObj.product_name + ' (FOC)'
@newsaleitem.save @newsaleitem.save
@@ -54,7 +56,7 @@ class Origami::SaleEditController < BaseOrigamiController
remark = "FOC Sale Item ID #{saleitemObj.sale_item_id} | Receipt No #{saleObj.receipt_no} | Item Name ->#{saleitemObj.product_name}-Product Code ->#{saleitemObj.product_code}-Instance Code ->#{saleitemObj.item_instance_code}Receipt No #{saleObj.receipt_no}" remark = "FOC Sale Item ID #{saleitemObj.sale_item_id} | Receipt No #{saleObj.receipt_no} | Item Name ->#{saleitemObj.product_name}-Product Code ->#{saleitemObj.product_code}-Instance Code ->#{saleitemObj.item_instance_code}Receipt No #{saleObj.receipt_no}"
sale_audit = SaleAudit.record_audit_for_edit(saleitemObj.sale_id,saleObj.cashier_id, action_by,remark,"SALEITEMFOC" ) sale_audit = SaleAudit.record_audit_for_edit(saleitemObj.sale_id,saleObj.cashier_id, action_by,remark,"SALEITEMFOC" )
saleObj.compute_without_void saleObj.compute_by_sale_items(saleObj.sale_id, saleObj.sale_items, saleObj.total_discount)
ProductCommission.create_product_commission(@newsaleitem, saleitemObj) ProductCommission.create_product_commission(@newsaleitem, saleitemObj)
end end
@@ -103,7 +105,7 @@ class Origami::SaleEditController < BaseOrigamiController
# re-calc tax # re-calc tax
saleObj = Sale.find(saleitemObj.sale_id) saleObj = Sale.find(saleitemObj.sale_id)
saleObj.compute_without_void saleObj.compute_by_sale_items(saleObj.sale_id, saleObj.sale_items, saleObj.total_discount)
ProductCommission.edit_product_commission(saleitemObj) ProductCommission.edit_product_commission(saleitemObj)
end end
@@ -128,7 +130,7 @@ class Origami::SaleEditController < BaseOrigamiController
remark = "Cancle Void Sale Item ID #{saleitemObj.sale_item_id} | Item Name ->#{saleitemObj.product_name}-Product Code ->#{saleitemObj.product_code}-Instance Code ->#{saleitemObj.item_instance_code}|Receipt No #{saleObj.receipt_no}" remark = "Cancle Void Sale Item ID #{saleitemObj.sale_item_id} | Item Name ->#{saleitemObj.product_name}-Product Code ->#{saleitemObj.product_code}-Instance Code ->#{saleitemObj.item_instance_code}|Receipt No #{saleObj.receipt_no}"
sale_audit = SaleAudit.record_audit_for_edit(saleitemObj.sale_id,saleObj.cashier_id, action_by,remark,"ITEMCANCELVOID" ) sale_audit = SaleAudit.record_audit_for_edit(saleitemObj.sale_id,saleObj.cashier_id, action_by,remark,"ITEMCANCELVOID" )
saleObj.compute_without_void saleObj.compute_by_sale_items(saleObj.sale_id, saleObj.sale_items, saleObj.total_discount)
ProductCommission.remove_product_commission(saleitemObj) ProductCommission.remove_product_commission(saleitemObj)
end end
@@ -147,7 +149,7 @@ class Origami::SaleEditController < BaseOrigamiController
end end
# re-calc tax # re-calc tax
saleObj.compute_without_void saleObj.compute_by_sale_items(saleObj.sale_id, saleObj.sale_items, saleObj.total_discount)
end end
def apply_void def apply_void

View File

@@ -30,6 +30,7 @@ class Origami::SurveysController < BaseOrigamiController
end end
# end # end
end end
private private
# Never trust parameters from the scary internet, only allow the white list through. # Never trust parameters from the scary internet, only allow the white list through.

View File

@@ -8,12 +8,12 @@ class Origami::VoidController < BaseOrigamiController
sale = Sale.find_by_sale_id(sale_id) sale = Sale.find_by_sale_id(sale_id)
# update count for shift sale # update count for shift sale
if(sale.sale_status == "completed") # if(sale.sale_status == "completed")
if sale.shift_sale_id != nil if sale.shift_sale_id != nil
shift = ShiftSale.find(sale.shift_sale_id) shift = ShiftSale.find(sale.shift_sale_id)
shift.calculate(sale_id, "void") shift.calculate(sale_id, "void")
end end
end # end
sale.payment_status = 'void' sale.payment_status = 'void'
sale.sale_status = 'void' sale.sale_status = 'void'

View File

@@ -57,11 +57,15 @@ class Settings::DiningChargesController < ApplicationController
@dining_charge.minimum_free_time = DateTime.parse(dining_charge_params["minimum_free_time"]) @dining_charge.minimum_free_time = DateTime.parse(dining_charge_params["minimum_free_time"])
@dining_charge.charge_block = DateTime.parse(dining_charge_params["charge_block"]) @dining_charge.charge_block = DateTime.parse(dining_charge_params["charge_block"])
@dining_charge.time_rounding_block = DateTime.parse(dining_charge_params["time_rounding_block"]) @dining_charge.time_rounding_block = DateTime.parse(dining_charge_params["time_rounding_block"])
if @dining_charge.update(dining_charge_params) if @dining_charge.update(dining_charge_params)
@dining_charge.minimum_free_time = DateTime.parse(dining_charge_params["minimum_free_time"])
@dining_charge.charge_block = DateTime.parse(dining_charge_params["charge_block"])
@dining_charge.time_rounding_block = DateTime.parse(dining_charge_params["time_rounding_block"])
# @dining_charge.minimum_free_time = @dining_charge.minimum_free_time.to_datetime.advance(hours: +6, minutes: +30) # @dining_charge.minimum_free_time = @dining_charge.minimum_free_time.to_datetime.advance(hours: +6, minutes: +30)
# @dining_charge.charge_block = @dining_charge.charge_block.to_datetime.advance(hours: +6, minutes: +30) # @dining_charge.charge_block = @dining_charge.charge_block.to_datetime.advance(hours: +6, minutes: +30)
# @dining_charge.time_rounding_block = @dining_charge.time_rounding_block.to_datetime.advance(hours: +6, minutes: +30) # @dining_charge.time_rounding_block = @dining_charge.time_rounding_block.to_datetime.advance(hours: +6, minutes: +30)
# @dining_charge.save @dining_charge.save
if @table if @table
format.html { redirect_to settings_zone_table_path(@zone,@settings_dining_facility), notice: 'Dining charge was successfully updated.' } format.html { redirect_to settings_zone_table_path(@zone,@settings_dining_facility), notice: 'Dining charge was successfully updated.' }
else else

View File

@@ -72,6 +72,6 @@ class Settings::MembershipActionsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through. # Never trust parameters from the scary internet, only allow the white list through.
def settings_membership_action_params def settings_membership_action_params
params.require(:membership_action).permit(:membership_type, :is_active, :gateway_communication_type, :gateway_url, :auth_token, :merchant_account_id, :created_by, :additional_parameter) params.require(:membership_action).permit(:membership_type, :is_active, :gateway_communication_type, :gateway_url, :auth_token, :merchant_account_id, :created_by)
end end
end end

View File

@@ -71,6 +71,6 @@ class Settings::ShopsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through. # Never trust parameters from the scary internet, only allow the white list through.
def shop_params def shop_params
params.require(:shop).permit(:name,:address,:city,:township,:state,:country,:phone_no,:reservation_no,:license,:activated_at,:license_data,:base_currency,:cloud_token,:cloud_url,:owner_token,:id_prefix,:is_rounding_adj,:quick_sale_summary,:calc_tax_order) params.require(:shop).permit(:name,:address,:city,:township,:state,:country,:phone_no,:reservation_no,:license,:activated_at,:license_data,:base_currency,:cloud_token,:cloud_url,:owner_token,:id_prefix,:is_rounding_adj,:quick_sale_summary,:calc_tax_order,:show_account_info)
end end
end end

View File

@@ -20,7 +20,9 @@ class Transactions::BookingsController < ApplicationController
@bookings = 0 @bookings = 0
end end
end end
@receipt_no = filter
@from = from
@to = to
respond_to do |format| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb
format.json { render json: @bookings } format.json { render json: @bookings }

View File

@@ -14,20 +14,21 @@ class Transactions::CreditNotesController < ApplicationController
to = params[:to] to = params[:to]
if filter.nil? && from.nil? && to.nil? && customer.nil? if filter.nil? && from.nil? && to.nil? && customer.nil?
@sales = Sale.where('payment_status = ?', Sale::SALE_STATUS_OUTSTANDING) @credit_notes = Sale.where('payment_status = ?', Sale::SALE_STATUS_OUTSTANDING)
else else
sale = Sale.search_credit_sales(customer,filter,from,to) sale = Sale.search_credit_sales(customer,filter,from,to)
if sale.count > 0 if sale.count > 0
@sales = sale @credit_notes = sale
@sales = Kaminari.paginate_array(@sales).page(params[:page]).per(20) @credit_notes = Kaminari.paginate_array(@credit_notes).page(params[:page]).per(20)
else else
@sales = 0 @credit_notes = 0
end end
end end
puts "sssssssssssss"
puts @credit_notes.to_json
respond_to do |format| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb
format.json { render json: @sales } format.json { render json: @credit_notes }
end end
end end

View File

@@ -21,6 +21,10 @@ class Transactions::OrdersController < ApplicationController
@orders = [] @orders = []
end end
@receipt_no = filter
@from = from
@to = to
respond_to do |format| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb
format.json { render json: @orders } format.json { render json: @orders }
@@ -30,7 +34,7 @@ class Transactions::OrdersController < ApplicationController
def show def show
@order = Order.find(params[:id]) @order = Order.find(params[:id])
@dining = BookingOrder.find_by_order_id(@order.order_id).booking.dining_facility
respond_to do |format| respond_to do |format|
format.html # show.html.erb format.html # show.html.erb
format.json { render json: @order } format.json { render json: @order }

View File

@@ -22,6 +22,9 @@ class Transactions::SalesController < ApplicationController
@sales = 0 @sales = 0
end end
end end
@receipt_no = receipt_no
@from = from
@to = to
# if receipt_no.nil? && search_date.nil? # if receipt_no.nil? && search_date.nil?
# @sales = Sale.where("NOT sale_status = 'void' " ).order("sale_id desc").limit(500) # @sales = Sale.where("NOT sale_status = 'void' " ).order("sale_id desc").limit(500)

View File

@@ -6,13 +6,14 @@ class OrderQueueProcessorJob < ApplicationJob
#Order ID #Order ID
order = Order.find(order_id) order = Order.find(order_id)
assign_order = AssignedOrderItem.assigned_order_item_by_job(order_id)
#Execute orders and send to order stations #Execute orders and send to order stations
if order if order
oqs = OrderQueueStation.new oqs = OrderQueueStation.new
oqs.process_order(order, table_id) oqs.process_order(order, table_id)
end end
assign_order = AssignedOrderItem.assigned_order_item_by_job(order_id)
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order ActionCable.server.broadcast "order_queue_station_channel",order: assign_order
end end

View File

@@ -122,7 +122,7 @@ class Ability
can :index, :credit_payment can :index, :credit_payment
can :index, :void_sale can :index, :void_sale
elsif user.role == "supervisour" elsif user.role == "supervisor"
can :edit, :sale_edit can :edit, :sale_edit
can :item_void, :sale_edit can :item_void, :sale_edit

View File

@@ -35,7 +35,7 @@ class AssignedOrderItem < ApplicationRecord
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
left join bookings as bk on bk.booking_id = bo.booking_id left join bookings as bk on bk.booking_id = bo.booking_id
left join dining_facilities as df on df.id = bk.dining_facility_id") left join dining_facilities as df on df.id = bk.dining_facility_id")
.where("assigned_order_items.order_id = '#{order_id}' AND assigned_order_items.delivery_status = false AND odt.price <> 0 AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' ") .where("assigned_order_items.order_id = '#{order_id}' AND assigned_order_items.delivery_status = false AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' ")
.order("assigned_order_items.assigned_order_item_id desc") .order("assigned_order_items.assigned_order_item_id desc")
.group("assigned_order_items.assigned_order_item_id") .group("assigned_order_items.assigned_order_item_id")
return order_item return order_item

View File

@@ -8,7 +8,7 @@ class DiningCharge < ApplicationRecord
block_count = 0 block_count = 0
price = 0 price = 0
minutes = DiningCharge.time_diff(checkout, checkin) minutes = DiningCharge.time_diff(checkout, checkin)
free_time = DiningCharge.convert_to_minutes(dining_charges_obj.minimum_free_time.utc.localtime.strftime('%H:%M')) free_time = DiningCharge.convert_to_minutes(dining_charges_obj.minimum_free_time.utc.strftime('%H:%M'))
dining_minutes = minutes #- free_time # stayminutes - free minutes dining_minutes = minutes #- free_time # stayminutes - free minutes
if dining_minutes <= free_time if dining_minutes <= free_time
price = 0 price = 0
@@ -30,7 +30,7 @@ class DiningCharge < ApplicationRecord
# dining charges calculate # dining charges calculate
def self.charges(chargesObj, dining_minutes, type) def self.charges(chargesObj, dining_minutes, type)
solid_price = 0 solid_price = 0
charge_block = DiningCharge.convert_to_minutes(chargesObj.charge_block.utc.localtime.strftime('%H:%M')) charge_block = DiningCharge.convert_to_minutes(chargesObj.charge_block.utc.strftime('%H:%M'))
result = dining_minutes / charge_block result = dining_minutes / charge_block
if result.to_i < 1 if result.to_i < 1
@@ -40,7 +40,7 @@ class DiningCharge < ApplicationRecord
solid_price = result * chargesObj.unit_price solid_price = result * chargesObj.unit_price
remain_value = dining_minutes % charge_block remain_value = dining_minutes % charge_block
rounding_time = DiningCharge.convert_to_minutes(chargesObj.time_rounding_block.utc.localtime.strftime('%H:%M')) rounding_time = DiningCharge.convert_to_minutes(chargesObj.time_rounding_block.utc.strftime('%H:%M'))
roundingblock = remain_value / rounding_time roundingblock = remain_value / rounding_time
if roundingblock.to_i < 1 if roundingblock.to_i < 1
# no time rounding block # no time rounding block

View File

@@ -77,7 +77,7 @@ class License
has_license = true # verify_license() has_license = true # verify_license()
if has_license if has_license
puts "VERIFIED" # puts "VERIFIED"
end end
end end

View File

@@ -6,7 +6,8 @@ class MenuCategory < ApplicationRecord
belongs_to :parent, :class_name => "MenuCategory", foreign_key: "menu_category_id", optional: true belongs_to :parent, :class_name => "MenuCategory", foreign_key: "menu_category_id", optional: true
has_many :menu_items has_many :menu_items
validates_presence_of :name, :menu, :order_by validates_presence_of :code, :name, :menu, :order_by
validates_uniqueness_of :code
default_scope { order('order_by asc') } default_scope { order('order_by asc') }
scope :active, -> {where("is_available = 1")} scope :active, -> {where("is_available = 1")}

View File

@@ -13,7 +13,8 @@ class MenuItem < ApplicationRecord
has_many :menu_item_sets has_many :menu_item_sets
has_many :item_sets, through: :menu_item_sets has_many :item_sets, through: :menu_item_sets
validates_presence_of :name, :type, :min_qty, :taxable,:account_id validates_presence_of :item_code, :name, :type, :min_qty, :taxable,:account_id
validates_uniqueness_of :item_code
default_scope { order('item_code asc') } default_scope { order('item_code asc') }
@@ -39,7 +40,7 @@ class MenuItem < ApplicationRecord
menu_item_hash[:item_code] = menu_item.item_code menu_item_hash[:item_code] = menu_item.item_code
menu_item_hash[:item_instance_code] = mt_instance.item_instance_code menu_item_hash[:item_instance_code] = mt_instance.item_instance_code
menu_item_hash[:name] = menu_item.name.to_s + " - " + mt_instance.item_instance_name.to_s menu_item_hash[:name] = menu_item.name.to_s + " - " + mt_instance.item_instance_name.to_s
menu_item_hash[:alt_name] = menu_item.alt_name.to_s + " - " + mt_instance.item_instance_name.to_s menu_item_hash[:alt_name] = menu_item.alt_name.to_s # + " - " + mt_instance.item_instance_name.to_s
menu_item_hash[:price] = mt_instance.price menu_item_hash[:price] = mt_instance.price
menu_item_hash[:promotion_price] = mt_instance.promotion_price menu_item_hash[:promotion_price] = mt_instance.promotion_price
menu_item_hash[:is_on_promotion] = mt_instance.is_on_promotion menu_item_hash[:is_on_promotion] = mt_instance.is_on_promotion

View File

@@ -4,6 +4,8 @@ class MenuItemInstance < ApplicationRecord
has_many :menu_instance_item_sets has_many :menu_instance_item_sets
has_many :item_sets, through: :menu_instance_item_sets has_many :item_sets, through: :menu_instance_item_sets
# before_create :generate_menu_item_instance_code # before_create :generate_menu_item_instance_code
validates_presence_of :item_instance_code
# validates_uniqueness_of :item_instance_code
def self.findParentCategory(item) def self.findParentCategory(item)
if item.menu_category_id if item.menu_category_id

View File

@@ -69,10 +69,10 @@ class OrderQueueStation < ApplicationRecord
# AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs) # AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
# else # else
if (order_item.price != 0) # if (order_item.price != 0)
AssignedOrderItem.assigned_order_item(order, order_item.item_code, order_item.item_instance_code, oqs) AssignedOrderItem.assigned_order_item(order, order_item.item_code, order_item.item_instance_code, oqs)
oqs_order_items.push(order_item) oqs_order_items.push(order_item)
end # end
# end # end
end end
end end

View File

@@ -9,7 +9,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
filename = "tmp/order_item.pdf" filename = "tmp/order_item.pdf"
# check for item not to show # check for item not to show
if order_item[0].price != 0 # if order_item[0].price != 0
pdf = OrderItemPdf.new(print_settings,order_item[0], print_status, options, oqs.use_alternate_name) pdf = OrderItemPdf.new(print_settings,order_item[0], print_status, options, oqs.use_alternate_name)
pdf.render_file filename pdf.render_file filename
@@ -22,7 +22,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
else else
self.print(filename, oqs.printer_name) self.print(filename, oqs.printer_name)
end end
end # end
end end
# Query for per order # Query for per order
@@ -40,7 +40,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
options = odi.options == "[]"? "" : odi.options options = odi.options == "[]"? "" : odi.options
# check for item not to show # check for item not to show
if odi.price != 0 #if odi.price != 0
pdf = OrderItemPdf.new(print_settings,odi, print_status, options, oqs.use_alternate_name) pdf = OrderItemPdf.new(print_settings,odi, print_status, options, oqs.use_alternate_name)
# pdf.render_file "tmp/order_item.pdf" # pdf.render_file "tmp/order_item.pdf"
pdf.render_file filename pdf.render_file filename
@@ -51,7 +51,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
else else
self.print(filename, oqs.printer_name) self.print(filename, oqs.printer_name)
end end
end #end
end end
# For Print Order Summary # For Print Order Summary
else else
@@ -81,7 +81,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
options = odi.options == "[]"? "" : odi.options options = odi.options == "[]"? "" : odi.options
# check for item not to show # check for item not to show
if odi.price != 0 #if odi.price != 0
pdf = OrderItemPdf.new(print_settings,odi, print_status, options,oqs.use_alternate_name) pdf = OrderItemPdf.new(print_settings,odi, print_status, options,oqs.use_alternate_name)
pdf.render_file filename pdf.render_file filename
@@ -94,7 +94,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
else else
self.print(filename, oqs.printer_name) self.print(filename, oqs.printer_name)
end end
end #end
end end
# For Print Order Summary # For Print Order Summary
else else
@@ -123,7 +123,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
left join dining_facilities AS df ON df.id = b.dining_facility_id left join dining_facilities AS df ON df.id = b.dining_facility_id
left join customers as cus ON cus.customer_id = orders.customer_id left join customers as cus ON cus.customer_id = orders.customer_id
left join menu_items as item ON item.item_code = order_items.item_code") left join menu_items as item ON item.item_code = order_items.item_code")
.where("order_items.item_code = '#{ id }' AND order_items.price != 0") .where("order_items.item_instance_code = '#{ id }'")
.group("order_items.item_code") .group("order_items.item_code")
elsif type == "order_summary" elsif type == "order_summary"
OrderItem.select("order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name") OrderItem.select("order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name")
@@ -133,7 +133,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
left join dining_facilities AS df ON df.id = b.dining_facility_id left join dining_facilities AS df ON df.id = b.dining_facility_id
left join customers as cus ON cus.customer_id = orders.customer_id left join customers as cus ON cus.customer_id = orders.customer_id
left join menu_items as item ON item.item_code = order_items.item_code") left join menu_items as item ON item.item_code = order_items.item_code")
.where("orders.order_id = '#{ id }' AND order_items.price != 0") .where("orders.order_id = '#{ id }'")
.group("order_items.order_items_id") .group("order_items.order_items_id")
else else
# order summary for booking # order summary for booking
@@ -144,7 +144,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
left join dining_facilities AS df ON df.id = b.dining_facility_id left join dining_facilities AS df ON df.id = b.dining_facility_id
left join customers as cus ON cus.customer_id = orders.customer_id left join customers as cus ON cus.customer_id = orders.customer_id
left join menu_items as item ON item.item_code = order_items.item_code") left join menu_items as item ON item.item_code = order_items.item_code")
.where("b.booking_id = '#{ id }' AND order_items.price != 0") .where("b.booking_id = '#{ id }'")
end end
end end

View File

@@ -153,7 +153,7 @@ class Promotion < ApplicationRecord
update_existing_item(promotion_qty, item, sale_id, "promotion", item.price) update_existing_item(promotion_qty, item, sale_id, "promotion", item.price)
end end
def self.update_existing_item(foc_qty, item, sale_id, type, item_price) def self.update_existing_item(qty, item, sale_id, type, item_price)
sale_item = SaleItem.new sale_item = SaleItem.new
sale_item.product_code = item.item_code sale_item.product_code = item.item_code
@@ -161,13 +161,13 @@ class Promotion < ApplicationRecord
sale_item.product_alt_name = item.alt_name sale_item.product_alt_name = item.alt_name
sale_item.account_id = item.account_id sale_item.account_id = item.account_id
sale_item.remark = type sale_item.remark = type
sale_item.qty = foc_qty * (-1) sale_item.qty = qty * (-1)
sale_item.unit_price = item_price # * (-1) sale_item.unit_price = item_price # * (-1)
sale_item.taxable_price = item_price # * (-1) sale_item.taxable_price = (qty * item_price) * (-1)
sale_item.price = foc_qty * item_price * (-1) sale_item.price = qty * item_price * (-1)
sale_item.is_taxable = false sale_item.is_taxable = 1
sale_item.sale_id = sale_id sale_item.sale_id = sale_id
sale_item.save sale_item.save
sale = Sale.find(sale_id) sale = Sale.find(sale_id)

View File

@@ -166,7 +166,7 @@ class Sale < ApplicationRecord
sale_item.qty = item.qty sale_item.qty = item.qty
sale_item.unit_price = item.price sale_item.unit_price = item.price
sale_item.taxable_price = item.price sale_item.taxable_price = sale_item.qty * sale_item.unit_price
sale_item.is_taxable = item.taxable sale_item.is_taxable = item.taxable
sale_item.price = sale_item.qty * sale_item.unit_price sale_item.price = sale_item.qty * sale_item.unit_price
@@ -225,7 +225,8 @@ class Sale < ApplicationRecord
puts "item.sales_item_id ddd" puts "item.sales_item_id ddd"
puts item.sale_item_id puts item.sale_item_id
subtotal_price = subtotal_price + item.price subtotal_price = subtotal_price + item.price
total_taxable = total_taxable + (item.taxable_price * item.qty) total_taxable = total_taxable + item.taxable_price
# total_taxable = total_taxable + (item.taxable_price * item.qty)
end end
apply_tax (total_taxable) apply_tax (total_taxable)
@@ -253,7 +254,11 @@ class Sale < ApplicationRecord
sales_items.each do |item| sales_items.each do |item|
#compute each item and added to total #compute each item and added to total
subtotal_price = subtotal_price + item.price subtotal_price = subtotal_price + item.price
total_taxable = total_taxable + (item.taxable_price * item.qty)
# check for item is taxable and calculate
if item.is_taxable
total_taxable = total_taxable + item.taxable_price
end
end end
compute_tax(sale, total_taxable, total_discount) compute_tax(sale, total_taxable, total_discount)
@@ -269,6 +274,7 @@ class Sale < ApplicationRecord
end end
# No Use too many wrong
def compute_without_void def compute_without_void
sales_items = self.sale_items sales_items = self.sale_items
@@ -467,9 +473,7 @@ class Sale < ApplicationRecord
else else
sale = Sale.all.joins("JOIN sale_payments sp on sp.sale_id = sales.sale_id") sale = Sale.all.joins("JOIN sale_payments sp on sp.sale_id = sales.sale_id")
.where("sp.payment_method ='creditnote' #{keyword} #{custo}") .where("sp.payment_method ='creditnote' #{keyword} #{custo}")
end end
end end
def self.get_rounding_adjustment(num) def self.get_rounding_adjustment(num)
@@ -604,19 +608,33 @@ def self.get_by_shift_sale(from,to,status)
end end
def self.get_item_query() def self.get_item_query()
# query = SaleItem.select("acc.title as account_name,account_id, item_instance_code as item_code, " +
# "SUM(qty * unit_price) as grand_total,SUM(qty) as total_item," +
# " unit_price as unit_price,product_name as product_name, 'cat' as" +
# " menu_category_name,'test' as menu_category_id ")
# query = query.joins("JOIN sales s ON s.sale_id = sale_items.sale_id" +
# " JOIN shift_sales sh ON sh.`id` = sales.shift_sale_id")
# # "JOIN employee_accesses ea ON ea.`employee_id` = sales.cashier_id ")
# query = query.joins(" JOIN accounts acc ON acc.id = account_id")
# query = query.where("item_instance_code is not NULL")
# query = query.group("item_instance_code").order("account_id")
query = Sale.select("acc.title as account_name,mi.account_id, i.item_instance_code as item_code, " + query = Sale.select("acc.title as account_name,mi.account_id, i.item_instance_code as item_code, " +
"(i.qty * i.unit_price) as grand_total,(i.qty) as total_item," + "SUM(i.qty * i.unit_price) as grand_total,SUM(i.qty) as total_item," +
" i.unit_price as unit_price,i.product_name as product_name, mc.name as" + " i.unit_price as unit_price,i.product_name as product_name, mc.name as" +
" menu_category_name,mc.id as menu_category_id ") " menu_category_name,mc.id as menu_category_id ")
query = query.joins("JOIN sale_items i ON i.sale_id = sales.sale_id" + query = query.joins("JOIN sale_items i ON i.sale_id = sales.sale_id" +
" JOIN menu_items mi ON i.product_code = mi.item_code" + " JOIN menu_item_instances mii ON i.item_instance_code = mii.item_instance_code" +
" JOIN menu_items mi ON mi.id = mii.menu_item_id" +
" JOIN shift_sales sh ON sh.`id` = sales.shift_sale_id" + " JOIN shift_sales sh ON sh.`id` = sales.shift_sale_id" +
" JOIN menu_categories mc ON mc.id = mi.menu_category_id ") " JOIN menu_categories mc ON mc.id = mi.menu_category_id ")
# "JOIN employee_accesses ea ON ea.`employee_id` = sales.cashier_id ") # "JOIN employee_accesses ea ON ea.`employee_id` = sales.cashier_id ")
query = query.joins(" JOIN accounts acc ON acc.id = mi.account_id") query = query.joins(" JOIN accounts acc ON acc.id = mi.account_id")
query = query.where("i.unit_price > 0") query = query.where("i.item_instance_code IS NOT NULL")
query = query.group("i.item_instance_code").order("mi.account_id, mi.menu_category_id") query = query.group("i.item_instance_code").order("mi.account_id, mi.menu_category_id")
end end
@@ -759,35 +777,34 @@ end
def self.get_separate_tax(shift_sale_range=nil,shift,from,to,payment_type) def self.get_separate_tax(shift_sale_range=nil,shift,from,to,payment_type)
if payment_type.blank? # wrong amount tax for service and commercial tax
payment_type = ''
else # if payment_type.blank?
if payment_type == 'card' # payment_type = ''
payment_type = " and sale_payments.payment_method = 'mpu' or sale_payments.payment_method = 'visa' or sale_payments.payment_method = 'master' or sale_payments.payment_method = 'jcb' or sale_payments.payment_method = 'paypar'" # else
else # if payment_type == 'card'
payment_type = " and sale_payments.payment_method = '#{payment_type}'" # payment_type = " and sale_payments.payment_method = 'mpu' or sale_payments.payment_method = 'visa' or sale_payments.payment_method = 'master' or sale_payments.payment_method = 'jcb' or sale_payments.payment_method = 'paypar'"
end # else
end # payment_type = " and sale_payments.payment_method = '#{payment_type}'"
# end
# end
if shift.present? if shift.present?
query = SaleTax.select("SUM(tax_payable_amount) AS st_amount,tax_name") query = SaleTax.select("SUM(tax_payable_amount) AS st_amount,tax_name")
.joins("LEFT JOIN sales ON sales.sale_id = sale_taxes.sale_id") .joins("LEFT JOIN sales ON sales.sale_id = sale_taxes.sale_id")
.joins("join sale_payments on sale_payments.sale_id = sales.sale_id") .where("sales.shift_sale_id in (?) and sale_status= 'completed'", shift.to_a)
.where("sales.shift_sale_id in (?) #{payment_type} and sale_status= 'completed' and sale_payments.payment_amount != 0", shift.to_a)
.group("sale_taxes.tax_name") .group("sale_taxes.tax_name")
.order("sale_taxes.sale_tax_id asc") .order("sale_taxes.sale_tax_id asc")
elsif shift_sale_range.present? elsif shift_sale_range.present?
query = SaleTax.select("SUM(tax_payable_amount) AS st_amount,tax_name") query = SaleTax.select("SUM(tax_payable_amount) AS st_amount,tax_name")
.joins("LEFT JOIN sales ON sales.sale_id = sale_taxes.sale_id") .joins("LEFT JOIN sales ON sales.sale_id = sale_taxes.sale_id")
.joins("join sale_payments on sale_payments.sale_id = sales.sale_id") .where("sales.shift_sale_id in (?) and sale_status= 'completed'", shift_sale_range.to_a)
.where("sales.shift_sale_id in (?) #{payment_type} and sale_status= 'completed' and sale_payments.payment_amount != 0", shift_sale_range.to_a)
.group("sale_taxes.tax_name") .group("sale_taxes.tax_name")
.order("sale_taxes.sale_tax_id asc") .order("sale_taxes.sale_tax_id asc")
else else
query = SaleTax.select("SUM(tax_payable_amount) AS st_amount,tax_name") query = SaleTax.select("SUM(tax_payable_amount) AS st_amount,tax_name")
.joins("LEFT JOIN sales ON sales.sale_id = sale_taxes.sale_id") .joins("LEFT JOIN sales ON sales.sale_id = sale_taxes.sale_id")
.joins("join sale_payments on sale_payments.sale_id = sales.sale_id") .where("sales.receipt_date between ? and ? and sale_status= 'completed'", from,to)
.where("sales.receipt_date between ? and ? #{payment_type} and sale_status= 'completed' and sale_payments.payment_amount != 0", from,to)
.group("sale_taxes.tax_name") .group("sale_taxes.tax_name")
.order("sale_taxes.sale_tax_id asc") .order("sale_taxes.sale_tax_id asc")
end end
@@ -951,7 +968,7 @@ end
# .joins("join sale_payments on sale_id = sales.sale_id") # .joins("join sale_payments on sale_id = sales.sale_id")
# .group("sales.sale_id") # .group("sales.sale_id")
query = Sale.where('sales.sale_status = "completed" and DATE_FORMAT(sales.receipt_date,"%Y-%m-%d") = ? and sp.payment_method = "mpu" or sp.payment_method = "visa" or sp.payment_method = "master" or sp.payment_method = "jcb"',today) query = Sale.where('sales.sale_status = "completed" and DATE_FORMAT(sales.receipt_date,"%Y-%m-%d") = ? and (sp.payment_method = "mpu" or sp.payment_method = "visa" or sp.payment_method = "master" or sp.payment_method = "jcb")',today)
.joins("JOIN sale_payments sp ON sp.sale_id = sales.sale_id") .joins("JOIN sale_payments sp ON sp.sale_id = sales.sale_id")
.sum("sp.payment_amount") .sum("sp.payment_amount")
@@ -970,7 +987,7 @@ end
end end
def self.total_payment_methods(today) def self.total_payment_methods(today)
query = Sale.select("sp.payment_method") query = Sale.select("distinct sp.payment_method")
.where('sales.sale_status = "completed" and DATE_FORMAT(sales.receipt_date,"%Y-%m-%d") = ?',today) .where('sales.sale_status = "completed" and DATE_FORMAT(sales.receipt_date,"%Y-%m-%d") = ?',today)
.joins("JOIN sale_payments as sp ON sp.sale_id = sales.sale_id") .joins("JOIN sale_payments as sp ON sp.sale_id = sales.sale_id")
end end
@@ -978,7 +995,7 @@ end
def self.payment_sale(payment_method, today) def self.payment_sale(payment_method, today)
query = Sale.joins("JOIN sale_payments as sp ON sp.sale_id = sales.sale_id") query = Sale.joins("JOIN sale_payments as sp ON sp.sale_id = sales.sale_id")
if payment_method == 'card' if payment_method == 'card'
query = query.where('sales.sale_status = "completed" and DATE_FORMAT(sales.receipt_date,"%Y-%m-%d") = ? and sp.payment_method = "mpu" or sp.payment_method = "visa" or sp.payment_method = "master" or sp.payment_method = "jcb"',today) query = query.where('sales.sale_status = "completed" and DATE_FORMAT(sales.receipt_date,"%Y-%m-%d") = ? and (sp.payment_method = "mpu" or sp.payment_method = "visa" or sp.payment_method = "master" or sp.payment_method = "jcb")',today)
else else
query = query.where("sales.sale_status = 'completed' and sp.payment_method = '#{payment_method}' and DATE_FORMAT(sales.receipt_date,'%Y-%m-%d') = ?",today) query = query.where("sales.sale_status = 'completed' and sp.payment_method = '#{payment_method}' and DATE_FORMAT(sales.receipt_date,'%Y-%m-%d') = ?",today)
end end

View File

@@ -11,6 +11,44 @@ class SaleItem < ApplicationRecord
def compute_item def compute_item
end end
# Add Sale Items
def self.add_sale_items(sale_items)
sale_items.each do|saleitemObj|
@newsaleitem = SaleItem.new
@newsaleitem = saleitemObj.dup
@newsaleitem.save
@newsaleitem.qty = saleitemObj.qty * (-1)
@newsaleitem.unit_price = saleitemObj.unit_price * (-1)
@newsaleitem.taxable_price = (saleitemObj.unit_price * saleitemObj.qty) * (-1)
@newsaleitem.price = (saleitemObj.unit_price * saleitemObj.qty) * (-1)
@newsaleitem.product_name = saleitemObj.product_name + ' (FOC)'
@newsaleitem.save
end
end
def self.update_existing_item(qty, item, sale_id, type, item_price, price)
sale_item = SaleItem.new
sale_item.product_code = item.product_code
sale_item.product_name = item.product_name + "(#{type})"
sale_item.product_alt_name = item.product_alt_name
sale_item.account_id = item.account_id
sale_item.remark = type
if type == "foc" || type == "promotion" || type == "void"
sale_item.qty = qty * (-1)
else
sale_item.qty = qty
end
sale_item.unit_price = item_price # * (-1)
sale_item.taxable_price = (price) * (-1)
sale_item.price = (price) * (-1)
sale_item.is_taxable = 1
sale_item.sale_id = sale_id
sale_item.save
sale = Sale.find(sale_id)
sale.compute_by_sale_items(sale.id, sale.sale_items, sale.total_discount)
end
def self.get_order_items_details(sale_id) def self.get_order_items_details(sale_id)
order_details = SaleItem.select("sales.total_tax as tax_amount, sales.grand_total as grand_total_amount , sales.total_discount as discount_amount,sales.receipt_date as receipt_date, order_details = SaleItem.select("sales.total_tax as tax_amount, sales.grand_total as grand_total_amount , sales.total_discount as discount_amount,sales.receipt_date as receipt_date,
@@ -58,7 +96,7 @@ class SaleItem < ApplicationRecord
# Check for actual sale items # Check for actual sale items
sale_items.where("is_taxable = false AND remark = 'Discount'").find_each do |si| sale_items.where("is_taxable = false AND remark = 'Discount'").find_each do |si|
if si.account_id == a.id if si.account_id == a.id
discount_account[:price] = (discount_account[:price].abs + si.price.abs) * -1 discount_account[:price] = (discount_account[:price].abs + si.price.abs) * (-1)
end end
end end
discount_accounts.push(discount_account) discount_accounts.push(discount_account)

View File

@@ -169,12 +169,21 @@ class SalePayment < ApplicationRecord
def foc_payment def foc_payment
payment_status = false payment_status = false
# add to sale item with foc
sale_items = SaleItem.where("sale_id='#{ self.sale.sale_id }'")
sale_items.each do|item|
SaleItem.update_existing_item(item.qty, item, self.sale.sale_id, "foc", item.unit_price, item.price)
end
self.payment_method = "foc" self.payment_method = "foc"
self.payment_amount = self.received_amount self.payment_amount = self.received_amount
self.outstanding_amount = self.sale.grand_total.to_f - self.received_amount.to_f self.outstanding_amount = self.sale.grand_total.to_f - self.received_amount.to_f
self.payment_status = "paid" self.payment_status = "paid"
payment_method = self.save! payment_method = self.save!
sale_update_payment_status(self.received_amount) sale_update_payment_status(self.received_amount)
return payment_status return payment_status
end end

View File

@@ -54,7 +54,7 @@ class ShiftSale < ApplicationRecord
self.cash_sales = self.cash_sales.to_f + cash.to_f self.cash_sales = self.cash_sales.to_f + cash.to_f
self.credit_sales = self.credit_sales.to_i + credit.to_f self.credit_sales = self.credit_sales.to_i + credit.to_f
self.other_sales = self.other_sales.to_i + other_sales.to_f self.other_sales = self.other_sales.to_i + other_sales.to_f
self.nett_sales = self.nett_sales + saleobj.total_amount.to_f #self.grand_total.to_i - self.commercial_taxes self.nett_sales = self.nett_sales + (saleobj.total_amount.to_f - self.total_discounts) #self.grand_total.to_i - self.commercial_taxes
self.commercial_taxes = self.commercial_taxes.to_i + tax.to_f self.commercial_taxes = self.commercial_taxes.to_i + tax.to_f
self.total_rounding = self.total_rounding + saleobj.rounding_adjustment self.total_rounding = self.total_rounding + saleobj.rounding_adjustment
self.total_receipt = self.total_receipt + 1 self.total_receipt = self.total_receipt + 1
@@ -81,7 +81,7 @@ class ShiftSale < ApplicationRecord
self.cash_sales = self.cash_sales.to_f - cash.to_f self.cash_sales = self.cash_sales.to_f - cash.to_f
self.credit_sales = self.credit_sales.to_i - credit.to_f self.credit_sales = self.credit_sales.to_i - credit.to_f
self.other_sales = self.other_sales.to_i - other_sales.to_f self.other_sales = self.other_sales.to_i - other_sales.to_f
self.nett_sales = self.nett_sales - saleobj.total_amount.to_f #self.grand_total.to_i - self.commercial_taxes self.nett_sales = self.nett_sales - (saleobj.total_amount.to_f - self.total_discounts) #self.grand_total.to_i - self.commercial_taxes
self.commercial_taxes = self.commercial_taxes.to_i - tax.to_f self.commercial_taxes = self.commercial_taxes.to_i - tax.to_f
self.total_rounding = self.total_rounding - saleobj.rounding_adjustment self.total_rounding = self.total_rounding - saleobj.rounding_adjustment
self.total_void = self.total_void + saleobj.grand_total self.total_void = self.total_void + saleobj.grand_total

View File

@@ -104,7 +104,7 @@ class OrderSummaryPdf < Prawn::Document
order_item.each do|odi| order_item.each do|odi|
# check for item not to show # check for item not to show
if odi.price != 0 # if odi.price != 0
y_position = cursor y_position = cursor
bounding_box([0,y_position], :width => self.item_width) do bounding_box([0,y_position], :width => self.item_width) do
@@ -148,7 +148,7 @@ class OrderSummaryPdf < Prawn::Document
dash(1, :space => 1, :phase => 1) dash(1, :space => 1, :phase => 1)
stroke_horizontal_line 0, (self.page_width - self.margin) stroke_horizontal_line 0, (self.page_width - self.margin)
move_down 5 move_down 5
end # end
end end
end end
end end

View File

@@ -45,7 +45,7 @@ class ReceiptBillPdf < Prawn::Document
delimiter = "" delimiter = ""
end end
header( shop_details) header(shop_details)
stroke_horizontal_rule stroke_horizontal_rule
@@ -60,11 +60,13 @@ class ReceiptBillPdf < Prawn::Document
customer(customer_name) customer(customer_name)
if discount_price_by_accounts.length > 0 if discount_price_by_accounts.length > 0 && shop_details.show_account_info
discount_account(discount_price_by_accounts,printer_settings.precision,delimiter) discount_account(discount_price_by_accounts,printer_settings.precision,delimiter)
end end
if shop_details.show_account_info
items_account(item_price_by_accounts,printer_settings.precision,delimiter) items_account(item_price_by_accounts,printer_settings.precision,delimiter)
end
sign(sale_data) sign(sale_data)
@@ -389,6 +391,8 @@ class ReceiptBillPdf < Prawn::Document
text "#{ customer_name }" , :size => self.item_font_size,:align => :right text "#{ customer_name }" , :size => self.item_font_size,:align => :right
end end
end end
def discount_account(discount_price_by_accounts,precision,delimiter) def discount_account(discount_price_by_accounts,precision,delimiter)
move_down 5 move_down 5
stroke_horizontal_rule stroke_horizontal_rule

View File

@@ -2,7 +2,7 @@ class MenuItemImageUploader < CarrierWave::Uploader::Base
# Include RMagick or MiniMagick support: # Include RMagick or MiniMagick support:
# include CarrierWave::RMagick # include CarrierWave::RMagick
# include CarrierWave::MiniMagick include CarrierWave::MiniMagick
# Choose what kind of storage to use for this uploader: # Choose what kind of storage to use for this uploader:
storage :file storage :file
@@ -33,6 +33,8 @@ class MenuItemImageUploader < CarrierWave::Uploader::Base
# Process files as they are uploaded: # Process files as they are uploaded:
# process scale: [200, 300] # process scale: [200, 300]
process :resize_to_fit => [200, 150]
# #
# def scale(width, height) # def scale(width, height)
# # do something # # do something

View File

@@ -2,7 +2,7 @@ class ProductImageUploader < CarrierWave::Uploader::Base
# Include RMagick or MiniMagick support: # Include RMagick or MiniMagick support:
# include CarrierWave::RMagick # include CarrierWave::RMagick
# include CarrierWave::MiniMagick include CarrierWave::MiniMagick
# Choose what kind of storage to use for this uploader: # Choose what kind of storage to use for this uploader:
storage :file storage :file
@@ -33,6 +33,7 @@ class ProductImageUploader < CarrierWave::Uploader::Base
# Process files as they are uploaded: # Process files as they are uploaded:
# process scale: [200, 300] # process scale: [200, 300]
process :resize_to_fit => [200, 150]
# #
# def scale(width, height) # def scale(width, height)
# # do something # # do something

View File

@@ -90,6 +90,7 @@ json.options opt_format
# json.item_attributes = item_instance.item_attributes # json.item_attributes = item_instance.item_attributes
json.instances item.menu_item_instances do |is| json.instances item.menu_item_instances do |is|
if is.is_available
# Convert id to name for attributes # Convert id to name for attributes
instance_attr = [] instance_attr = []
@@ -110,6 +111,7 @@ json.instances item.menu_item_instances do |is|
json.promotion_price is.promotion_price json.promotion_price is.promotion_price
json.values instance_attr json.values instance_attr
# json.item_sets is.item_sets # json.item_sets is.item_sets
end
end end
#Child Menu items #Child Menu items

View File

@@ -1,21 +1,26 @@
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %> <%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
<span class="patch_method"></span> <span class="patch_method"></span>
<%= f.hidden_field :id, :class => "form-control " %> <%= f.hidden_field :id, :class => "form-control " %>
<div class="form-group"> <div class="form-group">
<label> <%= t("views.right_panel.detail.salutation") %> :</label><br> <label> <%= t("views.right_panel.detail.salutation") %> :</label><br>
<label><%= t("views.right_panel.detail.mr") %></label> <label class="font-15"><%= t("views.right_panel.detail.mr") %>
<%= f.radio_button :salutation,"Mr", :class => "salutation mr with-gap radio-col-indigo", :value=>"Mr", :style=>"width: 30px"%> <%= f.radio_button :salutation,"Mr", :class => "salutation mr with-gap radio-col-indigo", :value=>"Mr", :style=>"width: 30px"%>
<label><%= t("views.right_panel.detail.miss") %></label> </label>&nbsp;
<label class="font-15"><%= t("views.right_panel.detail.miss") %>
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs with-gap radio-col-indigo", :value=>"Mrs", :style=>"width: 30px"%> <%= f.radio_button :salutation,"Mrs", :class => "salutation mrs with-gap radio-col-indigo", :value=>"Mrs", :style=>"width: 30px"%>
<label><%= t("views.right_panel.detail.mrs") %></label> </label>&nbsp;
<label class="font-15"><%= t("views.right_panel.detail.mrs") %>
<%= f.radio_button :salutation,"Miss", :class => "salutation miss with-gap radio-col-indigo", :value=>"Miss", :style=>"width: 30px"%> <%= f.radio_button :salutation,"Miss", :class => "salutation miss with-gap radio-col-indigo", :value=>"Miss", :style=>"width: 30px"%>
<label><%= t("views.right_panel.detail.mdm") %></label> </label>&nbsp;
<label class="font-15">
<%= t("views.right_panel.detail.mdm") %>
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm with-gap radio-col-indigo", :value=>"Mdm", :style=>"width: 30px"%> <%= f.radio_button :salutation,"Mdm", :class => "salutation mdm with-gap radio-col-indigo", :value=>"Mdm", :style=>"width: 30px"%>
</div> </label>
</div>
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>"> <div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
<%= f.input :name, :class => "form-control col-md-6 name", :required => true %> <%= f.input :name, :class => "form-control col-md-6 name", :required => true %>
<% flash.each do |test, msg| %> <% flash.each do |test, msg| %>
<% <%
@@ -24,70 +29,69 @@
str.gsub!('"]', '') %> str.gsub!('"]', '') %>
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable> <lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
<% end -%> <% end -%>
</div> </div>
<div class="form-group"> <div class="form-group">
<label><%= t("views.right_panel.detail.gender") %> :</label><br> <label><%= t("views.right_panel.detail.gender") %> :</label><br>
<label><%= t("views.right_panel.detail.male") %></label> <label><%= t("views.right_panel.detail.male") %>
<%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%> <%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%></label>
<label><%= t("views.right_panel.detail.female") %></label> <label><%= t("views.right_panel.detail.female") %>
<%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%> <%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%></label>
</div> </div>
<div class="form-group"> <div class="form-group">
<%= f.input :nrc_no,:label => "NRC No", :class => "form-control nrc_no" %> <%= f.input :nrc_no,:label => "NRC No", :class => "form-control nrc_no" %>
</div> </div>
<div class="form-group"> <div class="form-group">
<%= f.input :company, :class => "form-control col-md-6 company"%> <%= f.input :company, :class => "form-control col-md-6 company"%>
<% flash.each do |name, msg| %> <% flash.each do |name, msg| %>
<% str="[\"#{msg['company']}\"]" <% str="[\"#{msg['company']}\"]"
str.gsub!('["', '') str.gsub!('["', '')
str.gsub!('"]', '') %> str.gsub!('"]', '') %>
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable> <lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
<% end -%> <% end -%>
</div> </div>
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>"> <div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
<%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%> <%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%>
<% flash.each do |name, msg| %> <% flash.each do |name, msg| %>
<% str="[\"#{msg['contact_no']}\"]" <% str="[\"#{msg['contact_no']}\"]"
str.gsub!('["', '') str.gsub!('["', '')
str.gsub!('"]', '') %> str.gsub!('"]', '') %>
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable> <lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
<% end %> <% end %>
</div> </div>
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>"> <div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
<%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%> <%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%>
<% flash.each do |name, msg| %> <% flash.each do |name, msg| %>
<% str="[\"#{msg['email']}\"]" <% str="[\"#{msg['email']}\"]"
str.gsub!('["', '') str.gsub!('["', '')
str.gsub!('"]', '') %> str.gsub!('"]', '') %>
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable> <lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
<% end %> <% end %>
</div> </div>
<div class="form-group"> <div class="form-group">
<%= f.input :address, :class => "form-control col-md-6 address" %> <%= f.input :address, :class => "form-control col-md-6 address" %>
</div> </div>
<div class="form-group"> <div class="form-group">
<label><%= t("views.right_panel.detail.sr_no") %></label> <label><%= t("views.right_panel.detail.sr_no") %></label>
<div class="form-line disabled"> <div class="form-line disabled">
<input type="text" name="" value="<%=@count_customer%>" class="form-control" disabled="" > <input type="text" name="" value="<%=@count_customer%>" class="form-control" disabled="" >
</div> </div>
</div>
</div> <div class="form-group">
<div class="form-group">
<label><%= t("views.right_panel.detail.date_of_birth") %></label> <label><%= t("views.right_panel.detail.date_of_birth") %></label>
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%> <%= f.text_field :date_of_birth, :value=>"01-01-1990",:class=>"datepicker form-control col-md-12"%>
</div> </div>
<div class="form-group"> <div class="form-group">
<label><%= t("views.right_panel.detail.select_customer_type") %></label> <label><%= t("views.right_panel.detail.select_customer_type") %></label>
<select class="form-control col-md-12 selectpicker show-tick" id="customer_type" name="customer[customer_type]" style="height: " > <select class="form-control col-md-12 selectpicker show-tick" id="customer_type" name="customer[customer_type]" style="height: " >
<% Lookup.where("lookup_type = ?", "customer_type" ).each do |ct| %> <% Lookup.where("lookup_type = ?", "customer_type" ).each do |ct| %>
@@ -95,31 +99,31 @@
<%= ct.name %></option> <%= ct.name %></option>
<%end %> <%end %>
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %> <%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
</div> </div>
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>"> <div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%> <%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
<% flash.each do |name, msg| %> <% flash.each do |name, msg| %>
<% str="[\"#{msg['card_no']}\"]" <% str="[\"#{msg['card_no']}\"]"
str.gsub!('["', '') str.gsub!('["', '')
str.gsub!('"]', '') %> str.gsub!('"]', '') %>
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable> <lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
<% end %> <% end %>
</div> </div>
<div class="form-group"> <div class="form-group">
<label><%= t("views.right_panel.detail.paypar_account_no") %>:</label> <label><%= t("views.right_panel.detail.paypar_account_no") %>:</label>
<div class="-group"> <div class="-group">
<input type="text" class="form-control" id="paypar_account_no" name="customer[paypar_account_no]" readonly/> <input type="text" class="form-control" id="paypar_account_no" name="customer[paypar_account_no]" readonly/>
<div class="input-group-addon"><span class="fa fa-credit-card"></span></div> <div class="input-group-addon"><span class="fa fa-credit-card"></span></div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label><%= t("views.right_panel.detail.select_membership_group") %></label> <label><%= t("views.right_panel.detail.select_membership_group") %></label>
<select class="form-control col-md-12 selectpicker show-tick" name="member_group_id" style="height: " > <select class="form-control col-md-12 selectpicker show-tick" name="member_group_id" style="height: " >
<option value=""><%= t("views.right_panel.detail.select_membership_group") %></option> <option value=""><%= t("views.right_panel.detail.select_membership_group") %></option>
@@ -129,16 +133,16 @@
<%end %> <%end %>
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
<!-- <%= f.submit "Submit",:class => 'btn btn-primary ', :id => 'submit_customer' %> <!-- <%= f.submit "Submit",:class => 'btn btn-primary ', :id => 'submit_customer' %>
<%= f.submit "Update",:class => 'btn btn-info ', :disabled =>'', :id => 'update_customer' %> --> <%= f.submit "Update",:class => 'btn btn-info ', :disabled =>'', :id => 'update_customer' %> -->
<button type="submit" class="btn btn-primary" id="submit_customer"><%= t("views.btn.submit") %></button> <button type="submit" class="btn btn-primary" id="submit_customer"><%= t("views.btn.submit") %></button>
<button type="submit" class="btn btn-info" disabled id="update_customer"><%= t("views.btn.update") %></button> <button type="submit" class="btn btn-info" disabled id="update_customer"><%= t("views.btn.update") %></button>
<button type="button" class="btn btn-danger" id="reset"><%= t("views.btn.reset") %></button> <button type="button" class="btn btn-danger" id="reset"><%= t("views.btn.reset") %></button>
</div> </div>
<%end%> <%end%>
<div id="sxModal"> <div id="sxModal">
@@ -161,7 +165,7 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
// Read Card Reader // Read Card Reader
$("#paypar_account_no").on('focus', function(e){ $("#paypar_account_no").on('focus', function(e){
if($(this).val() == ''){ if($(this).val() == ''){
$("#sxModal").show(); $("#sxModal").show();

View File

@@ -12,7 +12,7 @@
<div class="row clearfix"> <div class="row clearfix">
<div class="col-lg-9 col-md-9 col-sm-9"> <div class="col-lg-9 col-md-9 col-sm-9">
<!-- <div class="main-box-body clearfix"> --> <div class="card">
<div class="body table-responsive"> <div class="body table-responsive">
<table class="table table-hover table-striped"> <table class="table table-hover table-striped">
<!-- <div class="table-responsive"> <!-- <div class="table-responsive">
@@ -53,9 +53,9 @@
</thead> </thead>
<tbody> <tbody>
<% if @crm_customers.count > 0 %>
<% @i = 0 %> <% @i = 0 %>
<% @crm_customers.each do |crm_customer| %> <% @crm_customers.each do |crm_customer| %>
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>"> <tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
<td> <td>
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td> <input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
@@ -71,22 +71,25 @@
<td><%= crm_customer.contact_no %></td> <td><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></td> <td><%= crm_customer.email %></td>
<td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td> <td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td>
</tr> </tr>
<% end %> <% end %>
<% else %>
<tr><td colspan="7"><strong><p style="text-align: center;margin-bottom: -1px">There is no data for search <%=@filter%>....</p></strong></td></tr>
<% end %>
</tbody> </tbody>
</table> </table>
<br> <br>
<%= paginate @crm_customers %> <%= paginate @crm_customers %>
</div> </div>
<!-- </div> --> </div>
</div> </div>
<div class="col-lg-3 col-md-3 col-sm-3"> <div class="col-lg-3 col-md-3 col-sm-3">
<div id="custom-slimscroll"> <div class="card">
<div class="body" id="custom-slimscroll">
<%= render 'new_form', crm_customer: @crm_customer, taxes: @taxes %> <%= render 'new_form', crm_customer: @crm_customer, taxes: @taxes %>
</div> </div>
</div>
<!-- <div class="col-lg-1 col-md-1 col-sm-1 "> <!-- <div class="col-lg-1 col-md-1 col-sm-1 ">
<br> <br>
<a href="<%= dashboard_path%>" class="btn btn-primary"> <a href="<%= dashboard_path%>" class="btn btn-primary">

View File

@@ -1,4 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<div class="card">
<div class="row p-l-20">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<%= simple_form_for([:crm,@dining_queue]) do |f| %> <%= simple_form_for([:crm,@dining_queue]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -6,6 +9,7 @@
<!-- <div class="col-md-6"> --> <!-- <div class="col-md-6"> -->
<div class="form-inputs"> <div class="form-inputs">
<%= f.input :queue_no , :class => "dining",:id => "dining", :readonly => true%> <%= f.input :queue_no , :class => "dining",:id => "dining", :readonly => true%>
<%= f.hidden_field :customer_id %>
<%= f.input :name %> <%= f.input :name %>
<%= f.input :contact_no %> <%= f.input :contact_no %>
<%= f.input :seater %> <%= f.input :seater %>
@@ -18,7 +22,6 @@
<!-- </div> --> <!-- </div> -->
<% end %> <% end %>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-5 col-lg-5"> <div class="col-xs-12 col-sm-12 col-md-5 col-lg-5">
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
@@ -76,6 +79,9 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</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-3 col-lg-3">
<div class="card"> <div class="card">
@@ -105,7 +111,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
if($('form').attr('id') == "new_dining_queue"){ if($('form').attr('id') == "new_dining_queue"){
var queue_no = $('.generate_no').text(); var queue_no = $('.generate_no').text();
@@ -156,5 +162,24 @@ $(document).ready(function(){
return false; return false;
} }
}); });
});
$('#dining_queue_name').autocomplete({
minLength: 1,
source: '<%= crm_dining_queues_path() %>',
focus: function(event, ui) {
$('#dining_queue_name').val(ui.item.name);
return false;
},
select: function(event, ui) {
$('#dining_queue_name').val(ui.item.name);
$('#dining_queue_customer_id').val(ui.item.customer_id);
return false;
}
}).data( "ui-autocomplete" )._renderItem = function( ul, item ) {
return $( "<li></li>" )
.data( "item.autocomplete", item )
.append( "<a>" + item.name + "</a>" )
.appendTo( ul );
};
});
</script> </script>

View File

@@ -132,7 +132,7 @@
<td align="right"><%= @summ_sale.total_discount %></td> <td align="right"><%= @summ_sale.total_discount %></td>
</tr> </tr>
<tr> <tr>
<td>Tax (Services+Commercial) : </td> <td>Total Tax : </td>
<td align="right"><%= @summ_sale.total_tax %></td> <td align="right"><%= @summ_sale.total_tax %></td>
</tr> </tr>
<tr> <tr>
@@ -147,7 +147,11 @@
<% if payment.payment_method == 'mpu' || payment.payment_method == 'visa' || payment.payment_method == 'master' || payment.payment_method == 'jcb' %> <% if payment.payment_method == 'mpu' || payment.payment_method == 'visa' || payment.payment_method == 'master' || payment.payment_method == 'jcb' %>
<tr> <tr>
<td>Card Sale : </td> <td>Card Sale : </td>
<td align="right"><%= @sale_data[0]['card'] %></td> <td align="right">
<% @sale_data.each do |data| %>
<%= data["card"] %>
<% end %>
</td>
</tr> </tr>
<% else %> <% else %>
<tr> <tr>
@@ -220,16 +224,16 @@
<table class="table"> <table class="table">
<% if !@total_order.nil? %> <% if !@total_order.nil? %>
<tr> <tr>
<td>Total Order : </td> <td width="40px">Total Order : </td>
<td align="right"><%= @total_order.total_order %></td> <td align="right" width="60px" style="padding: 5px"><%= @total_order.total_order %></td>
</tr> </tr>
<% end %> <% end %>
<% if !(@total_accounts.nil?) %> <% if !(@total_accounts.nil?) %>
<% @total_accounts.each do |account| %> <% @total_accounts.each do |account| %>
<tr> <tr>
<td><%= account.title %> (Account) : </td> <td width="40px"><%= account.title %> (Account) : </td>
<td align="right"> <td align="right" width="60px" style="padding: 5px">
<% @account_data.each do |data| %> <% @account_data.each do |data| %>
<% acc = account.title %> <% acc = account.title %>
<%= data[""+acc+""] %> <% if !data[''+acc+''].nil? %> ( <%= data[''+acc+'_amount'] %> ) <% end %> <%= data[""+acc+""] %> <% if !data[''+acc+''].nil? %> ( <%= data[''+acc+'_amount'] %> ) <% end %>
@@ -240,15 +244,15 @@
<% end %> <% end %>
<% if !@top_items.nil? %> <% if !@top_items.nil? %>
<tr> <tr>
<td>Top Item : </td> <td width="40px">Top Item : </td>
<td align="right"><%= @top_items.item_name %> <td align="right" width="60px" style="padding: 5px"><%= @top_items.item_name %>
<br>( <%= @top_items.item_total_price %> )</td> <br>(<%= @top_items.item_total_price %>)</td>
</tr> </tr>
<% end %> <% end %>
<% if !@total_foc_items.nil? %> <% if !@total_foc_items.nil? %>
<tr> <tr>
<td>Total FOC Item : </td> <td width="40px">Total FOC Item : </td>
<td align="right"><%= @total_foc_items %></td> <td align="right" width="60px" style="padding: 5px"><%= @total_foc_items %></td>
</tr> </tr>
<% end %> <% end %>
</table> </table>

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<div class="p-l-10"> <div class="p-l-10">
<%= simple_form_for([:inventory, @inventory_definition]) do |f| %> <%= simple_form_for([:inventory, @inventory_definition]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -53,10 +55,12 @@
<%= f.submit t("views.btn.submit"), class: 'btn bg-blue waves-effect' %> <%= f.submit t("views.btn.submit"), class: 'btn bg-blue waves-effect' %>
</div> </div>
<% end %> <% end %>
</div> </div>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> </div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">
<div class="body"> <div class="body">
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i> </h5> <h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i> </h5>
@@ -77,8 +81,8 @@
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.home_txt") %> <br> 2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.home_txt") %> <br>
</p> </p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -112,4 +116,4 @@
}); });
</script> </script>

View File

@@ -3,7 +3,7 @@
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li> <li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.stock_check") %></li> <li class="breadcrumb-item active"><%= t("views.right_panel.detail.stock_check") %></li>
<span class="float-right"> <span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %> <%= link_to t('.back', :default => t("views.btn.back")), inventory_path %>
</span> </span>
</ol> </ol>
</div> </div>

View File

@@ -4,7 +4,7 @@
<li class="breadcrumb-item"><a href="<%=inventory_stock_checks_path%>"></a><%= t("views.right_panel.detail.stock_check") %></li> <li class="breadcrumb-item"><a href="<%=inventory_stock_checks_path%>"></a><%= t("views.right_panel.detail.stock_check") %></li>
<li class="breadcrumb-item active"><%= t :details %></li> <li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right"> <span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %> <%= link_to t('.back', :default => t("views.btn.back")), inventory_path %>
</span> </span>
</ol> </ol>
</div> </div>

View File

@@ -22,7 +22,7 @@
</div> </div>
<!-- Start Delete confirrm text !--> <!-- Start Delete confirrm text !-->
<div class="navbar-right"> <div class="navbar-right">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> <a href="javascript:void(0);" class="dropdown-toggle waves-block" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<% if current_login_employee %> <% if current_login_employee %>
<span><%= current_login_employee.name %></span> <span><%= current_login_employee.name %></span>
<% end %> <% end %>
@@ -30,7 +30,10 @@
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li> <li>
<%if current_login_employee.role !="waiter" %> <%if current_login_employee.role !="waiter" %>
<p class="delete waves-effect waves-block" style="padding:0.5rem 1rem; margin-bottom: 0rem;" data-ref="<%=logout_path%>" data-method="delete">Logout</p> <p class="delete waves-effect waves-block p-l-30 m-t-15" data-ref="<%=logout_path%>" data-method="delete">
<i class="material-icons">exit_to_app</i>
<span class="font-18 m-b-5">Logout</span>
</p>
<span class="hidden" id="delete_text"> <span class="hidden" id="delete_text">
<h6>Are you sure you want to Logout ?</h6> <h6>Are you sure you want to Logout ?</h6>
<!-- <h6>This action can't be undo. </h6> --> <!-- <h6>This action can't be undo. </h6> -->

View File

@@ -85,7 +85,7 @@
<div class="row m-b-15"> <div class="row m-b-15">
<% @employees.each do |employee| %> <% @employees.each do |employee| %>
<%if employee.role == "supervisour" %> <%if employee.role == "supervisor" %>
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 empBtn" data-formid="#form_<%= employee.emp_id %>" > <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 empBtn" data-formid="#form_<%= employee.emp_id %>" >
<form id="form_<%= employee.emp_id %>" action="<%= emp_login_path(employee.emp_id) %>" method="PATCH"> <form id="form_<%= employee.emp_id %>" action="<%= emp_login_path(employee.emp_id) %>" method="PATCH">
</form> </form>

View File

@@ -69,7 +69,7 @@
<% <%
@queue_completed_item.each do |qid| @queue_completed_item.each do |qid|
%> %>
<div class="card queue_station"> <div class="card queue_station" data-order-no="<%= qid.order_id %>">
<div class="card-block"> <div class="card-block">
<div class="row"> <div class="row">
<span class="col-md-4 order-zone-type font-13"><%= qid.type %>-<%= qid.zone %></span> <span class="col-md-4 order-zone-type font-13"><%= qid.type %>-<%= qid.zone %></span>
@@ -167,13 +167,9 @@
<!-- Column Three --> <!-- Column Three -->
<div class="col-lg-1 col-md-1 col-sm-1"> <div class="col-lg-1 col-md-1 col-sm-1">
<!-- OQS Buttons --> <!-- OQS Buttons -->
<button type="button" class="btn btn-block btn-default waves-effect" id='back'> <a href="<%= dashboard_path %>" class="btn btn-sm btn-block btn-default waves-effect" role="button" aria-haspopup="true"><i class="material-icons">reply</i> Back </a>
<i class="material-icons m-t--10">reply</i> <button type="button" title="Print Order Item" id="print_order_item" class="btn bg-blue btn-block btn-lg waves-effect">Print</a>
Back
</button>
<button type="button" title="Print Order Item" id="print_order_item" class="btn bg-blue btn-block btn-lg waves-effect">Print</button>
<button type="button" class="btn bg-blue btn-block btn-lg waves-effect" id="print_order_summary">Print <br/>Order<br/>Summary</button> <button type="button" class="btn bg-blue btn-block btn-lg waves-effect" id="print_order_summary">Print <br/>Order<br/>Summary</button>
<!-- <a href="<%= dashboard_path %>" class="btn bg-blue btn-block btn-lg waves-effect" role="button" aria-haspopup="true"> Back </a> -->
<!-- <button type="button" class="" id="print_order_summary">Print <br/>Order<br/>Summary</button> --> <!-- <button type="button" class="" id="print_order_summary">Print <br/>Order<br/>Summary</button> -->
</div> </div>
</div> </div>

View File

@@ -90,6 +90,7 @@ json.options opt_format
# json.item_attributes = item_instance.item_attributes # json.item_attributes = item_instance.item_attributes
json.instances item.menu_item_instances do |is| json.instances item.menu_item_instances do |is|
if is.is_available
# Convert id to name for attributes # Convert id to name for attributes
instance_attr = [] instance_attr = []
is.item_attributes.each do |ia| is.item_attributes.each do |ia|
@@ -107,6 +108,7 @@ json.instances item.menu_item_instances do |is|
json.promotion_price is.promotion_price json.promotion_price is.promotion_price
json.values instance_attr json.values instance_attr
# json.item_sets is.item_sets # json.item_sets is.item_sets
end
end end
#Child Menu items #Child Menu items

View File

@@ -51,7 +51,7 @@
<th class="item-attr">Price</th> <th class="item-attr">Price</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody class="font-13">
</tbody> </tbody>
</table> </table>
@@ -140,7 +140,7 @@
</button> </button>
</span> </span>
<input type="number" value="1" id="count" class="change_qty keypress_qty form-control col-md-12 "> <input type="text" value="1" id="count" class="change_qty keypress_qty form-control col-md-12 ">
<span class="input-group-btn"> <span class="input-group-btn">
<button type="button" class="btn btn-success btn-number" value="+" id="plus"> <button type="button" class="btn btn-success btn-number" value="+" id="plus">
<i class="material-icons">add</i> <i class="material-icons">add</i>
@@ -214,7 +214,7 @@
<i class="material-icons">remove</i> <i class="material-icons">remove</i>
</button> </button>
</span> </span>
<input type="number" value="1" id="set_count" class="set_change_qty keypress_qty form-control col-md-12 "> <input type="text" value="1" id="set_count" class="set_change_qty keypress_qty form-control col-md-12 ">
<span class="input-group-btn"> <span class="input-group-btn">
<button type="button" class="btn btn-success btn-number" value="+" id="set_plus"> <button type="button" class="btn btn-success btn-number" value="+" id="set_plus">
<i class="material-icons">add</i> <i class="material-icons">add</i>

View File

@@ -95,16 +95,16 @@
</div> </div>
</div> </div>
<div class="col-lg-6 col-md-6 col-sm-6"> <div class="col-lg-6 col-md-6 col-sm-6">
<div class="row bottom"> <div class="row bottom p-l-20">
<div class="cashier_number long border-left" data-value="1000" data-type="add">1000</div> <div class="cashier_number col-md-5 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 class="cashier_number col-md-5 long left" data-value="3000" data-type="add">3000</div>
</div> </div>
<div class="row bottom"> <div class="row bottom p-l-20">
<div class="cashier_number long border-left" data-value="5000" data-type="add">5000</div> <div class="cashier_number col-md-5 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 class="cashier_number col-md-5 long left" data-value="10000" data-type="add">10000</div>
</div> </div>
<div class="row bottom"> <div class="row bottom p-l-20">
<div class="pay purple left" id="credit_pay">Pay</div> <div class="pay purple left col-md-10" id="credit_pay">Pay</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -13,7 +13,7 @@
<div class="row"> <div class="row">
<div class="col-lg-8 col-md-8 col-sm-8"> <div class="col-lg-8 col-md-8 col-sm-8">
<div class="card">
<div class="main-box-body clearfix" id="order-detail-slimscroll" style=""> <div class="main-box-body clearfix" id="order-detail-slimscroll" style="">
<div class="table-responsive"> <div class="table-responsive">
<table id="origami-crm-table" class="table table-striped"> <table id="origami-crm-table" class="table table-striped">
@@ -53,12 +53,12 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th>Select</th> <th></th>
<th>Sr.no</th> <th><%= t("views.right_panel.detail.sr_no") %></th>
<th>Name</th> <th><%= t("views.right_panel.detail.name") %></th>
<th>Company</th> <th><%= t("views.right_panel.detail.card_no") %></th>
<th>Contact no</th> <th><%= t("views.right_panel.detail.contact_no") %></th>
<th>Email</th> <th><%= t("views.right_panel.detail.email") %></th>
<!-- <th>Paypar No</th> --> <!-- <th>Paypar No</th> -->
</tr> </tr>
</thead> </thead>
@@ -96,12 +96,13 @@
<%= paginate @crm_customers %> <%= paginate @crm_customers %>
</div> </div>
</div> </div>
</div>
</div> </div>
<!-- <div class="col-lg-4 col-md-4 col-sm-4" style="min-height:600px; max-height:600px; overflow-x:scroll"> --> <!-- <div class="col-lg-4 col-md-4 col-sm-4" style="min-height:600px; max-height:600px; overflow-x:scroll"> -->
<div class="col-lg-3 col-md-3 col-sm-3" > <div class="col-lg-3 col-md-3 col-sm-3" >
<div id="custom-slimscroll"> <div class="card">
<div class="body" id="custom-slimscroll">
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %> <%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
<span class="patch_method"></span> <span class="patch_method"></span>
@@ -111,15 +112,15 @@
<%= f.error_notification %> <%= f.error_notification %>
<%= f.hidden_field :id, :class => "form-control col-md-6 " %> <%= f.hidden_field :id, :class => "form-control col-md-6 " %>
<div class="form-group"> <div class="form-group">
<label>Salutation :</label><br> <label><%= t("views.right_panel.detail.salutation") %> :</label><br>
<label class="font-13">Mr</label> <label class="font-15"><%= t("views.right_panel.detail.mr") %>
<%= f.radio_button :salutation,"Mr", :class => "salutation mr", :value=>"Mr"%> <%= f.radio_button :salutation,"Mr", :class => "salutation mr", :value=>"Mr"%></label>
<label class="m-l--20">Miss</label> <label class="font-15 m-l-20"><%= t("views.right_panel.detail.miss") %>
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs", :value=>"Mrs"%> <%= f.radio_button :salutation,"Mrs", :class => "salutation mrs", :value=>"Mrs"%></label>
<label class="m-l--20">Mrs</label> <label class="font-15 m-l-20"><%= t("views.right_panel.detail.mrs") %>
<%= f.radio_button :salutation,"Miss", :class => "salutation miss", :value=>"Miss"%> <%= f.radio_button :salutation,"Miss", :class => "salutation miss", :value=>"Miss"%></label>
<label class="m-l--20">Mdm</label> <label class="font-15 m-l-20"><%= t("views.right_panel.detail.mdm") %>
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm", :value=>"Mdm"%> <%= f.radio_button :salutation,"Mdm", :class => "salutation mdm", :value=>"Mdm"%></label>
</div> </div>
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>"> <div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
@@ -134,11 +135,11 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label>Gender :</label><br> <label><%= t("views.right_panel.detail.gender") %> :</label><br>
<label>Male</label> <label><%= t("views.right_panel.detail.male") %>
<%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%> <%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%></label>
<label>Female</label> <label><%= t("views.right_panel.detail.female") %>
<%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%> <%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%></label>
</div> </div>
<div class="form-group"> <div class="form-group">
@@ -180,16 +181,16 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label>Sr.No</label> <label><%= t("views.right_panel.detail.sr_no") %></label>
<input type="text" name="" value="<%=@count_customer%>" class="form-control" readonly="true"> <input type="text" name="" value="<%=@count_customer%>" class="form-control" readonly="true">
</div> </div>
<div class="form-group"> <div class="form-group">
<label>Date Of Birth</label> <label><%= t("views.right_panel.detail.date_of_birth") %></label>
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%> <%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>Select Customer Type</label> <label><%= t("views.right_panel.detail.select_customer_type") %></label>
<select class="form-control col-md-12" id="customer_type" name="customer[customer_type]" style="height: 40px" > <select class="form-control col-md-12" id="customer_type" name="customer[customer_type]" style="height: 40px" >
<% Lookup.where("lookup_type = ?", "customer_type" ).each do |ct| %> <% Lookup.where("lookup_type = ?", "customer_type" ).each do |ct| %>
<option value="<%= ct.value %>"> <option value="<%= ct.value %>">
@@ -212,7 +213,7 @@
<% end -%> <% end -%>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>Paypar Account No:</label> <label><%= t("views.right_panel.detail.paypar_account_no") %>:</label>
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" id="paypar_account_no" name="customer[paypar_account_no]" readonly /> <input type="text" class="form-control" id="paypar_account_no" name="customer[paypar_account_no]" readonly />
<div class="input-group-addon"><span class="fa fa-credit-card"></span></div> <div class="input-group-addon"><span class="fa fa-credit-card"></span></div>
@@ -220,9 +221,9 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label>Select Member Group</label> <label><%= t("views.right_panel.detail.select_membership_group") %></label>
<select class="form-control col-md-12" name="member_group_id"> <select class="form-control col-md-12" name="member_group_id">
<option value="">Select Membership Group</option> <option value=""><%= t("views.right_panel.detail.select_membership_group") %></option>
<% Lookup.where("lookup_type = ?", "member_group_type" ).each do |member| %> <% Lookup.where("lookup_type = ?", "member_group_type" ).each do |member| %>
<option value="<%= member.value %>"> <option value="<%= member.value %>">
<%= member.name %></option> <%= member.name %></option>
@@ -231,12 +232,13 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect', :id => 'submit_customer' %> <%= f.submit t("views.btn.submit"),:class => 'btn btn-primary btn-lg waves-effect', :id => 'submit_customer' %>
<!-- <%= f.button :submit, "Update",:class => 'btn bg-blue btn-block', :disabled =>'', :id => 'update_customer' %> --> <!-- <%= f.button :submit, "Update",:class => 'btn bg-blue btn-block', :disabled =>'', :id => 'update_customer' %> -->
</div> </div>
</div>
<%end%> <%end%>
</div> </div>
</div>
</div>
<!-- Column Three --> <!-- Column Three -->
<div class="col-lg-1 col-md-1 col-sm-1"> <div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button> <button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
@@ -246,8 +248,8 @@
<div id="sxModal"> <div id="sxModal">
<div id="sxModal-Content"><h3>Card Tap</h3></div> <div id="sxModal-Content"><h3>Card Tap</h3></div>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
/*$('.datepicker').datepicker({ /*$('.datepicker').datepicker({
setDate: '12-12-1999', setDate: '12-12-1999',

View File

@@ -127,7 +127,7 @@
<hr /> <hr />
<div class="p-l-20"> <div class="p-l-20">
<div class="row"> <div class="row">
<div class="col-md-9"> <div class="col-md-8">
<div class="row bottom"> <div class="row bottom">
<div class="col-md-3"> <div class="col-md-3">
<div class="fluid cashier_number" data-value="5" data-type="add">5%</div> <div class="fluid cashier_number" data-value="5" data-type="add">5%</div>
@@ -193,11 +193,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-4">
<div class="col-md-3">
<div class="form-group"> <div class="form-group">
<button id="net" class="btn bg-info fluid action-btn">Nett</button> <button id="net" class="btn bg-info fluid action-btn">Nett</button>
<button id="percentage" class="btn bg-primary fluid action-btn">Percentage</button> <button id="percentage" class="btn bg-primary fluid action-btn" style="font-size: 12.4px">Percentage</button>
<button id="remove-item" class="btn bg-default fluid action-btn">Clear Discount</button> <button id="remove-item" class="btn bg-default fluid action-btn">Clear Discount</button>
</div> </div>
</div> </div>

View File

@@ -143,7 +143,7 @@
<div class="row p-l-5 p-r-5"> <div class="row p-l-5 p-r-5">
<% if (!@sale_array.empty?) && (!@date.nil?) %> <% if (!@sale_array.empty?) && (!@date.nil?) %>
<div class="col-lg-6 col-md-6 col-sm-6"> <div class="col-lg-6 col-md-6 col-sm-6">
Receipt No: <span id="receipt_no"> &nbsp; Receipt No: <span id="receipt_no">
<% if @status_sale == 'sale' %> <% if @status_sale == 'sale' %>
<%= @sale_array[0].receipt_no rescue '' %> <%= @sale_array[0].receipt_no rescue '' %>
@@ -152,12 +152,12 @@
<br> <br>
</div> </div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right"> <div class="col-lg-6 col-md-6 col-sm-6 text-right">
Date: <span id="receipt_date"><%= @date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %></span> Date: <span id="receipt_date"><%= @date.utc.getlocal.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %></span>
<br> <br>
</div> </div>
<% elsif !@date.nil? %> <% elsif !@date.nil? %>
<div class="col-lg-6 col-md-6 col-sm-6"> <div class="col-lg-7 col-md-7 col-sm-7">
Order No: <span id="order_no"> &nbsp; Order No: <span id="order_no">
<% if @status_order == 'order' %> <% if @status_order == 'order' %>
<%= @obj_order.order_id rescue '' %> <%= @obj_order.order_id rescue '' %>
@@ -165,8 +165,8 @@
</span> </span>
<br> <br>
</div> </div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right"> <div class="col-lg-5 col-md-5 col-sm-5 text-right">
Date: <span id="receipt_date"><%= @date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %></span> Date: <span id="receipt_date"><%= @date.utc.getlocal.strftime("%d/%m/%Y") rescue '-' %></span>
<br> <br>
</div> </div>
<% end %> <% end %>
@@ -176,18 +176,18 @@
<% if @status_sale == 'sale' %> <% if @status_sale == 'sale' %>
<p class="hidden customer-id"><%= @sale_array[0].customer_id rescue '' %></p> <p class="hidden customer-id"><%= @sale_array[0].customer_id rescue '' %></p>
Customer : <%= @sale_array[0].customer.name rescue '' %> &nbsp; Customer : <%= @sale_array[0].customer.name rescue '' %>
<% elsif @status_order == 'order' <% elsif @status_order == 'order'
%> %>
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p> <p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
Customer : <%= @customer.name rescue "" %> &nbsp; Customer : <%= @customer.name rescue "" %>
<% end %> <% end %>
</div> </div>
</div> </div>
</div> </div>
<div id="order-detail-slimscroll" data-height="<%= @status_sale=="sale" ? 200 : 160%>"> <div id="order-detail-slimscroll" data-height="<%= @status_sale=="sale" ? 200 : 160%>">
<div class="card-text order-info" > <div class="card-text" >
<table class="table table-striped" id="order-items-table"> <table class="table table-striped" id="order-items-table">
<thead> <thead>
<tr> <tr>
@@ -361,7 +361,7 @@
<button type="button" id="add_order" class="btn btn-block bg-blue waves-effect"><%= t("views.btn.add") %> <%= t("views.right_panel.detail.order") %></button> <button type="button" id="add_order" class="btn btn-block bg-blue waves-effect"><%= t("views.btn.add") %> <%= t("views.right_panel.detail.order") %></button>
<button type="button" id="survey" class="btn btn-block bg-blue waves-effect"><%= t("views.right_panel.detail.survey") %></button> <button type="button" id="survey" class="btn btn-block bg-blue waves-effect"><%= t("views.right_panel.detail.survey") %></button>
<% if @dining.status != "available" %> <% if @dining.status != "available" %>
<% if @status_order == 'order' %> <% if @status_order == 'order' && @status_sale != 'sale' %>
<button type="button" id="customer" class="btn btn-block bg-blue waves-effect" >Customer</button> <button type="button" id="customer" class="btn btn-block bg-blue waves-effect" >Customer</button>
<!-- <button type="button" class="btn btn-block bg-blue waves-effect" disabled>Edit</button> --> <!-- <button type="button" class="btn btn-block bg-blue waves-effect" disabled>Edit</button> -->
<!-- <button type="button" id="discount" class="btn btn-block bg-blue waves-effect" disabled>Discount</button> --> <!-- <button type="button" id="discount" class="btn btn-block bg-blue waves-effect" disabled>Discount</button> -->
@@ -379,8 +379,6 @@
<button type="button" id="other-charges" class="btn btn-block bg-blue waves-effect">Charges</button> <button type="button" id="other-charges" class="btn btn-block bg-blue waves-effect">Charges</button>
<button type="button" id="commissions" class="btn btn-block bg-blue waves-effect">Commissions</button> <button type="button" id="commissions" class="btn btn-block bg-blue waves-effect">Commissions</button>
<button type="button" id="in_duties" class="btn btn-block bg-blue waves-effect">In Duties</button> <button type="button" id="in_duties" class="btn btn-block bg-blue waves-effect">In Duties</button>
<!-- <button type="button" class="btn btn-block bg-blue waves-effect" id='move' disabled="">Move</button> -->
<!-- <button type="button" id="request_bills" class="btn btn-block bg-blue waves-effect" disabled> Req.Bill</button> -->
<button type="button" id="first_bill" class="btn btn-block bg-blue waves-effect">First Bill</button> <button type="button" id="first_bill" class="btn btn-block bg-blue waves-effect">First Bill</button>
<button type="button" id="pay" class="btn btn-block bg-blue waves-effect">Pay</button> <button type="button" id="pay" class="btn btn-block bg-blue waves-effect">Pay</button>
<button type="button" id="void" class="btn btn-block bg-blue waves-effect"> Void</button> <button type="button" id="void" class="btn btn-block bg-blue waves-effect"> Void</button>

View File

@@ -1,4 +1,6 @@
<%= simple_form_for @in_juty, :url => origami_index_in_juty_path(@table.id), :method => :post do |f| %> <%= simple_form_for @in_juty, :url => origami_index_in_juty_path(@table.id), :method => :post do |f| %>
<div class="card">
<div class="body">
<span class="patch_method"></span> <span class="patch_method"></span>
<%= f.error_notification %> <%= f.error_notification %>
<%= f.hidden_field :id, :class => "form-control col-md-6 " %> <%= f.hidden_field :id, :class => "form-control col-md-6 " %>
@@ -18,7 +20,8 @@
<button type="button" class="btn btn-inverse pull-right" id='back'> <button type="button" class="btn bg-default btn-block" onclick="window.location.href = "origami_index_in_duty_path(@table.id)"><i class="material-icons">reply</i> Back </button>Back</button> <button type="button" class="btn btn-inverse pull-right" id='back'> <button type="button" class="btn bg-default btn-block" onclick="window.location.href = "origami_index_in_duty_path(@table.id)"><i class="material-icons">reply</i> Back </button>Back</button>
</div> </div>
</div>
</div>
<% end %> <% end %>

View File

@@ -1,6 +1,7 @@
<%= simple_form_for([:origami, @in_duty]) do |f| %> <%= simple_form_for([:origami, @in_duty]) do |f| %>
<div class="card">
<div class="body">
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-inputs"> <div class="form-inputs">
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %> <%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %>
<br/><br/> <br/><br/>
@@ -11,4 +12,7 @@
<div class="form-actions"> <div class="form-actions">
<%= f.button :submit %> <%= f.button :submit %>
</div> </div>
</div>
</div>
<% end %> <% end %>

View File

@@ -1,5 +1,7 @@
<br> <br>
<%= simple_form_for @in_duty, :url => origami_index_in_duty_path, :method => :post do |f| %> <%= simple_form_for @in_duty, :url => origami_index_in_duty_path, :method => :post do |f| %>
<div class="card">
<div class="body">
<span class="patch_method"></span> <span class="patch_method"></span>
<%= f.error_notification %> <%= f.error_notification %>
<%= f.hidden_field :id, :class => "form-control col-md-6 " %> <%= f.hidden_field :id, :class => "form-control col-md-6 " %>
@@ -48,6 +50,9 @@
<div class="form-actions"> <div class="form-actions">
<%= f.submit "Create In Duty", :class => 'btn bg-blue' %> <%= f.submit "Create In Duty", :class => 'btn bg-blue' %>
</div> </div>
</div>
</div>
<% end %> <% end %>

View File

@@ -4,8 +4,9 @@
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<%= simple_form_for([:origami,@in_duty]) do |f| %> <%= simple_form_for([:origami,@in_duty]) do |f| %>
<div class="card">
<div class="body">
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-inputs"> <div class="form-inputs">
<label>Dining Name:</label> <label>Dining Name:</label>
<%= @table.name %> <%= @table.name %>
@@ -29,6 +30,8 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
<% end %> <% end %>
</div> </div>
</div> </div>

View File

@@ -193,7 +193,7 @@
<!-- Action Panel --> <!-- Action Panel -->
<div> <div>
<button type="button" class="btn bg-default btn-block" onclick="window.location.href = '/origami/<%=@table.type.downcase%>/<%=@table.id%>'"><i class="material-icons">reply</i> Back </button> <button type="button" class="btn bg-default btn-block" onclick="window.location.href = '/origami/<%=@table.type.downcase%>/<%=@table.id%>'"><i class="material-icons">reply</i> Back </button>
<button id="charge_other" class="btn bg-success btn-block action-btn">Enter</button> <button id="charge_other" class="btn bg-primary btn-block action-btn">Enter</button>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -137,32 +137,47 @@
</div> </div>
<div class="card-block"> <div class="card-block">
<div class="card-title row p-l-5 p-r-5"> <div class="card-title row p-l-5 p-r-5">
<div class="col-lg-6 col-md-6 col-sm-6">
Receipt No: <span id="receipt_no">
<% if @status_sale == 'sale' %>
<%= @obj_sale.receipt_no rescue '' %>
<% end %> <% if @status_sale == 'sale' %>
<div class="col-lg-6 col-md-6 col-sm-6">
&nbsp; Receipt No:
<span id="receipt_no">
<%= @obj_sale.receipt_no rescue '' %>
</span> </span>
</div> </div>
<% else %>
<div class="col-lg-7 col-md-7 col-sm-7">
&nbsp; Order No:
<span id="receipt_no">
<%= @obj_order.order_id rescue '' %>
</span>
</div>
<% end %>
<% if @status_sale == 'sale' %>
<div class="col-lg-6 col-md-6 col-sm-6 text-right"> <div class="col-lg-6 col-md-6 col-sm-6 text-right">
Date: <span id="receipt_date"><%= @date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span> Date: <span id="receipt_date"><%= @date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span>
</div> </div>
<% else %>
<div class="col-lg-5 col-md-5 col-sm-5 text-right">
Date: <span id="receipt_date"><%= @date.utc.getlocal.strftime("%d/%m/%Y") rescue '-'%></span>
</div>
<% end %>
</div> </div>
<div class="card-title row customer_detail p-l-5 p-r-5" > <div class="card-title row customer_detail p-l-5 p-r-5" >
<div class="col-lg-6 col-md-6 col-sm-6"> <div class="col-lg-6 col-md-6 col-sm-6">
<% if @status_sale == 'sale' %> <% if @status_sale == 'sale' %>
<p class="hidden customer-id"><%= @obj_sale_sale.customer_id rescue '' %></p> <p class="hidden customer-id"><%= @obj_sale_sale.customer_id rescue '' %></p>
Customer : <%= @obj_sale.customer.name rescue '-' %> &nbsp; Customer : <%= @obj_sale.customer.name rescue '-' %>
<%else%> <%else%>
<p class="hidden customer-id"><%= @obj_order.customer_id rescue "-" %></p> <p class="hidden customer-id"><%= @obj_order.customer_id rescue "-" %></p>
Customer : <%= @customer.name rescue "-" %> &nbsp; Customer : <%= @customer.name rescue "-" %>
<%end%> <%end%>
</div> </div>
</div> </div>
<div id="order-detail-slimscroll" data-height="<%= @status_sale=="sale" ? 240 : 160%>"> <div id="order-detail-slimscroll" data-height="<%= @status_sale=="sale" ? 240 : 160%>">
<div class="card-text order-info"> <div class="card-text">
<table class="table table-striped" id="order-items-table"> <table class="table table-striped" id="order-items-table">
<thead> <thead>
<tr> <tr>

View File

@@ -1,21 +1,24 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
<div class="card">
<%= simple_form_for(@survey, :url => origami_create_surveys_path) do |f| %> <%= simple_form_for(@survey, :url => origami_create_surveys_path) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-inputs p-l-10"> <div class="form-inputs p-l-10">
<%= f.input :child%> <%= f.input :child , input_html: { class: 'col-md-10' }%>
<%= f.input :adult %> <%= f.input :adult , input_html: { class: 'col-md-10' }%>
<%= f.input :male %> <%= f.input :male , input_html: { class: 'col-md-10' }%>
<%= f.input :female %> <%= f.input :female , input_html: { class: 'col-md-10' }%>
<%= f.input :local %> <%= f.input :total_customer, input_html: { class: 'col-md-10'} %>
<%= f.input :local , input_html: { class: 'col-md-10' }%>
<div class="row clearfix"> <div class="row clearfix">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 ">
<div class="form-group"> <div class="form-group p-l-10 p-r-10">
<label>Foreigner</label> <label class="p-l-10">Foreigner</label>
<select class="form-control col-md-12 selectpicker show-tick" name="survey[foreigner][][]" style="height: " > <!-- <input type="text" class="form-control" name="survey[foreigner][]"> -->
<select class="form-control col-md-12 selectpicker show-tick" name="survey[foreigner][]" style="height: " >
<% Lookup.where("lookup_type = ?", "country" ).each do |ct| %> <% Lookup.where("lookup_type = ?", "country" ).each do |ct| %>
<option value="<%= ct.value %>"> <option value="<%= ct.value %>">
<%= ct.name %></option> <%= ct.name %></option>
@@ -23,15 +26,21 @@
</select> </select>
</div> </div>
</div> </div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 ">
<div class="form-group p-l-10 p-r-10">
<label class="p-l-10">Number</label>
<input type="number" name="survey[foreigner][]" class="form-control">
</div>
</div>
<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1 ">
<br>
<button type="button" class="btn btn-success" id="addForeigner">Add</button>
</div>
</div>
<div class="hidden" id="newTemplate" >
<div class="form-group">
<label>Number</label>
<input type="number" name="survey[foreigner][][]" class="form-control">
</div> </div>
</div>
</div>
<%= f.input :total_customer %>
<input type="hidden" name="table_id" value="<%=@dining_facility.id%>"> <input type="hidden" name="table_id" value="<%=@dining_facility.id%>">
<%= f.input :dining_name, :as => :hidden, :input_html => { :value => @dining_facility.name } %> <%= f.input :dining_name, :as => :hidden, :input_html => { :value => @dining_facility.name } %>
<%= f.input :created_by, :as => :hidden, :input_html => { :value => current_login_employee.name } %> <%= f.input :created_by, :as => :hidden, :input_html => { :value => current_login_employee.name } %>
@@ -43,7 +52,67 @@
</div> </div>
<% end %> <% end %>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3"> </div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="p-l-70 m-b-10 m-t-10">
<div class="row bottom">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 m-l--5">
<div class="row m-l--5">
<div class="col-md-3 left cashier_number" data-value="1" data-type="num">1</div>
<div class="col-md-3 left cashier_number" data-value="2" data-type="num">2</div>
<div class="col-md-3 left cashier_number" data-value="3" data-type="num">3</div>
</div>
</div>
</div>
<div class="row bottom">
<div class="col-md-12 m-l--5">
<div class="row m-l--5">
<div class="col-md-3 left cashier_number" data-value="4" data-type="num">4</div>
<div class="col-md-3 left cashier_number" data-value="5" data-type="num">5</div>
<div class="col-md-3 left cashier_number" data-value="6" data-type="num">6</div>
</div>
</div>
</div>
<div class="row bottom">
<div class="col-md-12 m-l--5">
<div class="row m-l--5">
<div class="col-md-3 left cashier_number" data-value="7" data-type="num">7</div>
<div class="col-md-3 left cashier_number" data-value="8" data-type="num">8</div>
<div class="col-md-3 left cashier_number" data-value="9" data-type="num">9</div>
</div>
</div>
</div>
<div class="row bottom">
<div class="col-md-12 m-l--5">
<div class="row m-l--5">
<div class="col-md-3 left cashier_number" data-value="0" data-type="num">0</div>
<div class="col-md-3 left cashier_number" data-value="." data-type="num">.</div>
<div class="col-md-3 left cashier_number" data-value="00" data-type="num">00</div>
</div>
</div>
</div>
<div class="row bottom">
<div class="col-md-12 m-l--5">
<div class="row m-l--5">
<div class="col-md-3 left cashier_number"></div>
<div class="col-md-3 left cashier_number red" data-type="del">DEL</div>
<div class="col-md-3 left cashier_number green" data-type="clr">CLR</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3 hidden">
<div class="card"> <div class="card">
<div class="body"> <div class="body">
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5> <h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
@@ -77,6 +146,85 @@
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
//click add button for new row
$('#addForeigner').on('click',function(){
$('#newTemplate').removeClass('hidden');
var text_box = '<div id="newRow" class="row clearfix">'
+'<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 ">'
+'<div class="form-group p-l-10 p-r-10">'
+' <select class="form-control col-md-12 selectpicker show-tick" '
+' name="survey[foreigner][]" style="height: " >'
+'<% Lookup.where("lookup_type = ?", "country" ).each do |ct| %>'
+'<option value="<%= ct.value %>">'
+'<%= ct.name %></option>'
+'<%end %>'
+'</select>'
+'</div>'
+'</div>'
+'<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 ">'
+'<div class="form-group p-l-10 p-r-10">'
+'<input type="number" name="survey[foreigner][]" class="form-control">'
+'</div>'
+'</div>'
+'<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1 ">'
+'<button type="button" class="btn btn-danger" id="removeRow">Remove</button>'
+'</div>'
+'</div>';
$('#newTemplate').append(text_box);
});
//click remove buttom
$('#newTemplate').on('click','#removeRow', function(){
$(this).parent().parent().remove()
});
$( "input" ).focusin(function() {
$('.addfocus').removeClass('addfocus');
$( this ).addClass('addfocus');
});
$(".cashier_number").on('click', function(event){
if(event.handled !== true) {
var original_value='';
original_value = $('.addfocus').val();
var input_type = $(this).attr("data-type");
switch (input_type) {
case 'num':
var input_value = $(this).attr("data-value");
if (original_value == "0.0"){
$('.addfocus').val(input_value);
}
else{
$('.addfocus').val(original_value + '' + input_value);
}
break;
case 'add':
var input_value = $(this).attr("data-value");
amount = parseInt(input_value);
$('.addfocus').val(amount);
break;
case 'del' :
var discount_text=$('.addfocus').val();
$('.addfocus').val(discount_text.substr(0,discount_text.length-1));
break;
case 'clr':
$('.addfocus').val("");
break;
}
event.handled = true;
} else {
return false;
}
});
// click back button for redirect
$('#back').on('click',function(){ $('#back').on('click',function(){
table_type = '<%=@table_type%>'; table_type = '<%=@table_type%>';
table_id = '<%=@dining_facility.id%>'; table_id = '<%=@dining_facility.id%>';
@@ -86,6 +234,7 @@
else { else {
window.location.href = "/origami/room/" + table_id window.location.href = "/origami/room/" + table_id
} }
}) });
}); });
</script> </script>

View File

@@ -1,6 +1,8 @@
<div class="row"> <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-9 col-lg-9">
<div class="card">
<div class="body">
<%= simple_form_for(@print_setting) do |f| %> <%= simple_form_for(@print_setting) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -24,6 +26,8 @@
</div> </div>
<% end %> <% end %>
</div> </div>
</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-3 col-lg-3">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -24,11 +24,11 @@
<div class="col-lg-3 col-md-3 col-sm-3"> <div class="col-lg-3 col-md-3 col-sm-3">
<!-- <label class="">Select Shift Period</label> --> <!-- <label class="">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label> <label class="font-14"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker" name="from" id="from" type="text" placeholder="From date"> <input data-behaviour='datepicker' class="form-control datepicker" name="from" id="from" type="text" placeholder="From date" style="height: 37px;">
</div> </div>
<div class="col-lg-3 col-md-3 col-sm-3"> <div class="col-lg-3 col-md-3 col-sm-3">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label> <label class="font-14"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker" name="to" id="to" type="text" placeholder="To date"> <input data-behaviour='datepicker' class="form-control datepicker" name="to" id="to" type="text" placeholder="To date" style="height: 37px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20"> <div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
<label></label><br> <label></label><br>

View File

@@ -21,7 +21,7 @@
<div class="row"> <div class="row">
<div class="col-md-12 col-lg-12"> <div class="col-md-12 col-lg-12">
<div class="card "> <div class="card ">
<div class="table-responsive"> <div class="body table-responsive">
<table class="table table-bordered"> <table class="table table-bordered">
<thead> <thead>
<tr> <tr>

View File

@@ -3,7 +3,7 @@
<% if period_type != false %> <% if period_type != false %>
<div class="row"> <div class="row">
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14"><%= t("views.right_panel.detail.select_period") %><%= t("views.right_panel.detail.select_period") %></label> <label class="font-14"><%= t("views.right_panel.detail.select_period") %></label>
<select name="period" id="sel_period" class="form-control"> <select name="period" id="sel_period" class="form-control">
<option value=""><%= t("views.right_panel.detail.select_period") %></option> <option value=""><%= t("views.right_panel.detail.select_period") %></option>
<option value="0">Today</option> <option value="0">Today</option>

View File

@@ -3,7 +3,7 @@
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item active">Stock Check Report</li> <li class="breadcrumb-item active">Stock Check Report</li>
<span class="float-right"> <span class="float-right">
<%= link_to 'Back', dashboard_path %> <%= link_to 'Back', inventory_path %>
</span> </span>
</ol> </ol>
</div> </div>

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings,@settings_account]) do |f| %> <%= simple_form_for([:settings,@settings_account]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-inputs p-l-10"> <div class="form-inputs p-l-10">
@@ -14,6 +16,8 @@
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %> <%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div> </div>
<% end %> <% end %>
</div>
</div>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings, @settings_cashier_terminal]) do |f| %> <%= simple_form_for([:settings, @settings_cashier_terminal]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -23,6 +25,8 @@
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -1,10 +1,9 @@
<div class="row"> <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-9 col-lg-9">
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6"> <div class="card">
<div class="body">
<%= simple_form_for([:settings, @commissioner]) do |f| %> <%= simple_form_for([:settings, @commissioner]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-inputs"> <div class="form-inputs">
<%= f.input :name %> <%= f.input :name %>
<%= f.label :emp_id, 'Employee' %> <%= f.label :emp_id, 'Employee' %>
@@ -15,7 +14,6 @@
<%= f.label :commission_id, 'Commission'%> <%= f.label :commission_id, 'Commission'%>
<%= f.select :commission_id, Commission.all.map {|l| [l.name, l.id]}, { :include_blank => 'Choose Commission Product', :selected => ''}, {class: 'form-control'} %> <%= f.select :commission_id, Commission.all.map {|l| [l.name, l.id]}, { :include_blank => 'Choose Commission Product', :selected => ''}, {class: 'form-control'} %>
<br/> <br/>
<%= f.label :joined_date %><br/> <%= f.label :joined_date %><br/>
<%= f.text_field :joined_date, {class: 'form-control datepicker', id: 'joined_date', readonly: true} %><br/> <%= f.text_field :joined_date, {class: 'form-control datepicker', id: 'joined_date', readonly: true} %><br/>
@@ -30,6 +28,7 @@
<% end %> <% end %>
</div> </div>
</div> </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-3 col-lg-3">
<div class="card"> <div class="card">
<div class="body"> <div class="body">
@@ -53,5 +52,5 @@
</p> </p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,7 +1,8 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<div class="p-l-15"> <div class="p-l-15">
<%= simple_form_for([:settings,@commission]) do |f| %> <%= simple_form_for([:settings,@commission]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -18,8 +19,10 @@
<%= f.submit 'Submit', class: 'btn btn-primary wave-effects' %> <%= f.submit 'Submit', class: 'btn btn-primary wave-effects' %>
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">

View File

@@ -15,9 +15,9 @@
<i class="material-icons">access_time</i> <i class="material-icons">access_time</i>
</span> </span>
<% if !@dining_charge.minimum_free_time.nil?%> <% if !@dining_charge.minimum_free_time.nil?%>
<input type="text" name="dining_charge[minimum_free_time]" value="<%= @dining_charge.minimum_free_time.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Free Time..."> <input type="text" name="dining_charge[minimum_free_time]" value="<%= @dining_charge.minimum_free_time.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Free Time(hh:mm)...">
<% else %> <% else %>
<input type="text" name="dining_charge[minimum_free_time]" class="timepicker form-control col-md-8" placeholder="Free Time..."> <input type="text" name="dining_charge[minimum_free_time]" class="timepicker form-control col-md-8" placeholder="Free Time(hh:mm)...">
<% end %> <% end %>
</div> </div>
<!--<%= f.input :charge_block, :input_html => { :id => 'charge_block'} %>--> <!--<%= f.input :charge_block, :input_html => { :id => 'charge_block'} %>-->
@@ -28,9 +28,9 @@
<i class="material-icons">access_time</i> <i class="material-icons">access_time</i>
</span> </span>
<% if !@dining_charge.charge_block.nil?%> <% if !@dining_charge.charge_block.nil?%>
<input type="text" name="dining_charge[charge_block]" value="<%= @dining_charge.charge_block.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Time for Charges..."> <input type="text" name="dining_charge[charge_block]" value="<%= @dining_charge.charge_block.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Time for Charges(hh:mm)...">
<% else %> <% else %>
<input type="text" name="dining_charge[charge_block]" class="timepicker form-control col-md-8" placeholder="Time for Charges..."> <input type="text" name="dining_charge[charge_block]" class="timepicker form-control col-md-8" placeholder="Time for Charges(hh:mm)...">
<% end %> <% end %>
</div> </div>
</div> </div>

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings,@employee]) do |f| %> <%= simple_form_for([:settings,@employee]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -14,7 +16,9 @@
<div class="form-actions p-l-15"> <div class="form-actions p-l-15">
<%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %> <%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
</div> </div>
<% end %> <% end %>
</div>
</div>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">

View File

@@ -2,6 +2,8 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings,@settings_item_set]) do |f| %> <%= simple_form_for([:settings,@settings_item_set]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -15,7 +17,9 @@
<div class="form-actions p-l-15"> <div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %> <%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div> </div>
<% end %> <% end %>
</div>
</div>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">

View File

@@ -11,7 +11,6 @@
<%= f.input :gateway_url %> <%= f.input :gateway_url %>
<%= f.input :auth_token %> <%= f.input :auth_token %>
<%= f.input :merchant_account_id %> <%= f.input :merchant_account_id %>
<%= f.input :additional_parameter, as: :text %>
<%= f.input :created_by %> <%= f.input :created_by %>
</div> </div>

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