Merge branch 'master' into license
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -36,6 +36,7 @@ pickle-email-*.html
|
||||
._*.*
|
||||
.rbenv-version
|
||||
config/deploy/config/*
|
||||
config/puma.rb
|
||||
!/log/.keep
|
||||
!/tmp/.keep
|
||||
.ruby-version
|
||||
|
||||
8
.idea/.generators
generated
8
.idea/.generators
generated
@@ -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
7
.idea/.rakeTasks
generated
File diff suppressed because one or more lines are too long
4
.idea/misc.xml
generated
4
.idea/misc.xml
generated
@@ -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
8
.idea/modules.xml
generated
@@ -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
144
.idea/sxrestaurant.iml
generated
@@ -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
6
.idea/vcs.xml
generated
@@ -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
1290
.idea/workspace.xml
generated
File diff suppressed because it is too large
Load Diff
1
Gemfile
1
Gemfile
@@ -40,6 +40,7 @@ gem 'rack-cors'
|
||||
|
||||
# image upload
|
||||
gem 'carrierwave', '~> 1.0'
|
||||
gem 'mini_magick'
|
||||
|
||||
#Report and Printing gems
|
||||
gem 'cups', '~> 0.0.7'
|
||||
|
||||
@@ -118,6 +118,7 @@ GEM
|
||||
mime-types (3.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2016.0521)
|
||||
mini_magick (4.8.0)
|
||||
mini_mime (1.0.0)
|
||||
mini_portile2 (2.3.0)
|
||||
minitest (5.10.3)
|
||||
@@ -277,6 +278,7 @@ DEPENDENCIES
|
||||
kaminari (~> 1.0.1)
|
||||
listen (~> 3.0.5)
|
||||
material_icons
|
||||
mini_magick
|
||||
momentjs-rails
|
||||
mysql2 (>= 0.3.18, < 0.5)
|
||||
nested_form
|
||||
|
||||
@@ -11,10 +11,11 @@
|
||||
// about supported directives.
|
||||
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require jquery-ui
|
||||
//= require tether
|
||||
//= require bootstrap/js/popper.min
|
||||
//= require bootstrap/js/bootstrap-material-design.min
|
||||
//= require jquery_ujs
|
||||
//= require turbolinks
|
||||
//= require momentjs/moment
|
||||
//= require bootstrap-material-datetimepicker/js/bootstrap-material-datetimepicker
|
||||
|
||||
@@ -67,7 +67,7 @@ $(document).on('turbolinks:load', function() {
|
||||
var date = new Date(data[field]["created_at"]);
|
||||
var show_date = date.getDate() + "-" + date.getMonth() + "-" + date.getFullYear() + ' ' + date.getHours()+ ':' + date.getMinutes();
|
||||
|
||||
row ='<div class="card queue_station animated " data-date="'+data[field]["order_id"]+'">'
|
||||
row ='<div class="card queue_station animated " data-order-no="'+data[field]["order_id"]+'">'
|
||||
+'<div class="card-block">'
|
||||
+'<div class="row">'
|
||||
+'<span class="col-md-4 order-zone-type font-13">'+data[field]["table_type"]+'-'+ data[field]["zone"] +'</span>'
|
||||
@@ -100,18 +100,16 @@ $(document).on('turbolinks:load', function() {
|
||||
+'</div>'
|
||||
|
||||
+'</div>';
|
||||
|
||||
|
||||
|
||||
$('.oqs_append').append(row);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
//end Ajax
|
||||
}
|
||||
}
|
||||
|
||||
$(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 orderZoneType=$(this).children().children().children('.order-zone-type').text().trim();
|
||||
// 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
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/oqs/' + orderZone,
|
||||
url: '/oqs/' + orderNo,
|
||||
data: { 'status' : order_status },
|
||||
success: function(res){
|
||||
|
||||
@@ -156,7 +154,7 @@ $(document).on('turbolinks:load', function() {
|
||||
$(this).addClass('selected-item');
|
||||
});
|
||||
|
||||
$(document).on('click', '.order-item-edit', function(event){
|
||||
$(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"
|
||||
@@ -234,6 +232,7 @@ $(document).on('turbolinks:load', function() {
|
||||
// Print Order Summary
|
||||
// $('#print_order_summary').on('click',function(){
|
||||
$(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 assigned_item_id=$('.selected-item').children('.card-block').children('.assigned-order-item').text();
|
||||
var params = { 'table_name':table_name };
|
||||
|
||||
@@ -22,9 +22,7 @@ $(function() {
|
||||
product = data;
|
||||
|
||||
for(var field in product) {
|
||||
console.log(product[field].name);
|
||||
if (product[field].unit_price > 0) {
|
||||
console.log("hi");
|
||||
qty = 1;
|
||||
options = [];
|
||||
item_attributes = [];
|
||||
@@ -101,82 +99,90 @@ $(function() {
|
||||
for(var field in menu_items) {
|
||||
if (menu_items[field].is_sub_item == false) {
|
||||
instances = menu_items[field].instances ;
|
||||
qty = 1;
|
||||
options = [];
|
||||
|
||||
if (JSON.stringify(menu_items[field].item_sets)!='[]') {
|
||||
fa_plus = '';
|
||||
add = '';
|
||||
menu_item_box = 'set_item_box';
|
||||
data_target = 'sx_item_set_detailModal';
|
||||
|
||||
code = menu_items[field].code;
|
||||
name = menu_items[field].name;
|
||||
price = 0;//parseFloat( menu_items[field].price).toFixed(2);
|
||||
is_available = menu_items[field].is_available ;
|
||||
is_on_promotion = 0;
|
||||
item_attributes = menu_items[field].attributes;
|
||||
promotion_price = menu_items[field].promotion_price;
|
||||
}else{
|
||||
fa_plus = 'material-icons';
|
||||
add = 'add'
|
||||
menu_item_box = 'menu_item_box';
|
||||
data_target = 'sx_item_detailModal';
|
||||
|
||||
$(instances).each(function(i){
|
||||
if (instances[i].is_default === true) {
|
||||
code = instances[i].code;
|
||||
name = instances[i].name;
|
||||
price = parseFloat(instances[i].price).toFixed(2);
|
||||
is_available = instances[i].is_available ;
|
||||
is_on_promotion = instances[i].is_on_promotion;
|
||||
item_attributes = instances[i].values;
|
||||
promotion_price = instances[i].promotion_price;
|
||||
code = instances[i].code;
|
||||
}
|
||||
});
|
||||
|
||||
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;
|
||||
options = [];
|
||||
price = 0;
|
||||
|
||||
if (menu_items[field].image) {
|
||||
image_path = menu_items[field].image;
|
||||
}else{
|
||||
image_path = "/image/logo.png";
|
||||
}
|
||||
if (JSON.stringify(menu_items[field].item_sets)!='[]') {
|
||||
fa_plus = '';
|
||||
add = '';
|
||||
menu_item_box = 'set_item_box';
|
||||
data_target = 'sx_item_set_detailModal';
|
||||
|
||||
row = '<div class="card custom-card testimonial-card animated fadeInRight" style="">'
|
||||
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;">'
|
||||
+'<div class="col-md-9">'+ menu_items[field].name +'</div>'
|
||||
+"<div class='col-md-3 add_icon' data-item-code='"
|
||||
+ menu_items[field].code +"' data-name='"
|
||||
+ menu_items[field].name +"' data-qty = '"+ qty +"' data-price = '"
|
||||
+ price +"' data-instance-code = '"+ code +"' data-instance = '"
|
||||
+ name +"' data-promotion-price = '"+ promotion_price +"' data-attributes = '"
|
||||
+ JSON.stringify(item_attributes) +"' data-options = '"
|
||||
+ options +"' data-image='"+image_path+"'>"
|
||||
+"<i class='fa "+fa_plus+" '>"
|
||||
+add+ '</i>'
|
||||
code = menu_items[field].code;
|
||||
name = menu_items[field].name;
|
||||
price = 0;//parseFloat( menu_items[field].price).toFixed(2);
|
||||
is_available = menu_items[field].is_available ;
|
||||
is_on_promotion = 0;
|
||||
item_attributes = menu_items[field].attributes;
|
||||
promotion_price = menu_items[field].promotion_price;
|
||||
}else{
|
||||
fa_plus = 'material-icons';
|
||||
add = 'add'
|
||||
menu_item_box = 'menu_item_box';
|
||||
data_target = 'sx_item_detailModal';
|
||||
|
||||
$(instances).each(function(i){
|
||||
if (instances[i].is_default === true) {
|
||||
code = instances[i].code;
|
||||
name = instances[i].name;
|
||||
price = parseFloat(instances[i].price).toFixed(2);
|
||||
is_available = instances[i].is_available ;
|
||||
is_on_promotion = instances[i].is_on_promotion;
|
||||
item_attributes = instances[i].values;
|
||||
promotion_price = instances[i].promotion_price;
|
||||
code = instances[i].code;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (menu_items[field].image) {
|
||||
image_path = menu_items[field].image;
|
||||
}else{
|
||||
image_path = "/image/logo.png";
|
||||
}
|
||||
|
||||
row = '<div class="card custom-card testimonial-card animated fadeInRight" style="">'
|
||||
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;">'
|
||||
+'<div class="col-md-9">'+ menu_items[field].name +'</div>'
|
||||
+"<div class='col-md-3 add_icon' data-item-code='"
|
||||
+ menu_items[field].code +"' data-name='"
|
||||
+ menu_items[field].name +"' data-qty = '"+ qty +"' data-price = '"
|
||||
+ price +"' data-instance-code = '"+ code +"' data-instance = '"
|
||||
+ name +"' data-promotion-price = '"+ promotion_price +"' data-attributes = '"
|
||||
+ JSON.stringify(item_attributes) +"' data-options = '"
|
||||
+ options +"' data-image='"+image_path+"'>"
|
||||
+"<i class='fa "+fa_plus+" '>"
|
||||
+add+ '</i>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
|
||||
+"<div class='"+menu_item_box+"' data-item-code='"
|
||||
+ menu_items[field].code +"' data-instance = '"
|
||||
+JSON.stringify(menu_items[field].instances)+"' data-id = '"
|
||||
+JSON.stringify(menu_items[field].attributes)+"' data-item = '"
|
||||
+JSON.stringify(item_attributes)+"' data-option = '"
|
||||
+JSON.stringify(menu_items[field].options)+"' data-item-sets = '"
|
||||
+JSON.stringify(menu_items[field].item_sets)+"' data-toggle='modal' data-target='."+data_target+"'>"
|
||||
|
||||
+"<div class='card-block custom-card-block'>"
|
||||
+"<img id='logo' height='125px' src='"+image_path+"'>"
|
||||
+"</div>"
|
||||
|
||||
+'<div class="card-footer custom-card-footer">'
|
||||
+'<span>'+ price +'</span>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
|
||||
+"<div class='"+menu_item_box+"' data-item-code='"
|
||||
+ menu_items[field].code +"' data-instance = '"
|
||||
+JSON.stringify(menu_items[field].instances)+"' data-id = '"
|
||||
+JSON.stringify(menu_items[field].attributes)+"' data-item = '"
|
||||
+JSON.stringify(item_attributes)+"' data-option = '"
|
||||
+JSON.stringify(menu_items[field].options)+"' data-item-sets = '"
|
||||
+JSON.stringify(menu_items[field].item_sets)+"' data-toggle='modal' data-target='."+data_target+"'>"
|
||||
|
||||
+"<div class='card-block custom-card-block'>"
|
||||
+"<img id='logo' height='125px' src='"+image_path+"'>"
|
||||
+"</div>"
|
||||
|
||||
+'<div class="card-footer custom-card-footer">'
|
||||
+'<span>'+ price +'</span>'
|
||||
+'</div>'
|
||||
+'</div>';
|
||||
$('.menu_items_list').append(row);
|
||||
+'</div>';
|
||||
$('.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){
|
||||
$(".instance-list").empty();
|
||||
$(".options-list").empty();
|
||||
$('.set_change_qty').val(1);
|
||||
change_qty_plus_minus("set_count","set_plus","set_minus");
|
||||
data = $(this).parent().children().children('.add_icon');
|
||||
|
||||
@@ -366,6 +373,8 @@ $(function() {
|
||||
$('.add_to_order').removeAttr('data-attributes');
|
||||
$('.add_to_order').removeAttr('data-options');
|
||||
|
||||
$('.keypress_qty').val(1);
|
||||
|
||||
change_qty_plus_minus("count","plus","minus");
|
||||
|
||||
data = $(this).parent().children().children('.add_icon');
|
||||
@@ -451,7 +460,7 @@ $(function() {
|
||||
$(".options-list").append(row);
|
||||
}
|
||||
|
||||
$('#count').val(1);
|
||||
// $('#count').val(1);
|
||||
$('#item_instances').text(instances);
|
||||
$('#title_name').text(data.attr('data-name'));
|
||||
$('#item_code').text(data.attr('data-item-code'));
|
||||
@@ -465,7 +474,7 @@ $(function() {
|
||||
// click select option icon for add
|
||||
$(document).on('click', '.attribute_btn', function(event){
|
||||
|
||||
$('.change_qty').val(1);
|
||||
// $('.change_qty').val(1);
|
||||
value = $(this).data('value');
|
||||
type = $(this).data('type');
|
||||
instances = $(this).data('instances');
|
||||
@@ -505,6 +514,7 @@ $(function() {
|
||||
|
||||
// click select option icon for add
|
||||
$(document).on('click', '.option_btn', function(event){
|
||||
active =$(this).hasClass('selected-option');
|
||||
value = $(this).data('value');
|
||||
type = $(this).data('type');
|
||||
group = $(this).data('group');
|
||||
@@ -514,7 +524,12 @@ $(function() {
|
||||
$('.'+type).removeClass("selected-option");
|
||||
}
|
||||
});
|
||||
$(this).addClass('selected-option');
|
||||
if (active) {
|
||||
$(this).revoveClass('selected-option');
|
||||
}else{
|
||||
$(this).addClass('selected-option');
|
||||
}
|
||||
|
||||
|
||||
if(group == "set_menu"){
|
||||
code = $(this).data('code');
|
||||
@@ -544,7 +559,22 @@ $(function() {
|
||||
|
||||
if (item_row.length>0) {
|
||||
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)) {
|
||||
$('.add_to_order').attr('data-instance-code',instances[field].code);
|
||||
$('.add_to_order').attr('data-instance',instances[field].name);
|
||||
@@ -732,7 +762,7 @@ $(function() {
|
||||
$('#sub_total').empty();
|
||||
$('#sub_total').append(fixed_total_price);
|
||||
|
||||
if (fixed_total_price > 0) {
|
||||
if (item_row.length > 0) {
|
||||
$('.create').removeAttr("disabled", false);
|
||||
}else{
|
||||
$('.create').attr("disabled", true);
|
||||
@@ -795,12 +825,16 @@ $(function() {
|
||||
// Get Selected Class
|
||||
function change_qty_plus_minus(id,plus,minus) {
|
||||
|
||||
var count = parseInt($('#'+id).val())
|
||||
var countEl = document.getElementById(id);
|
||||
|
||||
|
||||
|
||||
$('#'+plus).on("click", function(){
|
||||
|
||||
var count = parseInt($('#'+id).val());
|
||||
var countEl = document.getElementById(id);
|
||||
|
||||
count++;
|
||||
countEl.value = count;
|
||||
countEl.value = count;
|
||||
|
||||
|
||||
if (id == "count") {
|
||||
@@ -826,9 +860,13 @@ $(function() {
|
||||
});
|
||||
|
||||
$('#'+minus).on("click", function(){
|
||||
|
||||
var count = parseInt($('#'+id).val());
|
||||
var countEl = document.getElementById(id);
|
||||
|
||||
if (count > 1) {
|
||||
count--;
|
||||
countEl.value = count;
|
||||
countEl.value = count;
|
||||
|
||||
if (id=="count") {
|
||||
price = $("#unit_price").text();
|
||||
@@ -853,30 +891,36 @@ $(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();
|
||||
|
||||
if (id=="count") {
|
||||
price = $("#unit_price").text();
|
||||
$("#total_price").text(value*price);
|
||||
}else{
|
||||
var item_row = $('.selected-instance');
|
||||
price = $("#set_unit_price").text();
|
||||
set_total_price = $("#set_total_price").text();
|
||||
$("#set_count").val(value);
|
||||
if (item_row.length > 1) {
|
||||
total = 0 ;
|
||||
$(item_row).each(function(i){
|
||||
total += value * $(item_row[i]).attr('data-price');
|
||||
total_price = total;
|
||||
});
|
||||
|
||||
if ($.isNumeric(value)) {
|
||||
if (id=="count") {
|
||||
$('.change_qty').attr('value',value);
|
||||
price = $("#unit_price").text();
|
||||
$("#total_price").text(value*price);
|
||||
}else{
|
||||
total_price = value*price;
|
||||
var item_row = $('.selected-instance');
|
||||
price = $("#set_unit_price").text();
|
||||
set_total_price = $("#set_total_price").text();
|
||||
$(".set_change_qty").val(value);
|
||||
if (item_row.length > 1) {
|
||||
total = 0 ;
|
||||
$(item_row).each(function(i){
|
||||
total += value * $(item_row[i]).attr('data-price');
|
||||
total_price = total;
|
||||
});
|
||||
}else{
|
||||
total_price = value*price;
|
||||
}
|
||||
$("#set_total_price").text(total_price);
|
||||
}
|
||||
$("#set_total_price").text(total_price);
|
||||
}else{
|
||||
$('#'+id).val(1);
|
||||
swal("Opps","Please enter number for qty","warning");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -115,236 +115,3 @@ function export_to(path)
|
||||
var form_params = $("#frm_report").serialize();
|
||||
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';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ App.order_queue_station = App.cable.subscriptions.create('OrderQueueStationChann
|
||||
|
||||
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>'
|
||||
+'<div class="card-block">'
|
||||
|
||||
@@ -75,11 +75,9 @@ App.order_queue_station = App.cable.subscriptions.create('OrderQueueStationChann
|
||||
var $divs = $("div.queue_station");
|
||||
var SortListDivs = $divs.sort(function (a, b) {
|
||||
|
||||
first = $(a).attr('data-date');
|
||||
next = $(b).attr('data-date');
|
||||
console.log(first);
|
||||
console.log("hi")
|
||||
console.log(next);
|
||||
first = $(a).attr('data-order-no');
|
||||
next = $(b).attr('data-order-no');
|
||||
|
||||
return parseInt(next.substring(4, 16)) - parseInt(first.substring(4, 16));
|
||||
});
|
||||
$("#oqs_container").html(SortListDivs);
|
||||
|
||||
1
app/assets/plugins/bootstrap/js/popper.min.js.map
Normal file
1
app/assets/plugins/bootstrap/js/popper.min.js.map
Normal file
File diff suppressed because one or more lines are too long
1312
app/assets/plugins/jquery-ui/jquery-ui.css
vendored
Normal file
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
18706
app/assets/plugins/jquery-ui/jquery-ui.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
app/assets/plugins/jquery-ui/jquery-ui.min.css
vendored
Normal file
7
app/assets/plugins/jquery-ui/jquery-ui.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
13
app/assets/plugins/jquery-ui/jquery-ui.min.js
vendored
Normal file
13
app/assets/plugins/jquery-ui/jquery-ui.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
886
app/assets/plugins/jquery-ui/jquery-ui.structure.css
vendored
Normal file
886
app/assets/plugins/jquery-ui/jquery-ui.structure.css
vendored
Normal 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;
|
||||
}
|
||||
5
app/assets/plugins/jquery-ui/jquery-ui.structure.min.css
vendored
Normal file
5
app/assets/plugins/jquery-ui/jquery-ui.structure.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
443
app/assets/plugins/jquery-ui/jquery-ui.theme.css
vendored
Normal file
443
app/assets/plugins/jquery-ui/jquery-ui.theme.css
vendored
Normal 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;
|
||||
}
|
||||
5
app/assets/plugins/jquery-ui/jquery-ui.theme.min.css
vendored
Normal file
5
app/assets/plugins/jquery-ui/jquery-ui.theme.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -6,6 +6,9 @@
|
||||
@import "sweetalert/sweetalert.css";
|
||||
@import "multi-select/css/multi-select.css";
|
||||
@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 "BSBMaterial/style";
|
||||
@import "BSBMaterial/themes/all-themes";
|
||||
@@ -117,3 +120,32 @@
|
||||
.bottom{
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
@@ -59,11 +59,13 @@ select.form-control {
|
||||
padding: 0px 0px 7px 0px;
|
||||
}
|
||||
|
||||
/*
|
||||
.order-info {
|
||||
min-height:300px;
|
||||
max-height:500px;
|
||||
overflow:auto
|
||||
}
|
||||
*/
|
||||
|
||||
.others-payment{
|
||||
line-height:100px;
|
||||
|
||||
@@ -33,12 +33,14 @@ class Crm::CustomersController < BaseCrmController
|
||||
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
|
||||
@count_customer = Customer.count_customer
|
||||
|
||||
@taxes = TaxProfile.all.order("order_by asc")
|
||||
|
||||
@filter = filter
|
||||
|
||||
# if flash["errors"]
|
||||
# @crm_customer.valid?
|
||||
# end
|
||||
|
||||
@@ -5,9 +5,20 @@ class Crm::DiningQueuesController < BaseCrmController
|
||||
# GET /crm/dining_queues
|
||||
# GET /crm/dining_queues.json
|
||||
def index
|
||||
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")
|
||||
@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
|
||||
|
||||
# GET /crm/dining_queues/1
|
||||
@@ -28,6 +39,7 @@ class Crm::DiningQueuesController < BaseCrmController
|
||||
# POST /crm/dining_queues
|
||||
# POST /crm/dining_queues.json
|
||||
def create
|
||||
puts dining_queue_params
|
||||
@dining_queue = DiningQueue.new(dining_queue_params)
|
||||
|
||||
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.
|
||||
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
|
||||
|
||||
@@ -45,7 +45,7 @@ class HomeController < ApplicationController
|
||||
elsif @employee.role == "manager"
|
||||
session[:session_token] = @employee.token_session
|
||||
redirect_to dashboard_path
|
||||
elsif @employee.role == "supervisour"
|
||||
elsif @employee.role == "supervisor"
|
||||
session[:session_token] = @employee.token_session
|
||||
redirect_to origami_root_path
|
||||
elsif @employee.role == "account"
|
||||
@@ -82,6 +82,7 @@ class HomeController < ApplicationController
|
||||
|
||||
@sale_data = Array.new
|
||||
@total_payment_methods = Sale.total_payment_methods(today)
|
||||
|
||||
@total_payment_methods.each do |payment|
|
||||
if payment.payment_method == "mpu" || payment.payment_method == "visa" || payment.payment_method == "master" || payment.payment_method == "jcb"
|
||||
pay = Sale.payment_sale('card', today)
|
||||
@@ -92,7 +93,6 @@ class HomeController < ApplicationController
|
||||
end
|
||||
end
|
||||
@summ_sale = Sale.summary_sale_receipt(today)
|
||||
p @summ_sale
|
||||
@total_customer = Sale.total_customer(today)
|
||||
@total_dinein = Sale.total_dinein(today)
|
||||
@total_takeaway = Sale.total_takeaway(today)
|
||||
@@ -151,7 +151,7 @@ class HomeController < ApplicationController
|
||||
redirect_to oqs_root_path
|
||||
elsif employee.role == "crm"
|
||||
redirect_to crm_root_path
|
||||
elsif @employee.role == "supervisour"
|
||||
elsif @employee.role == "supervisor"
|
||||
redirect_to origami_root_path
|
||||
elsif @employee.role == "account"
|
||||
redirect_to reports_dailysale_index_path
|
||||
|
||||
@@ -44,9 +44,9 @@ class Oqs::HomeController < BaseOqsController
|
||||
# Get Order items
|
||||
def get_order_items
|
||||
items = []
|
||||
table_name = params[:table_id]
|
||||
order_no = params[:order_no]
|
||||
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)
|
||||
# if status == ""
|
||||
# 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
|
||||
|
||||
booking = Booking.find_by_dining_facility_id(dining.id)
|
||||
BookingOrder.where("booking_id='#{ booking.booking_id }'").find_each do |bo|
|
||||
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|
|
||||
# items.push(oi)
|
||||
# end
|
||||
# booking = Booking.find_by_dining_facility_id(dining.id)
|
||||
# BookingOrder.where("booking_id='#{ booking.booking_id }'").find_each do |bo|
|
||||
# order=Order.find(bo.order_id)
|
||||
# order.order_items.each do |oi|
|
||||
# items.push(oi)
|
||||
# end
|
||||
# end
|
||||
|
||||
OrderItem.where("order_id='#{ order_no }'").find_each do |oi|
|
||||
items.push(oi)
|
||||
end
|
||||
|
||||
render :json => items.to_json
|
||||
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 bookings as bk on bk.booking_id = bo.booking_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}%",)
|
||||
.order("assigned_order_items.assigned_order_item_id desc")
|
||||
.group("assigned_order_items.assigned_order_item_id")
|
||||
.group("odt.order_items_id")
|
||||
|
||||
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 bookings as bk on bk.booking_id = bo.booking_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}%",)
|
||||
.group("assigned_order_items.order_id")
|
||||
.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 bookings as bk on bk.booking_id = bo.booking_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}%",)
|
||||
.group("oqs.id")
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class Oqs::PrintController < ApplicationController
|
||||
# print when complete click
|
||||
print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||
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
|
||||
assigned_items.each do |ai|
|
||||
@@ -40,13 +40,16 @@ class Oqs::PrintController < ApplicationController
|
||||
print_status = assigned_item.print_status == true ? " (Re-Print)" : ""
|
||||
|
||||
# get dining
|
||||
dining = DiningFacility.find_by_name(table_name);
|
||||
booking = Booking.find_by_dining_facility_id(dining.id)
|
||||
# dining = DiningFacility.find_by_name(table_name);
|
||||
# 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_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||
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
|
||||
assigned_items.each do |ai|
|
||||
|
||||
@@ -40,10 +40,10 @@ class Origami::DiscountsController < BaseOrigamiController
|
||||
sale_item.product_alt_name = ""
|
||||
sale_item.remark = "Discount"
|
||||
|
||||
sale_item.qty = 1
|
||||
sale_item.unit_price = di["price"]
|
||||
sale_item.qty = -1
|
||||
sale_item.unit_price = di["price"].to_f * (-1)
|
||||
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.price = di["price"]
|
||||
|
||||
@@ -36,11 +36,11 @@ class Origami::OtherChargesController < BaseOrigamiController
|
||||
|
||||
sale_item.qty = 1
|
||||
sale_item.unit_price = di["price"]
|
||||
sale_item.taxable_price = 0
|
||||
sale_item.is_taxable = 0
|
||||
sale_item.taxable_price = di["price"] * 1
|
||||
sale_item.is_taxable = 1
|
||||
sale_item.account_id = 0
|
||||
|
||||
sale_item.price = di["price"]
|
||||
sale_item.price = di["price"] * 1
|
||||
sale_item.save
|
||||
|
||||
action_by = current_user.id
|
||||
|
||||
@@ -209,7 +209,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
printer.print_receipt_bill(print_settings,cashier_terminal,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "Re-print")
|
||||
end
|
||||
|
||||
def foc
|
||||
def foc
|
||||
cash = params[:cash]
|
||||
sale_id = params[:sale_id]
|
||||
sub_total = params[:sub_total]
|
||||
@@ -233,6 +233,9 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
cashier_zone = CashierTerminalByZone.find_by_zone_id(table.zone_id)
|
||||
cashier_terminal = CashierTerminal.find(cashier_zone.cashier_terminal_id)
|
||||
|
||||
# Re-call Sale Data
|
||||
saleObj = Sale.find(sale_id)
|
||||
|
||||
unique_code = "ReceiptBillPdf"
|
||||
customer= Customer.find(saleObj.customer_id)
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ class Origami::SaleEditController < BaseOrigamiController
|
||||
@newsaleitem.qty = saleitemObj.qty * -1
|
||||
@newsaleitem.price = saleitemObj.price * -1
|
||||
@newsaleitem.is_taxable = 1
|
||||
@newsaleitem.taxable_price = saleitemObj.taxable_price * -1
|
||||
@newsaleitem.product_name = saleitemObj.product_name + ' (VOID)'
|
||||
@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}"
|
||||
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)
|
||||
end
|
||||
|
||||
@@ -41,9 +42,10 @@ class Origami::SaleEditController < BaseOrigamiController
|
||||
@newsaleitem = SaleItem.new
|
||||
@newsaleitem = saleitemObj.dup
|
||||
@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.is_taxable = 1
|
||||
@newsaleitem.product_name = saleitemObj.product_name + ' (FOC)'
|
||||
@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}"
|
||||
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)
|
||||
end
|
||||
|
||||
@@ -103,7 +105,7 @@ class Origami::SaleEditController < BaseOrigamiController
|
||||
|
||||
# re-calc tax
|
||||
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)
|
||||
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}"
|
||||
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)
|
||||
end
|
||||
|
||||
@@ -147,7 +149,7 @@ class Origami::SaleEditController < BaseOrigamiController
|
||||
end
|
||||
|
||||
# re-calc tax
|
||||
saleObj.compute_without_void
|
||||
saleObj.compute_by_sale_items(saleObj.sale_id, saleObj.sale_items, saleObj.total_discount)
|
||||
end
|
||||
|
||||
def apply_void
|
||||
|
||||
@@ -30,6 +30,7 @@ class Origami::SurveysController < BaseOrigamiController
|
||||
end
|
||||
# end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
|
||||
@@ -8,12 +8,12 @@ class Origami::VoidController < BaseOrigamiController
|
||||
sale = Sale.find_by_sale_id(sale_id)
|
||||
|
||||
# update count for shift sale
|
||||
if(sale.sale_status == "completed")
|
||||
# if(sale.sale_status == "completed")
|
||||
if sale.shift_sale_id != nil
|
||||
shift = ShiftSale.find(sale.shift_sale_id)
|
||||
shift.calculate(sale_id, "void")
|
||||
end
|
||||
end
|
||||
# end
|
||||
|
||||
sale.payment_status = 'void'
|
||||
sale.sale_status = 'void'
|
||||
|
||||
@@ -57,11 +57,15 @@ class Settings::DiningChargesController < ApplicationController
|
||||
@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"])
|
||||
|
||||
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.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.save
|
||||
@dining_charge.save
|
||||
if @table
|
||||
format.html { redirect_to settings_zone_table_path(@zone,@settings_dining_facility), notice: 'Dining charge was successfully updated.' }
|
||||
else
|
||||
|
||||
@@ -72,6 +72,6 @@ class Settings::MembershipActionsController < ApplicationController
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
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
|
||||
|
||||
@@ -71,6 +71,6 @@ class Settings::ShopsController < ApplicationController
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
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
|
||||
|
||||
@@ -83,7 +83,7 @@ class Settings::SimpleMenuItemsController < ApplicationController
|
||||
|
||||
format.html { redirect_to settings_menu_category_simple_menu_items_path, notice: 'Menu item was successfully created.' }
|
||||
format.json { render :show, status: :created, location: @settings_menu_item }
|
||||
else
|
||||
else
|
||||
format.html { render :new }
|
||||
format.json { render json: @settings_menu_item.errors, status: :unprocessable_entity }
|
||||
end
|
||||
|
||||
@@ -20,7 +20,9 @@ class Transactions::BookingsController < ApplicationController
|
||||
@bookings = 0
|
||||
end
|
||||
end
|
||||
|
||||
@receipt_no = filter
|
||||
@from = from
|
||||
@to = to
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.json { render json: @bookings }
|
||||
|
||||
@@ -14,20 +14,21 @@ class Transactions::CreditNotesController < ApplicationController
|
||||
to = params[:to]
|
||||
|
||||
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
|
||||
sale = Sale.search_credit_sales(customer,filter,from,to)
|
||||
if sale.count > 0
|
||||
@sales = sale
|
||||
@sales = Kaminari.paginate_array(@sales).page(params[:page]).per(20)
|
||||
@credit_notes = sale
|
||||
@credit_notes = Kaminari.paginate_array(@credit_notes).page(params[:page]).per(20)
|
||||
else
|
||||
@sales = 0
|
||||
@credit_notes = 0
|
||||
end
|
||||
end
|
||||
|
||||
puts "sssssssssssss"
|
||||
puts @credit_notes.to_json
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.json { render json: @sales }
|
||||
format.json { render json: @credit_notes }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -20,6 +20,10 @@ class Transactions::OrdersController < ApplicationController
|
||||
else
|
||||
@orders = []
|
||||
end
|
||||
|
||||
@receipt_no = filter
|
||||
@from = from
|
||||
@to = to
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
@@ -30,7 +34,7 @@ class Transactions::OrdersController < ApplicationController
|
||||
def show
|
||||
|
||||
@order = Order.find(params[:id])
|
||||
|
||||
@dining = BookingOrder.find_by_order_id(@order.order_id).booking.dining_facility
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.json { render json: @order }
|
||||
|
||||
@@ -22,6 +22,9 @@ class Transactions::SalesController < ApplicationController
|
||||
@sales = 0
|
||||
end
|
||||
end
|
||||
@receipt_no = receipt_no
|
||||
@from = from
|
||||
@to = to
|
||||
|
||||
# if receipt_no.nil? && search_date.nil?
|
||||
# @sales = Sale.where("NOT sale_status = 'void' " ).order("sale_id desc").limit(500)
|
||||
|
||||
@@ -41,9 +41,9 @@ class Transactions::ShiftSalesController < ApplicationController
|
||||
@other_payment = ShiftSale.get_by_shift_other_payment(@shift)
|
||||
|
||||
# Calculate price_by_accounts
|
||||
@total_amount_by_account = ShiftSale.calculate_total_price_by_accounts(@shift,'amount')
|
||||
@total_discount_by_account = ShiftSale.calculate_total_price_by_accounts(@shift,'discount')
|
||||
@total_member_discount = ShiftSale.get_total_member_discount(@shift)
|
||||
@total_amount_by_account = ShiftSale.calculate_total_price_by_accounts(@shift,'amount')
|
||||
@total_discount_by_account = ShiftSale.calculate_total_price_by_accounts(@shift,'discount')
|
||||
@total_member_discount = ShiftSale.get_total_member_discount(@shift)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,14 +5,15 @@ class OrderQueueProcessorJob < ApplicationJob
|
||||
# Do something later
|
||||
#Order ID
|
||||
|
||||
order = Order.find(order_id)
|
||||
assign_order = AssignedOrderItem.assigned_order_item_by_job(order_id)
|
||||
order = Order.find(order_id)
|
||||
|
||||
#Execute orders and send to order stations
|
||||
if order
|
||||
oqs = OrderQueueStation.new
|
||||
oqs.process_order(order, table_id)
|
||||
end
|
||||
|
||||
assign_order = AssignedOrderItem.assigned_order_item_by_job(order_id)
|
||||
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order
|
||||
end
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ class Ability
|
||||
can :index, :credit_payment
|
||||
can :index, :void_sale
|
||||
|
||||
elsif user.role == "supervisour"
|
||||
elsif user.role == "supervisor"
|
||||
|
||||
can :edit, :sale_edit
|
||||
can :item_void, :sale_edit
|
||||
|
||||
@@ -35,7 +35,7 @@ class AssignedOrderItem < ApplicationRecord
|
||||
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 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")
|
||||
.group("assigned_order_items.assigned_order_item_id")
|
||||
return order_item
|
||||
|
||||
@@ -4,16 +4,16 @@ class DiningCharge < ApplicationRecord
|
||||
|
||||
def self.amount_calculate(dining_charges_obj, checkin , checkout)
|
||||
# note :: the first Charge Block will cost all, the Time rounding block will included in 2nd Charge Block
|
||||
if !checkin.nil? && !checkout.nil? && !dining_charges_obj.nil?
|
||||
if !checkin.nil? && !checkout.nil? && !dining_charges_obj.nil?
|
||||
block_count = 0
|
||||
price = 0
|
||||
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
|
||||
if dining_minutes <= free_time
|
||||
price = 0
|
||||
else
|
||||
charge_type = dining_charges_obj.charge_type
|
||||
charge_type = dining_charges_obj.charge_type
|
||||
if charge_type == 'hr'
|
||||
block_count, price = DiningCharge.charges(dining_charges_obj, dining_minutes, 'hr')
|
||||
elsif charge_type == 'day'
|
||||
@@ -30,7 +30,7 @@ class DiningCharge < ApplicationRecord
|
||||
# dining charges calculate
|
||||
def self.charges(chargesObj, dining_minutes, type)
|
||||
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
|
||||
if result.to_i < 1
|
||||
@@ -40,7 +40,7 @@ class DiningCharge < ApplicationRecord
|
||||
solid_price = result * chargesObj.unit_price
|
||||
|
||||
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
|
||||
if roundingblock.to_i < 1
|
||||
# no time rounding block
|
||||
|
||||
@@ -77,7 +77,7 @@ class License
|
||||
has_license = true # verify_license()
|
||||
|
||||
if has_license
|
||||
puts "VERIFIED"
|
||||
# puts "VERIFIED"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@ class MenuCategory < ApplicationRecord
|
||||
belongs_to :parent, :class_name => "MenuCategory", foreign_key: "menu_category_id", optional: true
|
||||
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') }
|
||||
scope :active, -> {where("is_available = 1")}
|
||||
|
||||
@@ -13,8 +13,9 @@ class MenuItem < ApplicationRecord
|
||||
has_many :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') }
|
||||
|
||||
scope :simple_menu_item, -> { where(type: 'SimpleMenuItem') }
|
||||
@@ -39,7 +40,7 @@ class MenuItem < ApplicationRecord
|
||||
menu_item_hash[:item_code] = menu_item.item_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[: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[:promotion_price] = mt_instance.promotion_price
|
||||
menu_item_hash[:is_on_promotion] = mt_instance.is_on_promotion
|
||||
|
||||
@@ -4,6 +4,8 @@ class MenuItemInstance < ApplicationRecord
|
||||
has_many :menu_instance_item_sets
|
||||
has_many :item_sets, through: :menu_instance_item_sets
|
||||
# before_create :generate_menu_item_instance_code
|
||||
validates_presence_of :item_instance_code
|
||||
# validates_uniqueness_of :item_instance_code
|
||||
|
||||
def self.findParentCategory(item)
|
||||
if item.menu_category_id
|
||||
|
||||
@@ -69,10 +69,10 @@ class OrderQueueStation < ApplicationRecord
|
||||
# AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
|
||||
# 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)
|
||||
oqs_order_items.push(order_item)
|
||||
end
|
||||
# end
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,7 +9,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
filename = "tmp/order_item.pdf"
|
||||
|
||||
# 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.render_file filename
|
||||
|
||||
@@ -22,7 +22,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
else
|
||||
self.print(filename, oqs.printer_name)
|
||||
end
|
||||
end
|
||||
# end
|
||||
end
|
||||
|
||||
# Query for per order
|
||||
@@ -40,7 +40,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
options = odi.options == "[]"? "" : odi.options
|
||||
|
||||
# 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.render_file "tmp/order_item.pdf"
|
||||
pdf.render_file filename
|
||||
@@ -51,7 +51,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
else
|
||||
self.print(filename, oqs.printer_name)
|
||||
end
|
||||
end
|
||||
#end
|
||||
end
|
||||
# For Print Order Summary
|
||||
else
|
||||
@@ -81,7 +81,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
options = odi.options == "[]"? "" : odi.options
|
||||
|
||||
# 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.render_file filename
|
||||
|
||||
@@ -94,11 +94,11 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
else
|
||||
self.print(filename, oqs.printer_name)
|
||||
end
|
||||
end
|
||||
#end
|
||||
end
|
||||
# For Print Order Summary
|
||||
else
|
||||
filename = "tmp/booking_summary.pdf"
|
||||
filename = "tmp/booking_summary.pdf"
|
||||
pdf = OrderSummaryPdf.new(print_settings,order, print_status,oqs.use_alternate_name)
|
||||
pdf.render_file filename
|
||||
if oqs.print_copy
|
||||
@@ -123,7 +123,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
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 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")
|
||||
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")
|
||||
@@ -133,7 +133,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
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 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")
|
||||
else
|
||||
# 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 customers as cus ON cus.customer_id = orders.customer_id
|
||||
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
|
||||
|
||||
@@ -153,7 +153,7 @@ class Promotion < ApplicationRecord
|
||||
update_existing_item(promotion_qty, item, sale_id, "promotion", item.price)
|
||||
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.product_code = item.item_code
|
||||
@@ -161,13 +161,13 @@ class Promotion < ApplicationRecord
|
||||
sale_item.product_alt_name = item.alt_name
|
||||
sale_item.account_id = item.account_id
|
||||
sale_item.remark = type
|
||||
sale_item.qty = foc_qty * (-1)
|
||||
sale_item.qty = qty * (-1)
|
||||
|
||||
sale_item.unit_price = item_price # * (-1)
|
||||
sale_item.taxable_price = item_price # * (-1)
|
||||
sale_item.price = foc_qty * item_price * (-1)
|
||||
sale_item.taxable_price = (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.save
|
||||
sale = Sale.find(sale_id)
|
||||
|
||||
@@ -48,7 +48,7 @@ class Sale < ApplicationRecord
|
||||
|
||||
# dining charges
|
||||
charges = DiningCharge.where('dining_facility_id=?',booking.dining_facility_id).take
|
||||
if !charges.nil?
|
||||
if !charges.nil?
|
||||
block_count, diningprice = DiningCharge.amount_calculate(charges, booking.checkin_at, booking.checkout_at)
|
||||
dining_time = booking.checkin_at.strftime('%H:%M %p').to_s + " - " + booking.checkout_at.strftime('%H:%M %p').to_s
|
||||
create_saleitem_diningcharges(charges, block_count, diningprice, booking.dining_facility.name, dining_time)
|
||||
@@ -166,7 +166,7 @@ class Sale < ApplicationRecord
|
||||
|
||||
sale_item.qty = item.qty
|
||||
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.price = sale_item.qty * sale_item.unit_price
|
||||
@@ -225,7 +225,8 @@ class Sale < ApplicationRecord
|
||||
puts "item.sales_item_id ddd"
|
||||
puts item.sale_item_id
|
||||
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
|
||||
|
||||
apply_tax (total_taxable)
|
||||
@@ -253,7 +254,11 @@ class Sale < ApplicationRecord
|
||||
sales_items.each do |item|
|
||||
#compute each item and added to total
|
||||
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
|
||||
|
||||
compute_tax(sale, total_taxable, total_discount)
|
||||
@@ -269,6 +274,7 @@ class Sale < ApplicationRecord
|
||||
|
||||
end
|
||||
|
||||
# No Use too many wrong
|
||||
def compute_without_void
|
||||
sales_items = self.sale_items
|
||||
|
||||
@@ -467,9 +473,7 @@ class Sale < ApplicationRecord
|
||||
else
|
||||
sale = Sale.all.joins("JOIN sale_payments sp on sp.sale_id = sales.sale_id")
|
||||
.where("sp.payment_method ='creditnote' #{keyword} #{custo}")
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def self.get_rounding_adjustment(num)
|
||||
@@ -604,19 +608,33 @@ def self.get_by_shift_sale(from,to,status)
|
||||
end
|
||||
|
||||
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, " +
|
||||
"(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" +
|
||||
" menu_category_name,mc.id as menu_category_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 menu_categories mc ON mc.id = mi.menu_category_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.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")
|
||||
end
|
||||
|
||||
@@ -759,35 +777,34 @@ end
|
||||
|
||||
def self.get_separate_tax(shift_sale_range=nil,shift,from,to,payment_type)
|
||||
|
||||
if payment_type.blank?
|
||||
payment_type = ''
|
||||
else
|
||||
if payment_type == 'card'
|
||||
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
|
||||
payment_type = " and sale_payments.payment_method = '#{payment_type}'"
|
||||
end
|
||||
end
|
||||
# wrong amount tax for service and commercial tax
|
||||
|
||||
# if payment_type.blank?
|
||||
# payment_type = ''
|
||||
# else
|
||||
# if payment_type == 'card'
|
||||
# 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
|
||||
# payment_type = " and sale_payments.payment_method = '#{payment_type}'"
|
||||
# end
|
||||
# end
|
||||
|
||||
if shift.present?
|
||||
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("join sale_payments on sale_payments.sale_id = sales.sale_id")
|
||||
.where("sales.shift_sale_id in (?) #{payment_type} and sale_status= 'completed' and sale_payments.payment_amount != 0", shift.to_a)
|
||||
.where("sales.shift_sale_id in (?) and sale_status= 'completed'", shift.to_a)
|
||||
.group("sale_taxes.tax_name")
|
||||
.order("sale_taxes.sale_tax_id asc")
|
||||
elsif shift_sale_range.present?
|
||||
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("join sale_payments on sale_payments.sale_id = sales.sale_id")
|
||||
.where("sales.shift_sale_id in (?) #{payment_type} and sale_status= 'completed' and sale_payments.payment_amount != 0", shift_sale_range.to_a)
|
||||
.where("sales.shift_sale_id in (?) and sale_status= 'completed'", shift_sale_range.to_a)
|
||||
.group("sale_taxes.tax_name")
|
||||
.order("sale_taxes.sale_tax_id asc")
|
||||
else
|
||||
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("join sale_payments on sale_payments.sale_id = sales.sale_id")
|
||||
.where("sales.receipt_date between ? and ? #{payment_type} and sale_status= 'completed' and sale_payments.payment_amount != 0", from,to)
|
||||
.where("sales.receipt_date between ? and ? and sale_status= 'completed'", from,to)
|
||||
.group("sale_taxes.tax_name")
|
||||
.order("sale_taxes.sale_tax_id asc")
|
||||
end
|
||||
@@ -951,7 +968,7 @@ end
|
||||
# .joins("join sale_payments on sale_id = 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")
|
||||
.sum("sp.payment_amount")
|
||||
|
||||
@@ -970,7 +987,7 @@ end
|
||||
end
|
||||
|
||||
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)
|
||||
.joins("JOIN sale_payments as sp ON sp.sale_id = sales.sale_id")
|
||||
end
|
||||
@@ -978,7 +995,7 @@ end
|
||||
def self.payment_sale(payment_method, today)
|
||||
query = Sale.joins("JOIN sale_payments as sp ON sp.sale_id = sales.sale_id")
|
||||
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
|
||||
query = query.where("sales.sale_status = 'completed' and sp.payment_method = '#{payment_method}' and DATE_FORMAT(sales.receipt_date,'%Y-%m-%d') = ?",today)
|
||||
end
|
||||
|
||||
@@ -11,6 +11,44 @@ class SaleItem < ApplicationRecord
|
||||
def compute_item
|
||||
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)
|
||||
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
|
||||
sale_items.where("is_taxable = false AND remark = 'Discount'").find_each do |si|
|
||||
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
|
||||
discount_accounts.push(discount_account)
|
||||
|
||||
@@ -169,12 +169,21 @@ class SalePayment < ApplicationRecord
|
||||
|
||||
def foc_payment
|
||||
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_amount = self.received_amount
|
||||
self.outstanding_amount = self.sale.grand_total.to_f - self.received_amount.to_f
|
||||
self.payment_status = "paid"
|
||||
payment_method = self.save!
|
||||
sale_update_payment_status(self.received_amount)
|
||||
sale_update_payment_status(self.received_amount)
|
||||
|
||||
return payment_status
|
||||
end
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ class ShiftSale < ApplicationRecord
|
||||
self.cash_sales = self.cash_sales.to_f + cash.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.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.total_rounding = self.total_rounding + saleobj.rounding_adjustment
|
||||
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.credit_sales = self.credit_sales.to_i - credit.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.total_rounding = self.total_rounding - saleobj.rounding_adjustment
|
||||
self.total_void = self.total_void + saleobj.grand_total
|
||||
|
||||
@@ -104,7 +104,7 @@ class OrderSummaryPdf < Prawn::Document
|
||||
|
||||
order_item.each do|odi|
|
||||
# check for item not to show
|
||||
if odi.price != 0
|
||||
# if odi.price != 0
|
||||
y_position = cursor
|
||||
|
||||
bounding_box([0,y_position], :width => self.item_width) do
|
||||
@@ -148,7 +148,7 @@ class OrderSummaryPdf < Prawn::Document
|
||||
dash(1, :space => 1, :phase => 1)
|
||||
stroke_horizontal_line 0, (self.page_width - self.margin)
|
||||
move_down 5
|
||||
end
|
||||
# end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -45,7 +45,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
delimiter = ""
|
||||
end
|
||||
|
||||
header( shop_details)
|
||||
header(shop_details)
|
||||
|
||||
stroke_horizontal_rule
|
||||
|
||||
@@ -60,12 +60,14 @@ class ReceiptBillPdf < Prawn::Document
|
||||
|
||||
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)
|
||||
end
|
||||
|
||||
items_account(item_price_by_accounts,printer_settings.precision,delimiter)
|
||||
|
||||
if shop_details.show_account_info
|
||||
items_account(item_price_by_accounts,printer_settings.precision,delimiter)
|
||||
end
|
||||
|
||||
sign(sale_data)
|
||||
|
||||
footer(printed_status)
|
||||
@@ -389,6 +391,8 @@ class ReceiptBillPdf < Prawn::Document
|
||||
text "#{ customer_name }" , :size => self.item_font_size,:align => :right
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def discount_account(discount_price_by_accounts,precision,delimiter)
|
||||
move_down 5
|
||||
stroke_horizontal_rule
|
||||
|
||||
@@ -2,7 +2,7 @@ class MenuItemImageUploader < CarrierWave::Uploader::Base
|
||||
|
||||
# Include RMagick or MiniMagick support:
|
||||
# include CarrierWave::RMagick
|
||||
# include CarrierWave::MiniMagick
|
||||
include CarrierWave::MiniMagick
|
||||
|
||||
# Choose what kind of storage to use for this uploader:
|
||||
storage :file
|
||||
@@ -33,6 +33,8 @@ class MenuItemImageUploader < CarrierWave::Uploader::Base
|
||||
|
||||
# Process files as they are uploaded:
|
||||
# process scale: [200, 300]
|
||||
process :resize_to_fit => [200, 150]
|
||||
|
||||
#
|
||||
# def scale(width, height)
|
||||
# # do something
|
||||
|
||||
@@ -2,7 +2,7 @@ class ProductImageUploader < CarrierWave::Uploader::Base
|
||||
|
||||
# Include RMagick or MiniMagick support:
|
||||
# include CarrierWave::RMagick
|
||||
# include CarrierWave::MiniMagick
|
||||
include CarrierWave::MiniMagick
|
||||
|
||||
# Choose what kind of storage to use for this uploader:
|
||||
storage :file
|
||||
@@ -33,6 +33,7 @@ class ProductImageUploader < CarrierWave::Uploader::Base
|
||||
|
||||
# Process files as they are uploaded:
|
||||
# process scale: [200, 300]
|
||||
process :resize_to_fit => [200, 150]
|
||||
#
|
||||
# def scale(width, height)
|
||||
# # do something
|
||||
|
||||
@@ -90,26 +90,28 @@ json.options opt_format
|
||||
# json.item_attributes = item_instance.item_attributes
|
||||
|
||||
json.instances item.menu_item_instances do |is|
|
||||
# Convert id to name for attributes
|
||||
instance_attr = []
|
||||
if is.is_available
|
||||
# Convert id to name for attributes
|
||||
instance_attr = []
|
||||
|
||||
is.item_attributes.each do |ia|
|
||||
# mItemAttr = MenuItemAttribute.find(is)
|
||||
# instance_attr.push(ia)
|
||||
mItemAttr = MenuItemAttribute.find(ia).name
|
||||
instance_attr.push(mItemAttr)
|
||||
is.item_attributes.each do |ia|
|
||||
# mItemAttr = MenuItemAttribute.find(is)
|
||||
# instance_attr.push(ia)
|
||||
mItemAttr = MenuItemAttribute.find(ia).name
|
||||
instance_attr.push(mItemAttr)
|
||||
end
|
||||
|
||||
json.id is.id
|
||||
json.code is.item_instance_code
|
||||
json.name is.item_instance_name
|
||||
json.price is.price
|
||||
json.is_available is.is_available
|
||||
json.is_default is.is_default
|
||||
json.is_on_promotion is.is_on_promotion
|
||||
json.promotion_price is.promotion_price
|
||||
json.values instance_attr
|
||||
# json.item_sets is.item_sets
|
||||
end
|
||||
|
||||
json.id is.id
|
||||
json.code is.item_instance_code
|
||||
json.name is.item_instance_name
|
||||
json.price is.price
|
||||
json.is_available is.is_available
|
||||
json.is_default is.is_default
|
||||
json.is_on_promotion is.is_on_promotion
|
||||
json.promotion_price is.promotion_price
|
||||
json.values instance_attr
|
||||
# json.item_sets is.item_sets
|
||||
end
|
||||
|
||||
#Child Menu items
|
||||
|
||||
@@ -1,148 +1,152 @@
|
||||
|
||||
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
|
||||
<span class="patch_method"></span>
|
||||
<%= f.hidden_field :id, :class => "form-control " %>
|
||||
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
|
||||
<span class="patch_method"></span>
|
||||
<%= f.hidden_field :id, :class => "form-control " %>
|
||||
|
||||
<div class="form-group">
|
||||
<label> <%= t("views.right_panel.detail.salutation") %> :</label><br>
|
||||
<label><%= t("views.right_panel.detail.mr") %></label>
|
||||
<%= 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>
|
||||
<%= 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>
|
||||
<%= 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>
|
||||
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm with-gap radio-col-indigo", :value=>"Mdm", :style=>"width: 30px"%>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :name, :class => "form-control col-md-6 name", :required => true %>
|
||||
<% flash.each do |test, msg| %>
|
||||
<%
|
||||
str="[\"#{msg['name']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label> <%= t("views.right_panel.detail.salutation") %> :</label><br>
|
||||
<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"%>
|
||||
</label>
|
||||
<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"%>
|
||||
</label>
|
||||
<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"%>
|
||||
</label>
|
||||
<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"%>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.gender") %> :</label><br>
|
||||
<label><%= t("views.right_panel.detail.male") %></label>
|
||||
<%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%>
|
||||
<label><%= t("views.right_panel.detail.female") %></label>
|
||||
<%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :nrc_no,:label => "NRC No", :class => "form-control nrc_no" %>
|
||||
</div>
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :name, :class => "form-control col-md-6 name", :required => true %>
|
||||
<% flash.each do |test, msg| %>
|
||||
<%
|
||||
str="[\"#{msg['name']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :company, :class => "form-control col-md-6 company"%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['company']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['contact_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.gender") %> :</label><br>
|
||||
<label><%= t("views.right_panel.detail.male") %>
|
||||
<%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%></label>
|
||||
<label><%= t("views.right_panel.detail.female") %>
|
||||
<%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%></label>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['email']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%= f.input :nrc_no,:label => "NRC No", :class => "form-control nrc_no" %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :address, :class => "form-control col-md-6 address" %>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%= f.input :company, :class => "form-control col-md-6 company"%>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.sr_no") %></label>
|
||||
<div class="form-line disabled">
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['company']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['contact_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['email']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :address, :class => "form-control col-md-6 address" %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.sr_no") %></label>
|
||||
<div class="form-line disabled">
|
||||
<input type="text" name="" value="<%=@count_customer%>" class="form-control" disabled="" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.date_of_birth") %></label>
|
||||
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<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: " >
|
||||
<% Lookup.where("lookup_type = ?", "customer_type" ).each do |ct| %>
|
||||
<option value="<%= ct.value %>">
|
||||
<%= ct.name %></option>
|
||||
<%end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['card_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.paypar_account_no") %>:</label>
|
||||
<div class="-group">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<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: " >
|
||||
<option value=""><%= t("views.right_panel.detail.select_membership_group") %></option>
|
||||
<% Lookup.where("lookup_type = ?", "member_group_type" ).each do |member| %>
|
||||
<option value="<%= member.value %>">
|
||||
<%= member.name %></option>
|
||||
<%end %>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.date_of_birth") %></label>
|
||||
<%= f.text_field :date_of_birth, :value=>"01-01-1990",:class=>"datepicker form-control col-md-12"%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<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: " >
|
||||
<% Lookup.where("lookup_type = ?", "customer_type" ).each do |ct| %>
|
||||
<option value="<%= ct.value %>">
|
||||
<%= ct.name %></option>
|
||||
<%end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['card_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.paypar_account_no") %>:</label>
|
||||
<div class="-group">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<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: " >
|
||||
<option value=""><%= t("views.right_panel.detail.select_membership_group") %></option>
|
||||
<% Lookup.where("lookup_type = ?", "member_group_type" ).each do |member| %>
|
||||
<option value="<%= member.value %>">
|
||||
<%= member.name %></option>
|
||||
<%end %>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<!-- <%= f.submit "Submit",:class => 'btn btn-primary ', :id => 'submit_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-info" disabled id="update_customer"><%= t("views.btn.update") %></button>
|
||||
<button type="button" class="btn btn-danger" id="reset"><%= t("views.btn.reset") %></button>
|
||||
</div>
|
||||
<%end%>
|
||||
<div class="form-group">
|
||||
<!-- <%= f.submit "Submit",:class => 'btn btn-primary ', :id => 'submit_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-info" disabled id="update_customer"><%= t("views.btn.update") %></button>
|
||||
<button type="button" class="btn btn-danger" id="reset"><%= t("views.btn.reset") %></button>
|
||||
</div>
|
||||
<%end%>
|
||||
|
||||
|
||||
<div id="sxModal">
|
||||
<div id="sxModal-Content"><h3><%= t :card_tap %></h3></div>
|
||||
<div id="sxModal-Content"><h3><%= t :card_tap %></h3></div>
|
||||
</div>
|
||||
<!-- The modal -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="modalLabelLarge" aria-hidden="true">
|
||||
@@ -150,9 +154,9 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div id="container">
|
||||
<video autoplay="true" id="videoElement">
|
||||
|
||||
</video>
|
||||
<video autoplay="true" id="videoElement">
|
||||
|
||||
</video>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +165,7 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
// Read Card Reader
|
||||
// Read Card Reader
|
||||
$("#paypar_account_no").on('focus', function(e){
|
||||
if($(this).val() == ''){
|
||||
$("#sxModal").show();
|
||||
|
||||
@@ -12,87 +12,90 @@
|
||||
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-9 col-md-9 col-sm-9">
|
||||
<!-- <div class="main-box-body clearfix"> -->
|
||||
<div class="body table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<!-- <div class="table-responsive">
|
||||
<table class="table table-striped"> -->
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<!-- <button id="member_acc_no" class="btn btn-success btn-md"><span class="fa fa-credit-card"></span> Member Card</button>
|
||||
<button id="qr_code" class="btn btn-danger btn-md">
|
||||
<span class="fa fa-credit-card"></span> QR CODE
|
||||
</button> -->
|
||||
<div class="body">
|
||||
<%= form_tag crm_customers_path, :id => "filter_form", :method => :get do %>
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
|
||||
<input type="text" name="filter" style="margin-right:10px" placeholder="Search" id="search" class="form-control">
|
||||
<input type="hidden" name="type" id="type" value="">
|
||||
<div class="card">
|
||||
<div class="body table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<!-- <div class="table-responsive">
|
||||
<table class="table table-striped"> -->
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<!-- <button id="member_acc_no" class="btn btn-success btn-md"><span class="fa fa-credit-card"></span> Member Card</button>
|
||||
<button id="qr_code" class="btn btn-danger btn-md">
|
||||
<span class="fa fa-credit-card"></span> QR CODE
|
||||
</button> -->
|
||||
<div class="body">
|
||||
<%= form_tag crm_customers_path, :id => "filter_form", :method => :get do %>
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
|
||||
<input type="text" name="filter" style="margin-right:10px" placeholder="Search" id="search" class="form-control">
|
||||
<input type="hidden" name="type" id="type" value="">
|
||||
</div>
|
||||
<!-- <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12"> -->
|
||||
<button type="submit" class="btn bg-blue waves-effect" style="margin-right: 10px;"><%= t("views.btn.search") %></button>
|
||||
<!-- </div> -->
|
||||
<button type="button" id="member_acc_no" class="btn bg-green btn-sm waves-effect" style="margin-right: 10px;"><%= t("views.btn.memeber_card") %></button>
|
||||
<button type="button" id="qr_code" class="btn bg-green btn-sm waves-effect" style="margin-right: 10px;"><%= t("views.btn.qr_code") %></button>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12"> -->
|
||||
<button type="submit" class="btn bg-blue waves-effect" style="margin-right: 10px;"><%= t("views.btn.search") %></button>
|
||||
<!-- </div> -->
|
||||
<button type="button" id="member_acc_no" class="btn bg-green btn-sm waves-effect" style="margin-right: 10px;"><%= t("views.btn.memeber_card") %></button>
|
||||
<button type="button" id="qr_code" class="btn bg-green btn-sm waves-effect" style="margin-right: 10px;"><%= t("views.btn.qr_code") %></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><%= t("views.right_panel.detail.sr_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.name") %></th>
|
||||
<th><%= t("views.right_panel.detail.card_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.contact_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.email") %></th>
|
||||
<th><%= t("views.right_panel.detail.action") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% if @crm_customers.count > 0 %>
|
||||
<% @i = 0 %>
|
||||
<% @crm_customers.each do |crm_customer| %>
|
||||
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
||||
<td>
|
||||
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
||||
<td>
|
||||
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
|
||||
<%= @i += 1 %>
|
||||
<%else%>
|
||||
-
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= crm_customer.name %></td>
|
||||
<td><%= crm_customer.card_no rescue '-' %></td>
|
||||
<td><%= crm_customer.contact_no %></td>
|
||||
<td><%= crm_customer.email %></td>
|
||||
<td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td>
|
||||
</tr>
|
||||
<% 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 %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><%= t("views.right_panel.detail.sr_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.name") %></th>
|
||||
<th><%= t("views.right_panel.detail.card_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.contact_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.email") %></th>
|
||||
<th><%= t("views.right_panel.detail.action") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @i = 0 %>
|
||||
<% @crm_customers.each do |crm_customer| %>
|
||||
|
||||
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
||||
<td>
|
||||
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
||||
<td>
|
||||
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
|
||||
<%= @i += 1 %>
|
||||
<%else%>
|
||||
-
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= crm_customer.name %></td>
|
||||
<td><%= crm_customer.card_no rescue '-' %></td>
|
||||
<td><%= crm_customer.contact_no %></td>
|
||||
<td><%= crm_customer.email %></td>
|
||||
<td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<%= paginate @crm_customers %>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<%= paginate @crm_customers %>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<div id="custom-slimscroll">
|
||||
<%= render 'new_form', crm_customer: @crm_customer, taxes: @taxes %>
|
||||
</div>
|
||||
<!-- <div class="col-lg-1 col-md-1 col-sm-1 ">
|
||||
<br>
|
||||
<a href="<%= dashboard_path%>" class="btn btn-primary">
|
||||
<i class="fa fa-arrow-left fa-lg"></i> Back
|
||||
</a>
|
||||
</div> -->
|
||||
<div class="card">
|
||||
<div class="body" id="custom-slimscroll">
|
||||
<%= render 'new_form', crm_customer: @crm_customer, taxes: @taxes %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-lg-1 col-md-1 col-sm-1 ">
|
||||
<br>
|
||||
<a href="<%= dashboard_path%>" class="btn btn-primary">
|
||||
<i class="fa fa-arrow-left fa-lg"></i> Back
|
||||
</a>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<%= simple_form_for([:crm,@dining_queue]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<p class="hidden generate_no"><%= @queue_no %></p>
|
||||
<!-- <div class="col-md-6"> -->
|
||||
<div class="form-inputs">
|
||||
<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">
|
||||
<%= simple_form_for([:crm,@dining_queue]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<p class="hidden generate_no"><%= @queue_no %></p>
|
||||
<!-- <div class="col-md-6"> -->
|
||||
<div class="form-inputs">
|
||||
<%= f.input :queue_no , :class => "dining",:id => "dining", :readonly => true%>
|
||||
<%= f.hidden_field :customer_id %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :contact_no %>
|
||||
<%= f.input :seater %>
|
||||
@@ -15,66 +19,68 @@
|
||||
<div class="form-actions">
|
||||
<%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-5 col-lg-5">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
||||
<div class="p-l-20 m-t-60">
|
||||
<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="col-xs-12 col-sm-12 col-md-5 col-lg-5">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
||||
<div class="p-l-20 m-t-60">
|
||||
<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 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 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>
|
||||
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
@@ -82,15 +88,15 @@
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.queue_no") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.queue_no_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
||||
3) <%= t("views.right_panel.detail.contact_no") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.contact_no_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.seater") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.seat_txt") %> <br>
|
||||
5) <%= t("views.right_panel.detail.remark") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.remark_txt") %> <br>
|
||||
1) <%= t("views.right_panel.detail.queue_no") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.queue_no_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
||||
3) <%= t("views.right_panel.detail.contact_no") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.contact_no_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.seater") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.seat_txt") %> <br>
|
||||
5) <%= t("views.right_panel.detail.remark") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.remark_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.create") %> <%= t("views.right_panel.button.queue") %> - <%= t("views.right_panel.detail.create_btn_txt") %> <%= t("views.right_panel.detail.queue_txt") %> <br>
|
||||
1) <%= t("views.right_panel.button.create") %> <%= t("views.right_panel.button.queue") %> - <%= t("views.right_panel.detail.create_btn_txt") %> <%= t("views.right_panel.detail.queue_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
@@ -105,21 +111,21 @@
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
|
||||
if($('form').attr('id') == "new_dining_queue"){
|
||||
$(document).ready(function(){
|
||||
|
||||
if($('form').attr('id') == "new_dining_queue"){
|
||||
var queue_no = $('.generate_no').text();
|
||||
$('#dining_queue_queue_no').val(queue_no);
|
||||
}
|
||||
|
||||
$( "input" ).focusin(function() {
|
||||
$('.addfocus').removeClass('addfocus');
|
||||
$( this ).addClass('addfocus');
|
||||
});
|
||||
}
|
||||
|
||||
$(".cashier_number").on('click', function(event){
|
||||
$( "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();
|
||||
|
||||
@@ -156,5 +162,24 @@ $(document).ready(function(){
|
||||
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>
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
<td align="right"><%= @summ_sale.total_discount %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tax (Services+Commercial) : </td>
|
||||
<td>Total Tax : </td>
|
||||
<td align="right"><%= @summ_sale.total_tax %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -147,7 +147,11 @@
|
||||
<% if payment.payment_method == 'mpu' || payment.payment_method == 'visa' || payment.payment_method == 'master' || payment.payment_method == 'jcb' %>
|
||||
<tr>
|
||||
<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>
|
||||
<% else %>
|
||||
<tr>
|
||||
@@ -220,16 +224,16 @@
|
||||
<table class="table">
|
||||
<% if !@total_order.nil? %>
|
||||
<tr>
|
||||
<td>Total Order : </td>
|
||||
<td align="right"><%= @total_order.total_order %></td>
|
||||
<td width="40px">Total Order : </td>
|
||||
<td align="right" width="60px" style="padding: 5px"><%= @total_order.total_order %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
<% if !(@total_accounts.nil?) %>
|
||||
<% @total_accounts.each do |account| %>
|
||||
<tr>
|
||||
<td><%= account.title %> (Account) : </td>
|
||||
<td align="right">
|
||||
<td width="40px"><%= account.title %> (Account) : </td>
|
||||
<td align="right" width="60px" style="padding: 5px">
|
||||
<% @account_data.each do |data| %>
|
||||
<% acc = account.title %>
|
||||
<%= data[""+acc+""] %> <% if !data[''+acc+''].nil? %> ( <%= data[''+acc+'_amount'] %> ) <% end %>
|
||||
@@ -240,15 +244,15 @@
|
||||
<% end %>
|
||||
<% if !@top_items.nil? %>
|
||||
<tr>
|
||||
<td>Top Item : </td>
|
||||
<td align="right"><%= @top_items.item_name %>
|
||||
<br>( <%= @top_items.item_total_price %> )</td>
|
||||
<td width="40px">Top Item : </td>
|
||||
<td align="right" width="60px" style="padding: 5px"><%= @top_items.item_name %>
|
||||
<br>(<%= @top_items.item_total_price %>)</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if !@total_foc_items.nil? %>
|
||||
<tr>
|
||||
<td>Total FOC Item : </td>
|
||||
<td align="right"><%= @total_foc_items %></td>
|
||||
<td width="40px">Total FOC Item : </td>
|
||||
<td align="right" width="60px" style="padding: 5px"><%= @total_foc_items %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
@@ -1,115 +1,119 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<div class="p-l-10">
|
||||
<%= simple_form_for([:inventory, @inventory_definition]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<div class="row">
|
||||
<% arr = MenuItem.active.order("name desc").pluck(:name, :item_code) %>
|
||||
<% Product.order("name desc").pluck(:name, :item_code).each do |p| %>
|
||||
<% arr.push(p) %>
|
||||
<% end %>
|
||||
<div class="col-md-4 ">
|
||||
<div class="form-group">
|
||||
<label class="control-label"><abbr title="required">*</abbr>Select Item</label>
|
||||
<select class="form-control item_code_place" id="item">
|
||||
<% if !@inventory_definition.item_code.nil? %>
|
||||
<% menuiteminstance = MenuItemInstance.find_by_item_instance_code(@inventory_definition.item_code) %>
|
||||
<% if menuiteminstance.nil? %>
|
||||
<% code = @inventory_definition.item_code %>
|
||||
<% else %>
|
||||
<% code = menuiteminstance.menu_item.item_code %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<option value=""></option>
|
||||
<% arr.each do |a| %>
|
||||
<% if a[1] == code %>
|
||||
<option value="<%= a[1] %>" selected><%= a[0] %></option>
|
||||
<% else %>
|
||||
<option value="<%= a[1] %>"><%= a[0] %></option>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% sample = [] %>
|
||||
<% if @inventory_definition.item_code.nil? %>
|
||||
<% if !MenuItemInstance.find_by_item_instance_code(@inventory_definition.item_code).nil? %>
|
||||
<% sample = MenuItemInstance.where("item_instance_code=?", @inventory_definition.item_code).pluck(:item_instance_name, :item_instance_code) %>
|
||||
<% else %>
|
||||
<% sample = Product.where("item_code=?", @inventory_definition.item_code).pluck(:name, :item_code) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="col-md-3"><%= f.input :item_code, collection: sample %></div>
|
||||
</div>
|
||||
|
||||
<%= f.input :min_order_level %>
|
||||
<%= f.input :max_stock_level %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit t("views.btn.submit"), class: 'btn bg-blue waves-effect' %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.select_item") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.item_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.item_code") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.item_code_txt2") %> <br>
|
||||
3) <%= t("views.right_panel.detail.min_order") %> <%= t("views.right_panel.detail.level") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.min_order_level_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.max_stock") %> <%= t("views.right_panel.detail.level") %> - <%= t("views.right_panel.detail.write_txt") %><%= t("views.right_panel.detail.max_stock_level_txt") %><br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.btn.submit") %> - <%= t("views.right_panel.detail.create_btn_txt") %> <%= t("views.right_panel.detail.inventory") %> <br>
|
||||
</p>
|
||||
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= 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>
|
||||
<div class="p-l-10">
|
||||
<%= simple_form_for([:inventory, @inventory_definition]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<div class="row">
|
||||
<% arr = MenuItem.active.order("name desc").pluck(:name, :item_code) %>
|
||||
<% Product.order("name desc").pluck(:name, :item_code).each do |p| %>
|
||||
<% arr.push(p) %>
|
||||
<% end %>
|
||||
<div class="col-md-4 ">
|
||||
<div class="form-group">
|
||||
<label class="control-label"><abbr title="required">*</abbr>Select Item</label>
|
||||
<select class="form-control item_code_place" id="item">
|
||||
<% if !@inventory_definition.item_code.nil? %>
|
||||
<% menuiteminstance = MenuItemInstance.find_by_item_instance_code(@inventory_definition.item_code) %>
|
||||
<% if menuiteminstance.nil? %>
|
||||
<% code = @inventory_definition.item_code %>
|
||||
<% else %>
|
||||
<% code = menuiteminstance.menu_item.item_code %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<option value=""></option>
|
||||
<% arr.each do |a| %>
|
||||
<% if a[1] == code %>
|
||||
<option value="<%= a[1] %>" selected><%= a[0] %></option>
|
||||
<% else %>
|
||||
<option value="<%= a[1] %>"><%= a[0] %></option>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% sample = [] %>
|
||||
<% if @inventory_definition.item_code.nil? %>
|
||||
<% if !MenuItemInstance.find_by_item_instance_code(@inventory_definition.item_code).nil? %>
|
||||
<% sample = MenuItemInstance.where("item_instance_code=?", @inventory_definition.item_code).pluck(:item_instance_name, :item_instance_code) %>
|
||||
<% else %>
|
||||
<% sample = Product.where("item_code=?", @inventory_definition.item_code).pluck(:name, :item_code) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="col-md-3"><%= f.input :item_code, collection: sample %></div>
|
||||
</div>
|
||||
|
||||
<%= f.input :min_order_level %>
|
||||
<%= f.input :max_stock_level %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit t("views.btn.submit"), class: 'btn bg-blue waves-effect' %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.select_item") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.item_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.item_code") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.item_code_txt2") %> <br>
|
||||
3) <%= t("views.right_panel.detail.min_order") %> <%= t("views.right_panel.detail.level") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.min_order_level_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.max_stock") %> <%= t("views.right_panel.detail.level") %> - <%= t("views.right_panel.detail.write_txt") %><%= t("views.right_panel.detail.max_stock_level_txt") %><br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.btn.submit") %> - <%= t("views.right_panel.detail.create_btn_txt") %> <%= t("views.right_panel.detail.inventory") %> <br>
|
||||
</p>
|
||||
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= 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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
$(document).ready(function () {
|
||||
// $(".item_code_place").select2({
|
||||
// placeholder: 'Select Item'
|
||||
// });
|
||||
// $("select#inventory_definition_item_code").select2();
|
||||
|
||||
$(".item_code_place").on('change', function (event) {
|
||||
var ajax_url = "<%= settings_find_item_instance_path %>";
|
||||
var item_code = this.value;
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
data: 'item_code=' + item_code,
|
||||
success: function (result) {
|
||||
$("#inventory_definition_item_code").empty();
|
||||
var itemlist;
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
itemlist = "<option value ='" + result[i][1] + "'>" + result[i][0] + "</option>";
|
||||
$("select#inventory_definition_item_code").append(itemlist);
|
||||
}
|
||||
var ajax_url = "<%= settings_find_item_instance_path %>";
|
||||
var item_code = this.value;
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
data: 'item_code=' + item_code,
|
||||
success: function (result) {
|
||||
$("#inventory_definition_item_code").empty();
|
||||
var itemlist;
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
itemlist = "<option value ='" + result[i][1] + "'>" + result[i][0] + "</option>";
|
||||
$("select#inventory_definition_item_code").append(itemlist);
|
||||
}
|
||||
// $("select#inventory_definition_item_code").append(itemlist);
|
||||
// $("select#inventory_definition_item_code").select2();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
@@ -3,7 +3,7 @@
|
||||
<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>
|
||||
<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>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -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 active"><%= t :details %></li>
|
||||
<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>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</div>
|
||||
<!-- Start Delete confirrm text !-->
|
||||
<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 %>
|
||||
<span><%= current_login_employee.name %></span>
|
||||
<% end %>
|
||||
@@ -30,7 +30,10 @@
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<%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">
|
||||
<h6>Are you sure you want to Logout ?</h6>
|
||||
<!-- <h6>This action can't be undo. </h6> -->
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
<div class="row m-b-15">
|
||||
<% @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 %>" >
|
||||
<form id="form_<%= employee.emp_id %>" action="<%= emp_login_path(employee.emp_id) %>" method="PATCH">
|
||||
</form>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<%
|
||||
@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="row">
|
||||
<span class="col-md-4 order-zone-type font-13"><%= qid.type %>-<%= qid.zone %></span>
|
||||
@@ -167,13 +167,9 @@
|
||||
<!-- Column Three -->
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<!-- OQS Buttons -->
|
||||
<button type="button" class="btn btn-block btn-default waves-effect" id='back'>
|
||||
<i class="material-icons m-t--10">reply</i>
|
||||
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>
|
||||
<!-- <a href="<%= dashboard_path %>" class="btn bg-blue btn-block btn-lg waves-effect" role="button" aria-haspopup="true"> Back </a> -->
|
||||
<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>
|
||||
<button type="button" title="Print Order Item" id="print_order_item" class="btn bg-blue btn-block btn-lg waves-effect">Print</a>
|
||||
<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="" id="print_order_summary">Print <br/>Order<br/>Summary</button> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -90,23 +90,25 @@ json.options opt_format
|
||||
# json.item_attributes = item_instance.item_attributes
|
||||
|
||||
json.instances item.menu_item_instances do |is|
|
||||
# Convert id to name for attributes
|
||||
instance_attr = []
|
||||
is.item_attributes.each do |ia|
|
||||
mItemAttr = MenuItemAttribute.find(ia).name
|
||||
instance_attr.push(mItemAttr)
|
||||
if is.is_available
|
||||
# Convert id to name for attributes
|
||||
instance_attr = []
|
||||
is.item_attributes.each do |ia|
|
||||
mItemAttr = MenuItemAttribute.find(ia).name
|
||||
instance_attr.push(mItemAttr)
|
||||
end
|
||||
|
||||
json.id is.id
|
||||
json.code is.item_instance_code
|
||||
json.name is.item_instance_name
|
||||
json.price is.price
|
||||
json.is_available is.is_available
|
||||
json.is_default is.is_default
|
||||
json.is_on_promotion is.is_on_promotion
|
||||
json.promotion_price is.promotion_price
|
||||
json.values instance_attr
|
||||
# json.item_sets is.item_sets
|
||||
end
|
||||
|
||||
json.id is.id
|
||||
json.code is.item_instance_code
|
||||
json.name is.item_instance_name
|
||||
json.price is.price
|
||||
json.is_available is.is_available
|
||||
json.is_default is.is_default
|
||||
json.is_on_promotion is.is_on_promotion
|
||||
json.promotion_price is.promotion_price
|
||||
json.values instance_attr
|
||||
# json.item_sets is.item_sets
|
||||
end
|
||||
|
||||
#Child Menu items
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<th class="item-attr">Price</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="font-13">
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
</button>
|
||||
</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">
|
||||
<button type="button" class="btn btn-success btn-number" value="+" id="plus">
|
||||
<i class="material-icons">add</i>
|
||||
@@ -214,7 +214,7 @@
|
||||
<i class="material-icons">remove</i>
|
||||
</button>
|
||||
</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">
|
||||
<button type="button" class="btn btn-success btn-number" value="+" id="set_plus">
|
||||
<i class="material-icons">add</i>
|
||||
|
||||
@@ -95,16 +95,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<div class="row bottom">
|
||||
<div class="cashier_number long border-left" data-value="1000" data-type="add">1000</div>
|
||||
<div class="cashier_number long left" data-value="3000" data-type="add">3000</div>
|
||||
<div class="row bottom p-l-20">
|
||||
<div class="cashier_number col-md-5 long border-left" data-value="1000" data-type="add">1000</div>
|
||||
<div class="cashier_number col-md-5 long left" data-value="3000" data-type="add">3000</div>
|
||||
</div>
|
||||
<div class="row bottom">
|
||||
<div class="cashier_number long border-left" data-value="5000" data-type="add">5000</div>
|
||||
<div class="cashier_number long left" data-value="10000" data-type="add">10000</div>
|
||||
<div class="row bottom p-l-20">
|
||||
<div class="cashier_number col-md-5 long border-left" data-value="5000" data-type="add">5000</div>
|
||||
<div class="cashier_number col-md-5 long left" data-value="10000" data-type="add">10000</div>
|
||||
</div>
|
||||
<div class="row bottom">
|
||||
<div class="pay purple left" id="credit_pay">Pay</div>
|
||||
<div class="row bottom p-l-20">
|
||||
<div class="pay purple left col-md-10" id="credit_pay">Pay</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,242 +13,244 @@
|
||||
|
||||
<div class="row">
|
||||
<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="table-responsive">
|
||||
<table id="origami-crm-table" class="table table-striped">
|
||||
|
||||
<div class="main-box-body clearfix" id="order-detail-slimscroll" style="">
|
||||
<div class="table-responsive">
|
||||
<table id="origami-crm-table" class="table table-striped">
|
||||
<thead>
|
||||
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<!-- <% path ="/origami/#{@sale_id}/customers" %>
|
||||
<%= form_tag path, :id => "filter_form", :method => :get do %>
|
||||
<div class="input-append col-md-7 form-group pull-left">
|
||||
<input type="text" name="filter" style="margin-right:10px" id="search" placeholder="Search" class="form-control input-sm col-md-9">
|
||||
<input type="hidden" name="type" id="type" value="">
|
||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
</div>
|
||||
<% end %>
|
||||
<button id="member_acc_no" class="btn btn-success btn-sm"><span class="fa fa-credit-card"></span> Member Card</button> -->
|
||||
<div class="body">
|
||||
<% path ="/origami/#{@sale_id}/customers" %>
|
||||
<%= form_tag path, :id => "filter_form", :method => :get do %>
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
|
||||
|
||||
<input type="text" name="filter" style="margin-right:10px" id="search" placeholder="Search" class="form-control input-sm col-md-12">
|
||||
<input type="hidden" name="type" id="type" value="<%= @dining_facility.type %>">
|
||||
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-12">
|
||||
<button type="submit" class="btn bg-blue waves-effect waves-effect">Search</button>
|
||||
</div>
|
||||
|
||||
<button type="button" id="member_acc_no" class="btn bg-green btn-sm waves-effect" style="height: 30%;margin-right: 10px;">Member Card</button>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Select</th>
|
||||
<th>Sr.no</th>
|
||||
<th>Name</th>
|
||||
<th>Company</th>
|
||||
<th>Contact no</th>
|
||||
<th>Email</th>
|
||||
<!-- <th>Paypar No</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<td colspan="6">
|
||||
<!-- <% path ="/origami/#{@sale_id}/customers" %>
|
||||
<%= form_tag path, :id => "filter_form", :method => :get do %>
|
||||
<div class="input-append col-md-7 form-group pull-left">
|
||||
<input type="text" name="filter" style="margin-right:10px" id="search" placeholder="Search" class="form-control input-sm col-md-9">
|
||||
<input type="hidden" name="type" id="type" value="">
|
||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
</div>
|
||||
<% end %>
|
||||
<button id="member_acc_no" class="btn btn-success btn-sm"><span class="fa fa-credit-card"></span> Member Card</button> -->
|
||||
<div class="body">
|
||||
<% path ="/origami/#{@sale_id}/customers" %>
|
||||
<%= form_tag path, :id => "filter_form", :method => :get do %>
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
|
||||
|
||||
<tbody>
|
||||
<% if @crm_customers.count > 0 %>
|
||||
<% @i = 0 %>
|
||||
<% @crm_customers.each do |crm_customer| %>
|
||||
<input type="text" name="filter" style="margin-right:10px" id="search" placeholder="Search" class="form-control input-sm col-md-12">
|
||||
<input type="hidden" name="type" id="type" value="<%= @dining_facility.type %>">
|
||||
|
||||
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
||||
<td>
|
||||
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-12">
|
||||
<button type="submit" class="btn bg-blue waves-effect waves-effect">Search</button>
|
||||
</div>
|
||||
|
||||
<button type="button" id="member_acc_no" class="btn bg-green btn-sm waves-effect" style="height: 30%;margin-right: 10px;">Member Card</button>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><%= t("views.right_panel.detail.sr_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.name") %></th>
|
||||
<th><%= t("views.right_panel.detail.card_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.contact_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.email") %></th>
|
||||
<!-- <th>Paypar No</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% if @crm_customers.count > 0 %>
|
||||
<% @i = 0 %>
|
||||
<% @crm_customers.each do |crm_customer| %>
|
||||
|
||||
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
||||
<td>
|
||||
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
|
||||
<%= @i += 1 %>
|
||||
<%else%>
|
||||
-
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= crm_customer.name %></td>
|
||||
<td><%= crm_customer.company rescue '-' %></td>
|
||||
<td><%= crm_customer.contact_no %></td>
|
||||
<td><%= crm_customer.email %></td>
|
||||
<!-- <td><%= crm_customer.paypar_account_no %></td> -->
|
||||
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
||||
<td>
|
||||
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
|
||||
<%= @i += 1 %>
|
||||
<%else%>
|
||||
-
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= crm_customer.name %></td>
|
||||
<td><%= crm_customer.company rescue '-' %></td>
|
||||
<td><%= crm_customer.contact_no %></td>
|
||||
<td><%= crm_customer.email %></td>
|
||||
<!-- <td><%= crm_customer.paypar_account_no %></td> -->
|
||||
|
||||
</tr>
|
||||
<% end %>
|
||||
<%else%>
|
||||
<tr><td colspan="5"><p style="text-align:center"><strong>There are no record for your search</strong></p></td></tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
</tr>
|
||||
<% end %>
|
||||
<%else%>
|
||||
<tr><td colspan="5"><p style="text-align:center"><strong>There are no record for your search</strong></p></td></tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<%= paginate @crm_customers %>
|
||||
<%= paginate @crm_customers %>
|
||||
</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-3 col-md-3 col-sm-3" >
|
||||
<div id="custom-slimscroll">
|
||||
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
|
||||
|
||||
<span class="patch_method"></span>
|
||||
<input type="hidden" id="sale_id" name="sale_id" value="<%= @sale_id %>" />
|
||||
<input type="hidden" id="table_id" name="table_id" value="<%= @dining_facility.id %>" />
|
||||
<input type="hidden" id="type" name="type" value="<%= @dining_facility.type %>" />
|
||||
<%= f.error_notification %>
|
||||
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
|
||||
<div class="form-group">
|
||||
<label>Salutation :</label><br>
|
||||
<label class="font-13">Mr</label>
|
||||
<%= f.radio_button :salutation,"Mr", :class => "salutation mr", :value=>"Mr"%>
|
||||
<label class="m-l--20">Miss</label>
|
||||
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs", :value=>"Mrs"%>
|
||||
<label class="m-l--20">Mrs</label>
|
||||
<%= f.radio_button :salutation,"Miss", :class => "salutation miss", :value=>"Miss"%>
|
||||
<label class="m-l--20">Mdm</label>
|
||||
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm", :value=>"Mdm"%>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<%= f.input :name, :class => "form-control col-md-6 name", :required => true %>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['name']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block"><%= str %></span>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Gender :</label><br>
|
||||
<label>Male</label>
|
||||
<%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%>
|
||||
<label>Female</label>
|
||||
<%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :nrc_no, :label => "NRC No",:class => "form-control nrc_no" %>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%= f.input :company, :class => "form-control col-md-6 company"%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['company']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block"><%= str %></span>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['contact_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block"><%= str %></span>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%>
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['contact_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block"><%= str %></span>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :address, :class => "form-control col-md-6 address" %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Sr.No</label>
|
||||
<input type="text" name="" value="<%=@count_customer%>" class="form-control" readonly="true">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Date Of Birth</label>
|
||||
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Select Customer Type</label>
|
||||
<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| %>
|
||||
<option value="<%= ct.value %>">
|
||||
<%= ct.name %></option>
|
||||
<%end %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="body" id="custom-slimscroll">
|
||||
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
|
||||
|
||||
<span class="patch_method"></span>
|
||||
<input type="hidden" id="sale_id" name="sale_id" value="<%= @sale_id %>" />
|
||||
<input type="hidden" id="table_id" name="table_id" value="<%= @dining_facility.id %>" />
|
||||
<input type="hidden" id="type" name="type" value="<%= @dining_facility.type %>" />
|
||||
<%= f.error_notification %>
|
||||
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
|
||||
<div class="form-group">
|
||||
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
|
||||
<label><%= t("views.right_panel.detail.salutation") %> :</label><br>
|
||||
<label class="font-15"><%= t("views.right_panel.detail.mr") %>
|
||||
<%= f.radio_button :salutation,"Mr", :class => "salutation mr", :value=>"Mr"%></label>
|
||||
<label class="font-15 m-l-20"><%= t("views.right_panel.detail.miss") %>
|
||||
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs", :value=>"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"%></label>
|
||||
<label class="font-15 m-l-20"><%= t("views.right_panel.detail.mdm") %>
|
||||
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm", :value=>"Mdm"%></label>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
|
||||
<%= f.input :name, :class => "form-control col-md-6 name", :required => true %>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['name']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block" style="margin-top:-10px"><%= str %></span>
|
||||
<span class="help-block"><%= str %></span>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Paypar Account No:</label>
|
||||
<div class="input-group">
|
||||
<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>
|
||||
<label><%= t("views.right_panel.detail.gender") %> :</label><br>
|
||||
<label><%= t("views.right_panel.detail.male") %>
|
||||
<%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%></label>
|
||||
<label><%= t("views.right_panel.detail.female") %>
|
||||
<%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%></label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :nrc_no, :label => "NRC No",:class => "form-control nrc_no" %>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%= f.input :company, :class => "form-control col-md-6 company"%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['company']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block"><%= str %></span>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['contact_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block"><%= str %></span>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%>
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['contact_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block"><%= str %></span>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :address, :class => "form-control col-md-6 address" %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.sr_no") %></label>
|
||||
<input type="text" name="" value="<%=@count_customer%>" class="form-control" readonly="true">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.date_of_birth") %></label>
|
||||
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<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" >
|
||||
<% Lookup.where("lookup_type = ?", "customer_type" ).each do |ct| %>
|
||||
<option value="<%= ct.value %>">
|
||||
<%= ct.name %></option>
|
||||
<%end %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Select Member Group</label>
|
||||
<select class="form-control col-md-12" name="member_group_id">
|
||||
<option value="">Select Membership Group</option>
|
||||
<% Lookup.where("lookup_type = ?", "member_group_type" ).each do |member| %>
|
||||
<option value="<%= member.value %>">
|
||||
<%= member.name %></option>
|
||||
<%end %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.submit "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' %> -->
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['name']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block" style="margin-top:-10px"><%= str %></span>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.paypar_account_no") %>:</label>
|
||||
<div class="input-group">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.select_membership_group") %></label>
|
||||
<select class="form-control col-md-12" name="member_group_id">
|
||||
<option value=""><%= t("views.right_panel.detail.select_membership_group") %></option>
|
||||
<% Lookup.where("lookup_type = ?", "member_group_type" ).each do |member| %>
|
||||
<option value="<%= member.value %>">
|
||||
<%= member.name %></option>
|
||||
<%end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= 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' %> -->
|
||||
</div>
|
||||
<%end%>
|
||||
</div>
|
||||
</div>
|
||||
<%end%>
|
||||
</div>
|
||||
<!-- 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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sxModal">
|
||||
<div id="sxModal-Content"><h3>Card Tap</h3></div>
|
||||
</div>
|
||||
<div id="sxModal">
|
||||
<div id="sxModal-Content"><h3>Card Tap</h3></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
/*$('.datepicker').datepicker({
|
||||
setDate: '12-12-1999',
|
||||
format : 'dd-mm-yyyy',
|
||||
@@ -407,36 +409,36 @@
|
||||
customer = '(' + customer_name + ')';
|
||||
}
|
||||
swal({
|
||||
title: "Confirmation !",
|
||||
text: 'Are You Sure to assign this customer' + customer + '!',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "green",
|
||||
confirmButtonText: "Yes!",
|
||||
cancelButtonClass: 'btn btn-danger',
|
||||
closeOnConfirm: false,
|
||||
}, function () {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "update_sale" ,
|
||||
data: {customer_id:customer_id,sale_id:sale_id},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.status == true)
|
||||
{
|
||||
var id = $("#table_id").val()
|
||||
var type = $("#type").val()
|
||||
if (type=="Table") {
|
||||
window.location.href = '/origami/table/'+id
|
||||
}else{
|
||||
window.location.href = '/origami/room/'+id
|
||||
}
|
||||
}else{
|
||||
swal("Alert!", "Record not found!", "error");
|
||||
location.reload();
|
||||
}
|
||||
title: "Confirmation !",
|
||||
text: 'Are You Sure to assign this customer' + customer + '!',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "green",
|
||||
confirmButtonText: "Yes!",
|
||||
cancelButtonClass: 'btn btn-danger',
|
||||
closeOnConfirm: false,
|
||||
}, function () {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "update_sale" ,
|
||||
data: {customer_id:customer_id,sale_id:sale_id},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.status == true)
|
||||
{
|
||||
var id = $("#table_id").val()
|
||||
var type = $("#type").val()
|
||||
if (type=="Table") {
|
||||
window.location.href = '/origami/table/'+id
|
||||
}else{
|
||||
window.location.href = '/origami/room/'+id
|
||||
}
|
||||
}else{
|
||||
swal("Alert!", "Record not found!", "error");
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$('#back').on('click',function(){
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
<hr />
|
||||
<div class="p-l-20">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="col-md-8">
|
||||
<div class="row bottom">
|
||||
<div class="col-md-3">
|
||||
<div class="fluid cashier_number" data-value="5" data-type="add">5%</div>
|
||||
@@ -193,11 +193,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
<div class="row p-l-5 p-r-5">
|
||||
<% if (!@sale_array.empty?) && (!@date.nil?) %>
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
Receipt No: <span id="receipt_no">
|
||||
Receipt No: <span id="receipt_no">
|
||||
<% if @status_sale == 'sale' %>
|
||||
<%= @sale_array[0].receipt_no rescue '' %>
|
||||
|
||||
@@ -152,12 +152,12 @@
|
||||
<br>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<% elsif !@date.nil? %>
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
Order No: <span id="order_no">
|
||||
<div class="col-lg-7 col-md-7 col-sm-7">
|
||||
Order No: <span id="order_no">
|
||||
<% if @status_order == 'order' %>
|
||||
<%= @obj_order.order_id rescue '' %>
|
||||
|
||||
@@ -165,8 +165,8 @@
|
||||
</span>
|
||||
<br>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
<br>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -176,18 +176,18 @@
|
||||
|
||||
<% if @status_sale == 'sale' %>
|
||||
<p class="hidden customer-id"><%= @sale_array[0].customer_id rescue '' %></p>
|
||||
Customer : <%= @sale_array[0].customer.name rescue '' %>
|
||||
Customer : <%= @sale_array[0].customer.name rescue '' %>
|
||||
<% elsif @status_order == 'order'
|
||||
%>
|
||||
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
|
||||
Customer : <%= @customer.name rescue "" %>
|
||||
Customer : <%= @customer.name rescue "" %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
<thead>
|
||||
<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="survey" class="btn btn-block bg-blue waves-effect"><%= t("views.right_panel.detail.survey") %></button>
|
||||
<% 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" 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> -->
|
||||
@@ -379,8 +379,6 @@
|
||||
<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="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="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>
|
||||
|
||||
@@ -1,24 +1,27 @@
|
||||
<%= simple_form_for @in_juty, :url => origami_index_in_juty_path(@table.id), :method => :post do |f| %>
|
||||
<span class="patch_method"></span>
|
||||
<%= f.error_notification %>
|
||||
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<span class="patch_method"></span>
|
||||
<%= f.error_notification %>
|
||||
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.hidden_field :dinning_id, :value => @table.id, :class => "form-control col-md-4 " %>
|
||||
<label>Commissioner Name:</label>
|
||||
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %>
|
||||
<%= f.input :in_time, :placeholder => "From Date", :class => "form-control" %>
|
||||
<%= f.input :out_time, :placeholder => "To Date", :class => "form-control" %>
|
||||
</div><br>
|
||||
<div class="form-inputs">
|
||||
<%= f.hidden_field :dinning_id, :value => @table.id, :class => "form-control col-md-4 " %>
|
||||
<label>Commissioner Name:</label>
|
||||
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %>
|
||||
<%= f.input :in_time, :placeholder => "From Date", :class => "form-control" %>
|
||||
<%= f.input :out_time, :placeholder => "To Date", :class => "form-control" %>
|
||||
</div><br>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.button :submit, "Create", :class => 'btn btn-primary ', :id => 'create' %>
|
||||
<%= f.button :submit, "Update", :class => 'btn btn-primary ', :disabled => '', :id => 'update' %>
|
||||
<%= f.button :button, "Reset", :class => 'btn btn-danger ', :id => 'reset' %>
|
||||
<div class="form-group">
|
||||
<%= f.button :submit, "Create", :class => 'btn btn-primary ', :id => 'create' %>
|
||||
<%= f.button :submit, "Update", :class => 'btn btn-primary ', :disabled => '', :id => 'update' %>
|
||||
<%= f.button :button, "Reset", :class => 'btn btn-danger ', :id => 'reset' %>
|
||||
|
||||
<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>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
<%= simple_form_for([:origami, @in_duty]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= f.error_notification %>
|
||||
<div class="form-inputs">
|
||||
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %>
|
||||
<br/><br/>
|
||||
<%= f.input :in_time %>
|
||||
<%= f.input :out_time %>
|
||||
</div>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %>
|
||||
<br/><br/>
|
||||
<%= f.input :in_time %>
|
||||
<%= f.input :out_time %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit %>
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<br>
|
||||
<%= 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>
|
||||
<%= f.error_notification %>
|
||||
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
|
||||
@@ -10,52 +12,55 @@
|
||||
<br/>
|
||||
|
||||
<!-- <%= f.input :in_time, :placeholder => "From Date", :class => "form-control datetimepicker" %>
|
||||
<%= f.input :out_time, :placeholder => "To Date", :class => "form-control datetimepicker" %>-->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="font-14">* In Time</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">date_range</i>
|
||||
</span>
|
||||
<% if !@in_duty.in_time.nil?%>
|
||||
<input type="text" name="in_duty[in_time]" value="<%= @in_duty.in_time.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control col-md-12" placeholder="Start Date...">
|
||||
<% else %>
|
||||
<input type="text" name="in_duty[in_time]" class="datetimepicker form-control col-md-12" placeholder="In Time...">
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.input :out_time, :placeholder => "To Date", :class => "form-control datetimepicker" %>-->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="font-14">* In Time</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">date_range</i>
|
||||
</span>
|
||||
<% if !@in_duty.in_time.nil?%>
|
||||
<input type="text" name="in_duty[in_time]" value="<%= @in_duty.in_time.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control col-md-12" placeholder="Start Date...">
|
||||
<% else %>
|
||||
<input type="text" name="in_duty[in_time]" class="datetimepicker form-control col-md-12" placeholder="In Time...">
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>* Out Time</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">date_range</i>
|
||||
</span>
|
||||
<% if !@in_duty.out_time.nil?%>
|
||||
<input type="text" name="in_duty[out_time]" value="<%= @in_duty.out_time.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control col-md-12" placeholder="Start Date...">
|
||||
<% else %>
|
||||
<input type="text" name="in_duty[out_time]" class="datetimepicker form-control col-md-12" placeholder="Out Time...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div><br>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<% f.button :submit, "Create", :class => 'btn bg-blue ', :id => 'create' %>
|
||||
<% f.button :submit, "Update", :class => 'btn bg-blue ', :disabled => '', :id => 'update' %>
|
||||
<% f.button :button, "Reset", :class => 'btn bg-danger ', :id => 'reset' %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Create In Duty", :class => 'btn bg-blue' %>
|
||||
<label>* Out Time</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">date_range</i>
|
||||
</span>
|
||||
<% if !@in_duty.out_time.nil?%>
|
||||
<input type="text" name="in_duty[out_time]" value="<%= @in_duty.out_time.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control col-md-12" placeholder="Start Date...">
|
||||
<% else %>
|
||||
<input type="text" name="in_duty[out_time]" class="datetimepicker form-control col-md-12" placeholder="Out Time...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div><br>
|
||||
|
||||
<div class="form-group">
|
||||
<% f.button :submit, "Create", :class => 'btn bg-blue ', :id => 'create' %>
|
||||
<% f.button :submit, "Update", :class => 'btn bg-blue ', :disabled => '', :id => 'update' %>
|
||||
<% f.button :button, "Reset", :class => 'btn bg-danger ', :id => 'reset' %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Create In Duty", :class => 'btn bg-blue' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
$(document).ready(function () {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -4,31 +4,34 @@
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<%= simple_form_for([:origami,@in_duty]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<label>Dining Name:</label>
|
||||
<%= @table.name %>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<label>Commissioner Name:</label>
|
||||
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %><br/><br/>
|
||||
<label>In time</label>
|
||||
<%= f.text_field :in_time, :value=>DateTime.now.strftime("%Y-%m-%d / %I:%M %p"),:class=>"form-control datepicker"%><br/>
|
||||
<label>Out time</label>
|
||||
<%= f.text_field :out_time, :value=>DateTime.now.strftime("%Y-%m-%d / %I:%M %p"),:class=>"form-control datepicker"%>
|
||||
</div><br>
|
||||
<div class="form-actions">
|
||||
<div class='row'>
|
||||
<div class="col-md-2">
|
||||
<%= link_to 'Back', origami_index_in_duty_path(@table.id), class: 'btn bg-default' %>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<button type="button" class="btn bg-blue btn-block" id='in_duty'>Create In Duty</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= f.error_notification %>
|
||||
<div class="form-inputs">
|
||||
<label>Dining Name:</label>
|
||||
<%= @table.name %>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<label>Commissioner Name:</label>
|
||||
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %><br/><br/>
|
||||
<label>In time</label>
|
||||
<%= f.text_field :in_time, :value=>DateTime.now.strftime("%Y-%m-%d / %I:%M %p"),:class=>"form-control datepicker"%><br/>
|
||||
<label>Out time</label>
|
||||
<%= f.text_field :out_time, :value=>DateTime.now.strftime("%Y-%m-%d / %I:%M %p"),:class=>"form-control datepicker"%>
|
||||
</div><br>
|
||||
<div class="form-actions">
|
||||
<div class='row'>
|
||||
<div class="col-md-2">
|
||||
<%= link_to 'Back', origami_index_in_duty_path(@table.id), class: 'btn bg-default' %>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<button type="button" class="btn bg-blue btn-block" id='in_duty'>Create In Duty</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
<!-- Action Panel -->
|
||||
<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 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>
|
||||
|
||||
@@ -137,32 +137,47 @@
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<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' %>
|
||||
|
||||
<% if @status_sale == 'sale' %>
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
Receipt No:
|
||||
<span id="receipt_no">
|
||||
<%= @obj_sale.receipt_no rescue '' %>
|
||||
|
||||
<% end %>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
|
||||
</span>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="col-lg-7 col-md-7 col-sm-7">
|
||||
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">
|
||||
Date: <span id="receipt_date"><%= @date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span>
|
||||
</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 class="card-title row customer_detail p-l-5 p-r-5" >
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<% if @status_sale == 'sale' %>
|
||||
<p class="hidden customer-id"><%= @obj_sale_sale.customer_id rescue '' %></p>
|
||||
Customer : <%= @obj_sale.customer.name rescue '-' %>
|
||||
Customer : <%= @obj_sale.customer.name rescue '-' %>
|
||||
<%else%>
|
||||
<p class="hidden customer-id"><%= @obj_order.customer_id rescue "-" %></p>
|
||||
Customer : <%= @customer.name rescue "-" %>
|
||||
Customer : <%= @customer.name rescue "-" %>
|
||||
<%end%>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<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">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -1,49 +1,118 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for(@survey, :url => origami_create_surveys_path) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="form-inputs p-l-10">
|
||||
<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| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="form-inputs p-l-10">
|
||||
|
||||
<%= f.input :child%>
|
||||
<%= f.input :adult %>
|
||||
<%= f.input :male %>
|
||||
<%= f.input :female %>
|
||||
<%= f.input :local %>
|
||||
<%= f.input :child , input_html: { class: 'col-md-10' }%>
|
||||
<%= f.input :adult , input_html: { class: 'col-md-10' }%>
|
||||
<%= f.input :male , input_html: { class: 'col-md-10' }%>
|
||||
<%= f.input :female , input_html: { class: 'col-md-10' }%>
|
||||
<%= 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="col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<div class="form-group">
|
||||
<label>Foreigner</label>
|
||||
<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-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<div 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">
|
||||
<label class="p-l-10">Foreigner</label>
|
||||
<!-- <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| %>
|
||||
<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">
|
||||
<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>
|
||||
|
||||
<input type="hidden" name="table_id" value="<%=@dining_facility.id%>">
|
||||
<%= 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 :receipt_no, :as => :hidden, :input_html => { :value => @receipt_no} %>
|
||||
<%= f.input :total_amount, :as => :hidden, :input_html => { :value => @grand_total } %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<%= f.input :total_customer %>
|
||||
<input type="hidden" name="table_id" value="<%=@dining_facility.id%>">
|
||||
<%= 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 :receipt_no, :as => :hidden, :input_html => { :value => @receipt_no} %>
|
||||
<%= f.input :total_amount, :as => :hidden, :input_html => { :value => @grand_total } %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<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">
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3 hidden">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
@@ -77,15 +146,95 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
$(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(){
|
||||
table_type = '<%=@table_type%>';
|
||||
table_type = '<%=@table_type%>';
|
||||
table_id = '<%=@dining_facility.id%>';
|
||||
if(table_type == "Table"){
|
||||
window.location.href = "/origami/table/" + table_id
|
||||
}
|
||||
else {
|
||||
window.location.href = "/origami/room/" + table_id
|
||||
}
|
||||
})
|
||||
if(table_type == "Table"){
|
||||
window.location.href = "/origami/table/" + table_id
|
||||
}
|
||||
else {
|
||||
window.location.href = "/origami/room/" + table_id
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -1,28 +1,32 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<%= simple_form_for(@print_setting) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for(@print_setting) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :unique_code %>
|
||||
<%= f.input :template %>
|
||||
<%= f.input :font %>
|
||||
<%= f.input :printer_name %>
|
||||
<%= f.input :api_settings %>
|
||||
<%= f.input :page_width %>
|
||||
<%= f.input :page_height %>
|
||||
<%= f.input :print_copies %>
|
||||
<%= f.input :precision %>
|
||||
<%= f.input :delimiter %>
|
||||
<%= f.input :heading_space %>
|
||||
</div>
|
||||
<div class="form-inputs">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :unique_code %>
|
||||
<%= f.input :template %>
|
||||
<%= f.input :font %>
|
||||
<%= f.input :printer_name %>
|
||||
<%= f.input :api_settings %>
|
||||
<%= f.input :page_width %>
|
||||
<%= f.input :page_height %>
|
||||
<%= f.input :print_copies %>
|
||||
<%= f.input :precision %>
|
||||
<%= f.input :delimiter %>
|
||||
<%= f.input :heading_space %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<!-- <label class="">Select Shift Period</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 class="col-lg-3 col-md-3 col-sm-3">
|
||||
<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 class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
|
||||
<label></label><br>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-12">
|
||||
<div class="card ">
|
||||
<div class="table-responsive">
|
||||
<div class="body table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<% if period_type != false %>
|
||||
<div class="row">
|
||||
<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">
|
||||
<option value=""><%= t("views.right_panel.detail.select_period") %></option>
|
||||
<option value="0">Today</option>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item active">Stock Check Report</li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
<%= link_to 'Back', inventory_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings,@settings_account]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="form-inputs p-l-10">
|
||||
<%= f.input :title ,:input_html=>{:class=>"col-md-10"},:required=>true%>
|
||||
<%= f.input :account_type, :collection => Lookup.collection_of("account_type"),:input_html=>{:class=>"col-md-10"},:required=>true %>
|
||||
<%= f.input :discount %>
|
||||
<%= f.input :point %>
|
||||
<%= f.input :bonus %>
|
||||
<%= f.input :rebate %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings,@settings_account]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="form-inputs p-l-10">
|
||||
<%= f.input :title ,:input_html=>{:class=>"col-md-10"},:required=>true%>
|
||||
<%= f.input :account_type, :collection => Lookup.collection_of("account_type"),:input_html=>{:class=>"col-md-10"},:required=>true %>
|
||||
<%= f.input :discount %>
|
||||
<%= f.input :point %>
|
||||
<%= f.input :bonus %>
|
||||
<%= f.input :rebate %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -1,27 +1,31 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings, @settings_cashier_terminal]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings, @settings_cashier_terminal]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-10">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :is_active %>
|
||||
<%= f.input :is_currently_login %>
|
||||
<%= f.input :auto_print_receipt %>
|
||||
<%= f.label "Select Zones", :class => 'control-label' %>
|
||||
<%= f.collection_check_boxes :zone_ids , Zone.all, :id, :name , :class => 'checkbox form-group'%>
|
||||
<%= f.input :printer_name %>
|
||||
<%= f.input :font %>
|
||||
<%= f.input :font_size %>
|
||||
<%= f.input :show_tax %>
|
||||
<%= f.input :show_cashier %>
|
||||
<%= f.input :show_guest_info %>
|
||||
</div>
|
||||
<div class="form-inputs p-l-10">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :is_active %>
|
||||
<%= f.input :is_currently_login %>
|
||||
<%= f.input :auto_print_receipt %>
|
||||
<%= f.label "Select Zones", :class => 'control-label' %>
|
||||
<%= f.collection_check_boxes :zone_ids , Zone.all, :id, :name , :class => 'checkbox form-group'%>
|
||||
<%= f.input :printer_name %>
|
||||
<%= f.input :font %>
|
||||
<%= f.input :font_size %>
|
||||
<%= f.input :show_tax %>
|
||||
<%= f.input :show_cashier %>
|
||||
<%= f.input :show_guest_info %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -1,57 +1,56 @@
|
||||
|
||||
<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-6 col-lg-6">
|
||||
<%= simple_form_for([:settings, @commissioner]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :name %>
|
||||
<%= f.label :emp_id, 'Employee' %>
|
||||
|
||||
<%= f.collection_select :emp_id, Employee.all.order('name asc'), :id, :name, {prompt: 'Select an Employee'}, {class: "form-control"} %>
|
||||
|
||||
<br/>
|
||||
|
||||
<%= 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'} %>
|
||||
|
||||
<br/>
|
||||
<%= f.label :joined_date %><br/>
|
||||
<%= f.text_field :joined_date, {class: 'form-control datepicker', id: 'joined_date', readonly: true} %><br/>
|
||||
<%= f.label :resigned_date %><br/>
|
||||
<%= f.text_field :resigned_date, {class: 'form-control datepicker', id: 'resigned_date', readonly: true} %><br/>
|
||||
<%= f.input :is_active %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
<p>
|
||||
<%= simple_form_for([:settings, @commissioner]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="form-inputs">
|
||||
<%= f.input :name %>
|
||||
<%= f.label :emp_id, 'Employee' %>
|
||||
|
||||
<%= f.collection_select :emp_id, Employee.all.order('name asc'), :id, :name, {prompt: 'Select an Employee'}, {class: "form-control"} %>
|
||||
|
||||
<br/>
|
||||
|
||||
<%= 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'} %>
|
||||
<br/>
|
||||
<%= f.label :joined_date %><br/>
|
||||
<%= f.text_field :joined_date, {class: 'form-control datepicker', id: 'joined_date', readonly: true} %><br/>
|
||||
<%= f.label :resigned_date %><br/>
|
||||
<%= f.text_field :resigned_date, {class: 'form-control datepicker', id: 'resigned_date', readonly: true} %><br/>
|
||||
<%= f.input :is_active %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
||||
2) <%= t("views.right_panel.detail.employee") %> <%= t("views.right_panel.detail.name_txt2") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.employee") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
||||
3) <%= t("views.right_panel.detail.commission_type") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.commission_type_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.joined_date") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.joined_date_txt") %> <br>
|
||||
5) <%= t("views.right_panel.detail.resigned_date") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.resigned_date_txt") %> <br>
|
||||
6) <%= t("views.right_panel.detail.active") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.active_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.submit") %> - <%= t("views.right_panel.detail.submit_btn_txt") %> <%= t("views.right_panel.detail.commissioner_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= 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.commissioner_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= 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.commissioner_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,39 +1,42 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<div class="p-l-15">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<div class="p-l-15">
|
||||
<%= simple_form_for([:settings,@commission]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<%= simple_form_for([:settings,@commission]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<div class="form-inputs">
|
||||
<!--<%= f.label :product_code, 'Product' %>
|
||||
<%= f.collection_select :product_code, MenuItem.all.order('name asc'), :id, :name, {prompt: 'Select a Product'}, {class: 'form-control'} %><br/>-->
|
||||
<%= f.input :name %>
|
||||
<%= f.input :commission_type, :collection => ['Percentage','Net Amount'], prompt: 'Select Commission Type', class: 'form-control' %>
|
||||
<%= f.input :amount %>
|
||||
<%= f.input :is_active,:class => "filled-in" ,:id => "" %>
|
||||
<%= f.input :is_active,:class => "filled-in" ,:id => "" %>
|
||||
|
||||
</div><br>
|
||||
<div class="form-actions">
|
||||
<%= f.submit 'Submit', class: 'btn btn-primary wave-effects' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.product") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.product_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.commission_type") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.commission_type_txt") %> <br>
|
||||
3) <%= t("views.right_panel.detail.amount") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.amount_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.active") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.active_txt") %> <br>
|
||||
1) <%= t("views.right_panel.detail.product") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.product_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.commission_type") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.commission_type_txt") %> <br>
|
||||
3) <%= t("views.right_panel.detail.amount") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.amount_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.active") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.active_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.submit") %> - <%= t("views.right_panel.detail.submit_btn_txt") %> <%= t("views.right_panel.detail.commission_txt") %> <br>
|
||||
1) <%= t("views.right_panel.button.submit") %> - <%= t("views.right_panel.detail.submit_btn_txt") %> <%= t("views.right_panel.detail.commission_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
<i class="material-icons">access_time</i>
|
||||
</span>
|
||||
<% 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 %>
|
||||
<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 %>
|
||||
</div>
|
||||
<!--<%= f.input :charge_block, :input_html => { :id => 'charge_block'} %>-->
|
||||
@@ -28,9 +28,9 @@
|
||||
<i class="material-icons">access_time</i>
|
||||
</span>
|
||||
<% 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 %>
|
||||
<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 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings,@employee]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings,@employee]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :role, :collection => Lookup.collection_of("employee_roles"),:class=>'form-group' %>
|
||||
<%= f.input :emp_id, :label => "Employee Numberic ID (*Unique)" %>
|
||||
<%= f.input :password %>
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :role, :collection => Lookup.collection_of("employee_roles"),:class=>'form-group' %>
|
||||
<%= f.input :emp_id, :label => "Employee Numberic ID (*Unique)" %>
|
||||
<%= f.input :password %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user