Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
superuser
2017-06-26 20:02:39 +06:30
125 changed files with 3941 additions and 636 deletions

8
.idea/.generators generated Normal file
View File

@@ -0,0 +1,8 @@
<?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="active_record:migration" /><Generator name="active_record:model" /><Generator name="active_record:observer" /><Generator name="active_record:session_migration" /><Generator name="controller" /><Generator name="erb:controller" /><Generator name="erb:mailer" /><Generator name="erb:scaffold" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="mailer" /><Generator name="metal" /><Generator name="migration" /><Generator name="model" /><Generator name="model_subclass" /><Generator name="observer" /><Generator name="performance_test" /><Generator name="plugin" /><Generator name="resource" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="session_migration" /><Generator name="stylesheets" /><Generator name="test_unit:controller" /><Generator name="test_unit:helper" /><Generator name="test_unit:integration" /><Generator name="test_unit:mailer" /><Generator name="test_unit:model" /><Generator name="test_unit:observer" /><Generator name="test_unit:performance" /><Generator name="test_unit:plugin" /><Generator name="test_unit:scaffold" /></GeneratorsGroup></Settings>

7
.idea/.rakeTasks generated Normal file

File diff suppressed because one or more lines are too long

4
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,4 @@
<?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 Normal file
View File

@@ -0,0 +1,8 @@
<?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>

236
.idea/sxrestaurant.iml generated Normal file
View File

@@ -0,0 +1,236 @@
<?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 />
<local>
<configuration default="false" name="test: sxrestaurant" type="RakeRunConfigurationType" factoryName="Rake">
<module name="sxrestaurant" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs>
<env name="RAILS_ENV" value="test" />
</envs>
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
<method />
</configuration>
<configuration default="false" name="spec: sxrestaurant" type="RakeRunConfigurationType" factoryName="Rake">
<module name="sxrestaurant" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="spec" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":rspec " />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
<method />
</configuration>
<configuration default="false" name="Production: sxrestaurant" type="RailsRunConfigurationType" factoryName="Rails">
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
<module name="sxrestaurant" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="production" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
<method />
</configuration>
<configuration default="false" name="Development: sxrestaurant" type="RailsRunConfigurationType" factoryName="Rails">
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
<module name="sxrestaurant" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
<method />
</configuration>
</local>
</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.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionpack (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionview (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activejob (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activemodel (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activerecord (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activesupport (v5.1.1, 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="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="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.0, 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.4, 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-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.2, 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="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.1, 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.1, 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="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" />
</component>
<component name="RModuleSettingsStorage">
<LOAD_PATH number="0" />
<I18N_FOLDERS number="1" string0="$MODULE_DIR$/config/locales" />
</component>
</module>

6
.idea/vcs.xml generated Normal file
View File

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

817
.idea/workspace.xml generated Normal file
View File

@@ -0,0 +1,817 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="89ca96af-a0e4-4fe4-b9a3-9969f22d7079" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/.generators" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/.rakeTasks" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/modules.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/sxrestaurant.iml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/controllers/origami/void_controller.rb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/dump.rdb" afterPath="$PROJECT_DIR$/dump.rdb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/config/routes.rb" afterPath="$PROJECT_DIR$/config/routes.rb" />
</list>
<ignored path="$PROJECT_DIR$/.bundle/" />
<ignored path="$PROJECT_DIR$/components/" />
<ignored path="$PROJECT_DIR$/public/system/" />
<ignored path="$PROJECT_DIR$/tmp/" />
<ignored path="$PROJECT_DIR$/vendor/bundle/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="booking.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/models/booking.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315">
<caret line="21" column="20" lean-forward="false" selection-start-line="21" selection-start-column="20" selection-end-line="21" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="home_controller.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/controllers/origami/home_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="387">
<caret line="40" column="40" lean-forward="false" selection-start-line="40" selection-start-column="40" selection-end-line="40" selection-end-column="40" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="payments_controller.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/controllers/origami/payments_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="266">
<caret line="65" column="35" lean-forward="false" selection-start-line="65" selection-start-column="35" selection-end-line="65" selection-end-column="35" />
<folding>
<marker date="1498476660000" expanded="true" signature="2556:2593" ph="if ... end" />
<marker date="1498476660000" expanded="true" signature="2556:2603" ph="do ... end" />
<marker date="1498476660000" expanded="true" signature="2556:2611" ph="if ... end" />
<marker date="1498476660000" expanded="true" signature="2556:2617" ph=" ... end" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="void_controller.rb" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/app/controllers/origami/void_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="375">
<caret line="25" column="5" lean-forward="true" selection-start-line="25" selection-start-column="5" selection-end-line="25" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="routes.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/config/routes.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="459">
<caret line="127" column="25" lean-forward="true" selection-start-line="127" selection-start-column="25" selection-end-line="127" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="show.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/origami/home/show.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="920">
<caret line="491" column="0" lean-forward="false" selection-start-line="491" selection-start-column="0" selection-end-line="491" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>origami</find>
</findStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/app/views/origami/orders/show.html.erb" />
<option value="$PROJECT_DIR$/app/controllers/origami/home_controller.rb" />
<option value="$PROJECT_DIR$/app/views/origami/home/show.html.erb" />
<option value="$PROJECT_DIR$/config/routes.rb" />
<option value="$PROJECT_DIR$/app/controllers/origami/void_controller.rb" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="ProjectFrameBounds">
<option name="y" value="22" />
<option name="width" value="1440" />
<option name="height" value="833" />
</component>
<component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="1" id="Add" />
</component>
<component name="ProjectView">
<navigator currentView="Scope" currentSubView="Project Files" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="RailsProjectView" />
<pane id="Scope">
<subPane subId="Project Files">
<PATH>
<PATH_ELEMENT USER_OBJECT="Root">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="sxrestaurant">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT USER_OBJECT="Root">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="sxrestaurant">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="app">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT USER_OBJECT="Root">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="sxrestaurant">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="app">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="controllers">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT USER_OBJECT="Root">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="sxrestaurant">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="app">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="controllers">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="origami">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scratches" />
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="sxrestaurant" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="sxrestaurant" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="Rails.Development: sxrestaurant">
<configuration default="true" type="CucumberRunConfigurationType" factoryName="Cucumber">
<predefined_log_file id="RUBY_CUCUMBER" enabled="true" />
<module name="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*.feature" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TAGS_FILTER" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_NAME_FILTER" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_ARGS" VALUE="--color -r features" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="VERBOSE_OPTION" VALUE="false" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_RUNNER_PATH" VALUE="" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_RUNNER" VALUE="false" />
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SETTINGS_VERSION" VALUE="2" />
<method />
</configuration>
<configuration default="true" type="JavaScriptTestRunnerJest" factoryName="Jest">
<node-interpreter value="project" />
<working-dir value="" />
<envs />
<scope-kind value="ALL" />
<method />
</configuration>
<configuration default="true" type="JavaScriptTestRunnerProtractor" factoryName="Protractor">
<config-file value="" />
<node-interpreter value="project" />
<envs />
<method />
</configuration>
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
<method />
</configuration>
<configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
<module name="" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
<method />
</configuration>
<configuration default="true" type="RailsRunConfigurationType" factoryName="Rails">
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
<module name="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
<method />
</configuration>
<configuration default="true" type="RakeRunConfigurationType" factoryName="Rake">
<module name="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
<method />
</configuration>
<configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
<module name="" />
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
<method />
</configuration>
<configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
<module name="" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
<method />
</configuration>
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
<node-interpreter>project</node-interpreter>
<node-options />
<gulpfile />
<tasks />
<arguments />
<envs />
<method />
</configuration>
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
<command value="run" />
<scripts />
<node-interpreter value="project" />
<envs />
<method />
</configuration>
<configuration default="false" name="test: sxrestaurant" type="RakeRunConfigurationType" factoryName="Rake">
<module name="sxrestaurant" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs>
<env name="RAILS_ENV" value="test" />
</envs>
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
<method />
</configuration>
<configuration default="false" name="spec: sxrestaurant" type="RakeRunConfigurationType" factoryName="Rake">
<module name="sxrestaurant" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="spec" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":rspec " />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
<method />
</configuration>
<configuration default="false" name="Production: sxrestaurant" type="RailsRunConfigurationType" factoryName="Rails">
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
<module name="sxrestaurant" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="production" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
<method />
</configuration>
<configuration default="false" name="Development: sxrestaurant" type="RailsRunConfigurationType" factoryName="Rails">
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
<module name="sxrestaurant" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
<method />
</configuration>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="Rake.test: sxrestaurant" />
<item index="1" class="java.lang.String" itemvalue="Rake.spec: sxrestaurant" />
<item index="2" class="java.lang.String" itemvalue="Rails.Production: sxrestaurant" />
<item index="3" class="java.lang.String" itemvalue="Rails.Development: sxrestaurant" />
</list>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="89ca96af-a0e4-4fe4-b9a3-9969f22d7079" name="Default" comment="" />
<created>1498458293643</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1498458293643</updated>
<workItem from="1498458295318" duration="2552000" />
<workItem from="1498465879846" duration="9435000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="11987000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="22" width="1440" height="833" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.22986111" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32911393" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="processedProjectFiles" value="true" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/app/controllers/origami/sales_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="285">
<caret line="19" column="36" lean-forward="false" selection-start-line="19" selection-start-column="36" selection-end-line="19" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/models/sale_payment.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3720">
<caret line="248" column="50" lean-forward="true" selection-start-line="248" selection-start-column="50" selection-end-line="248" selection-end-column="50" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/origami/void_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/home/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/home/show.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="4305">
<caret line="287" column="93" lean-forward="false" selection-start-line="287" selection-start-column="93" selection-end-line="287" selection-end-column="93" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/sales/show.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/orders/show.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2070">
<caret line="138" column="0" lean-forward="true" selection-start-line="138" selection-start-column="0" selection-end-line="138" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/database.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="214">
<caret line="42" column="16" lean-forward="true" selection-start-line="42" selection-start-column="16" selection-end-line="42" selection-end-column="16" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/application_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="217">
<caret line="18" column="40" lean-forward="false" selection-start-line="18" selection-start-column="40" selection-end-line="18" selection-end-column="40" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/customers/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-2013">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/sales/show.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/orders/show.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-609">
<caret line="135" column="51" lean-forward="true" selection-start-line="135" selection-start-column="51" selection-end-line="135" selection-end-column="51" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/home/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-171">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/models/sale_payment.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="5">
<caret line="10" column="6" lean-forward="false" selection-start-line="10" selection-start-column="6" selection-end-line="10" selection-end-column="6" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/origami/master_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/origami/sales_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="510">
<caret line="34" column="35" lean-forward="true" selection-start-line="34" selection-start-column="35" selection-end-line="34" selection-end-column="35" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/models/sale_audit.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="268">
<caret line="57" column="11" lean-forward="false" selection-start-line="57" selection-start-column="11" selection-end-line="57" selection-end-column="11" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/models/dining_facility.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="285">
<caret line="19" column="0" lean-forward="true" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/origami/movetable_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="750">
<caret line="50" column="25" lean-forward="false" selection-start-line="50" selection-start-column="25" selection-end-line="50" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/origami/orders_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/payments/create.json.jbuilder">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" column="0" lean-forward="true" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/origami/payments_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="266">
<caret line="65" column="35" lean-forward="false" selection-start-line="65" selection-start-column="35" selection-end-line="65" selection-end-column="35" />
<folding>
<marker date="1498476660000" expanded="true" signature="2556:2593" ph="if ... end" />
<marker date="1498476660000" expanded="true" signature="2556:2603" ph="do ... end" />
<marker date="1498476660000" expanded="true" signature="2556:2611" ph="if ... end" />
<marker date="1498476660000" expanded="true" signature="2556:2617" ph=" ... end" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/models/booking.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315">
<caret line="21" column="20" lean-forward="false" selection-start-line="21" selection-start-column="20" selection-end-line="21" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/origami/home_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="387">
<caret line="40" column="40" lean-forward="false" selection-start-line="40" selection-start-column="40" selection-end-line="40" selection-end-column="40" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/home/show.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="920">
<caret line="491" column="0" lean-forward="false" selection-start-line="491" selection-start-column="0" selection-end-line="491" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/routes.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="459">
<caret line="127" column="25" lean-forward="true" selection-start-line="127" selection-start-column="25" selection-end-line="127" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/origami/void_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="375">
<caret line="25" column="5" lean-forward="true" selection-start-line="25" selection-start-column="5" selection-end-line="25" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
</component>
</project>

View File

@@ -12,7 +12,7 @@ gem 'rails', '~> 5.1.0'
gem 'mysql2', '>= 0.3.18', '< 0.5'
#Use PosgreSQL
#gem 'pg'
gem 'pg'
# redis server for cable
# gem 'redis', '~> 3.0'

View File

@@ -122,7 +122,7 @@ GEM
nokogiri (1.8.0)
mini_portile2 (~> 2.2.0)
pdf-core (0.7.0)
pg (0.21.0)
pg (0.20.0)
prawn (2.2.2)
pdf-core (~> 0.7.0)
ttfunk (~> 1.5)

View File

@@ -27,7 +27,7 @@ $(document).ready(function(){
$('.queue_station').on('click',function(){
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 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();
@@ -68,6 +68,12 @@ $(document).ready(function(){
$(this).addClass('selected-item');
});
$(".order-item-edit").on('click', function(){
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
$('.order-complete').on('click',function(e){
//e.preventDefault();
@@ -134,4 +140,21 @@ $(document).ready(function(){
success: function(data){ }
});
});
// Qty update for OQS Edit Controller
$('#qty-update').on('click', function(){
var qty_weight = $("input[name='qty_weight']").val();
var remarks = $("textarea[name='remarks']").val();
var order_items_id = $(this).attr('data-id');
var params = { 'order_items_id': order_items_id, 'qty_weight': qty_weight, 'remarks': remarks }
$.ajax({
type: 'POST',
url: '/oqs/' + order_items_id,
data: params,
success: function(result){
alert("Updated!");
window.location.href = '/oqs';
}
});
});
});

View File

@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

View File

@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

View File

@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

View File

@@ -19,3 +19,9 @@
color: #fff !important;
background-color: blue;
}
.order-item {
width: 49%;
font-size: 18px;
margin: 0px 0px 5px 0px;
}

View File

@@ -148,6 +148,10 @@
background-color:#7a62d3;
}
.orange{
background-color:#FF7F50;
}
.red {
background-color:#ff0000;
}
@@ -160,6 +164,10 @@
background-color: #FF8C00
}
.blue{
background-color: blue
}
.left{
margin-left:1px;
}

View File

@@ -0,0 +1,3 @@
// Place all the styles related to the reports/daily_sales controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@@ -0,0 +1,3 @@
// Place all the styles related to the reports/dailysales controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@@ -0,0 +1,3 @@
// Place all the styles related to the reports/sale_items controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@@ -3,16 +3,17 @@ class ApplicationController < ActionController::Base
#before_action :check_installation
protect_from_forgery with: :exception
helper_method :current_company,:current_login_employee
helper_method :current_company,:current_login_employee,:current_user
# alias_method :current_user, :current_login_employee,:current_user
#this is base api base controller to need to inherit.
#all token authentication must be done here
#response format must be set to JSON
# rescue_from CanCan::AccessDenied do |exception|
# flash[:warning] = exception.message
# redirect_to root_path
# end
rescue_from CanCan::AccessDenied do |exception|
flash[:warning] = exception.message
redirect_to root_path
end
def current_user

View File

@@ -1,9 +1,17 @@
class BaseCrmController < ActionController::Base
include LoginVerification
layout "CRM"
include LoginVerification
layout "CRM"
#before_action :check_installation
protect_from_forgery with: :exception
rescue_from CanCan::AccessDenied do |exception|
flash[:warning] = exception.message
redirect_to root_path
end
def current_user
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
end
end

View File

@@ -5,5 +5,13 @@ class BaseOqsController < ActionController::Base
#before_action :check_installation
protect_from_forgery with: :exception
rescue_from CanCan::AccessDenied do |exception|
flash[:warning] = exception.message
redirect_to root_path
end
def current_user
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
end
end

View File

@@ -5,5 +5,14 @@ class BaseOrigamiController < ActionController::Base
#before_action :check_installation
protect_from_forgery with: :exception
rescue_from CanCan::AccessDenied do |exception|
flash[:warning] = exception.message
redirect_to root_path
end
def current_user
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
end
end

View File

@@ -5,6 +5,15 @@ class BaseReportController < ActionController::Base
#before_action :check_installation
protect_from_forgery with: :exception
rescue_from CanCan::AccessDenied do |exception|
flash[:warning] = exception.message
redirect_to root_path
end
def current_user
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
end
PERIOD = {
"today" => 0,
"yesterday" => 1,

View File

@@ -1,5 +1,5 @@
class Crm::BookingsController < BaseCrmController
load_and_authorize_resource
def update_booking
booking = Booking.find(params[:booking_id])

View File

@@ -1,4 +1,5 @@
class Crm::CustomersController < BaseCrmController
load_and_authorize_resource except: [:create]
before_action :set_crm_customer, only: [:show, :edit, :update, :destroy]
# GET /crm/customers
@@ -47,7 +48,8 @@ class Crm::CustomersController < BaseCrmController
#get customer amount
@customer = Customer.find(params[:id])
@response = Customer.get_membership_transactions(@customer)
@response = Customer.get_membership_transactions(@customer)
# @response = ""
#end customer amount
end
@@ -68,7 +70,7 @@ class Crm::CustomersController < BaseCrmController
def create
@crm_customers = Customer.new(customer_params)
respond_to do |format|
if @crm_customers.save
name = customer_params[:name]
@@ -77,6 +79,7 @@ class Crm::CustomersController < BaseCrmController
dob = customer_params[:date_of_birth]
address = customer_params[:address]
nrc = customer_params[:nrc_no]
card_no = customer_params[:card_no]
member_group_id = params[:member_group_id]
if !member_group_id.nil?
@@ -87,16 +90,17 @@ class Crm::CustomersController < BaseCrmController
url = membership.gateway_url.to_s + memberaction.gateway_url.to_s
begin
response = HTTParty.post(url, :body => { name: name,phone: phone,email: email,
dob: dob,address: address,nrc:nrc,
member_group_id: member_group_id,
merchant_uid:merchant_uid,auth_token:auth_token}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
response = HTTParty.post(url,
:body => {name: name,phone: phone,email: email,
dob: dob,address: address,nrc:nrc,card_no:card_no,
member_group_id: member_group_id,
merchant_uid:merchant_uid,auth_token:auth_token}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
},
:timeout => 10
)
:timeout => 10
)
rescue Net::OpenTimeout
response = { status: false }
end
@@ -149,10 +153,12 @@ end
dob = customer_params[:date_of_birth]
address = customer_params[:address]
nrc = customer_params[:nrc_no]
card_no = customer_params[:card_no]
id = @crm_customer.membership_id
member_group_id = params[:member_group_id]
if id.nil? && !member_group_id.nil?
membership = MembershipSetting.find_by_membership_type("paypar_url")
memberaction = MembershipAction.find_by_membership_type("create_membership_customer")
merchant_uid = memberaction.merchant_account_id.to_s
@@ -160,16 +166,17 @@ end
url = membership.gateway_url.to_s + memberaction.gateway_url.to_s
begin
response = HTTParty.post(url, :body => { name: name,phone: phone,email: email,
dob: dob,address: address,nrc:nrc,
member_group_id: member_group_id,
merchant_uid:merchant_uid,auth_token:auth_token}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
response = HTTParty.post(url,
:body => { name: name,phone: phone,email: email,
dob: dob,address: address,nrc:nrc,
card_no:card_no,member_group_id: member_group_id,
merchant_uid:merchant_uid,auth_token:auth_token}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
},
:timeout => 10
)
:timeout => 10
)
rescue Net::OpenTimeout
response = { status: false }
end
@@ -185,20 +192,22 @@ end
end
else
membership = MembershipSetting.find_by_membership_type("paypar_url")
memberaction = MembershipAction.find_by_membership_type("update_membership_customer")
merchant_uid = memberaction.merchant_account_id.to_s
auth_token = memberaction.auth_token.to_s
url = membership.gateway_url.to_s + memberaction.gateway_url.to_s
begin
response = HTTParty.post(url, :body => { name: name,phone: phone,email: email,
dob: dob,address: address,nrc:nrc,
id: id,member_group_id:member_group_id,merchant_uid:merchant_uid,auth_token:auth_token}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
response = HTTParty.post(url,
:body => {name: name,phone: phone,email: email,
dob: dob,address: address,nrc:nrc,card_no:card_no,
id: id,member_group_id:member_group_id,merchant_uid:merchant_uid,auth_token:auth_token}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
},
:timeout => 10
:timeout => 10
)
rescue Net::OpenTimeout
response = { status: false }

View File

@@ -1,4 +1,5 @@
class Crm::DiningQueuesController < BaseCrmController
load_and_authorize_resource
before_action :set_dining_queue, only: [:show, :edit, :update, :destroy]
# GET /crm/dining_queues

View File

@@ -18,6 +18,12 @@ class HomeController < ApplicationController
elsif @employee.role == "cashier"
session[:session_token] = @employee.token_session
redirect_to origami_root_path
elsif @employee.role == "manager"
session[:session_token] = @employee.token_session
redirect_to dashboard_path
elsif @employee.role == "accountant"
session[:session_token] = @employee.token_session
redirect_to dashboard_path
else
render :index
end

View File

@@ -0,0 +1,18 @@
class Oqs::EditController < BaseOqsController
def index
assigned_item_id = params[:id]
assigned_item = AssignedOrderItem.find(assigned_item_id)
@order_item = OrderItem.where("order_id='#{ assigned_item.order_id }' AND item_code='#{ assigned_item.item_code }'");
end
def update
order_items_id = params[:order_items_id]
qty_weight = params[:qty_weight]
remarks = params[:remarks]
order_item = OrderItem.find(order_items_id);
order_item.qty = qty_weight
order_item.remark = remarks
order_item.save
end
end

View File

@@ -109,7 +109,7 @@ class Oqs::HomeController < BaseOqsController
# queue_items.push(queue_item)
# end
# return queue_items
AssignedOrderItem.select("assigned_order_items.assigned_order_item_id, oqs.station_name, oqs.is_active, df.name as zone, odt.item_code, odt.item_name, odt.price, odt.qty, odt.item_order_by, odt.options, cus.name as customer_name, odt.created_at")
AssignedOrderItem.select("assigned_order_items.assigned_order_item_id, oqs.station_name, oqs.is_active, df.name as zone, df.type, odt.order_id, odt.item_code, odt.item_name, odt.price, odt.qty, odt.item_order_by, odt.options, cus.name as customer_name, odt.created_at")
.joins(" left join order_queue_stations as oqs on oqs.id = assigned_order_items.order_queue_station_id
left join orders as od ON od.order_id = assigned_order_items.order_id
left join order_items as odt ON odt.item_code = assigned_order_items.item_code AND odt.order_id = assigned_order_items.order_id
@@ -118,6 +118,6 @@ class Oqs::HomeController < BaseOqsController
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}")
.group("odt.order_items_id")
.group("assigned_order_items.assigned_order_item_id")
end
end

View File

@@ -2,9 +2,31 @@ class Origami::CreditPaymentsController < BaseOrigamiController
def index
@sale_id = params[:sale_id]
# limit visa_amount
sale_data = Sale.find_by_sale_id(@sale_id)
total = sale_data.grand_total
@creditcount = 0
others = 0
sale_data.sale_payments.each do |sale_payment|
if sale_payment.payment_method == "visa"
@creditcount = @creditcount + sale_payment.payment_amount
else
others = others + sale_payment.payment_amount
end
end
@can_credit = total - @creditcount - others
end
def create
cash = params[:amount]
sale_id = params[:sale_id]
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
sale_payment = SalePayment.new
@status, @sale = sale_payment.process_payment(saleObj, @user, cash, "creditnote")
end
end
end

View File

@@ -1,8 +1,6 @@
class Origami::CustomersController < BaseOrigamiController
#Form to add customer -
load_and_authorize_resource
def index
end
# GET /crm/customers/1
@@ -54,6 +52,10 @@ class Origami::CustomersController < BaseOrigamiController
if(id == "SAL")
sale = Sale.find(params[:sale_id])
status = sale.update_attributes(customer_id: params[:customer_id])
sale.sale_orders.each do |sale_order|
order = Order.find(sale_order.order_id)
status = order.update_attributes(customer_id: params[:customer_id])
end
else
@booking = BookingOrder.find_by_order_id(params[:sale_id])
@orders = BookingOrder.where("booking_id = ? ", @booking.booking_id)

View File

@@ -1,4 +1,5 @@
class Origami::DiscountsController < BaseOrigamiController
authorize_resource :class => false
#discount page show from origami index with selected order
def index

View File

@@ -35,7 +35,7 @@ class Origami::HomeController < BaseOrigamiController
@status_order = 'order'
else
sale = Sale.find(booking.sale_id)
if sale.sale_status != "completed"
if sale.sale_status != "completed" && sale.sale_status != 'void'
puts "enter"
@sale_array.push(sale)
if @status_order == 'order'

View File

@@ -1,5 +1,7 @@
class Origami::MoveroomController < BaseOrigamiController
authorize_resource :class => false
def move_dining
@tables = Table.all.active.order('status desc')
@rooms = Room.all.active.order('status desc')

View File

@@ -1,4 +1,6 @@
class Origami::MovetableController < BaseOrigamiController
authorize_resource :class => false
def move_dining
@tables = Table.all.active.order('status desc')

View File

@@ -1,6 +1,6 @@
class Origami::PaymentsController < BaseOrigamiController
authorize_resource :class => false
def index
end
@@ -17,6 +17,8 @@ class Origami::PaymentsController < BaseOrigamiController
unique_code = "ReceiptBillPdf"
customer= Customer.find(saleObj.customer_id)
rebate_amount = Customer.get_membership_transactions(customer)
#shop detail
shop_details = Shop.find(1)
# get member information
member_info = Customer.get_member_account(customer)
@@ -26,7 +28,7 @@ class Origami::PaymentsController < BaseOrigamiController
item_price_by_accounts = SaleItem.calculate_price_by_accounts(saleObj.sale_items)
printer = Printer::ReceiptPrinter.new(print_settings)
printer.print_receipt_bill(print_settings,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, member_info,rebate_amount)
printer.print_receipt_bill(print_settings,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, member_info,rebate_amount,shop_details)
end
end
@@ -39,6 +41,7 @@ class Origami::PaymentsController < BaseOrigamiController
@visacount= 0.0
@jcbcount= 0.0
@mastercount = 0.0
@credit = 0.0
@sale_data = Sale.find_by_sale_id(sale_id)
#get customer amount
@@ -51,8 +54,8 @@ class Origami::PaymentsController < BaseOrigamiController
@accountable_type = ''
if response["status"]==true
response["data"].each do |res|
if res["accountable_type"] == "RebateAccount"
@balance = res["balance"]
if res["accountable_type"] == "RebateAccount" || res["accountable_type"] == "RebatebonusAccount"
@balance += res["balance"]
# @accountable_type = res["accountable_type"]
@accountable_type = "Rebate Balance"
end
@@ -75,6 +78,8 @@ class Origami::PaymentsController < BaseOrigamiController
@jcbcount += spay.payment_amount
elsif spay.payment_method == "master"
@mastercount += spay.payment_amount
elsif spay.payment_method == "creditnote"
@credit += spay.payment_amount
end
end
end
@@ -89,6 +94,8 @@ class Origami::PaymentsController < BaseOrigamiController
unique_code = "ReceiptBillPdf"
customer= Customer.find(saleObj.customer_id)
#shop detail
shop_details = Shop.find(1)
# get member information
member_info = Customer.get_member_account(customer)
rebate_amount = Customer.get_membership_transactions(customer)
@@ -99,7 +106,7 @@ class Origami::PaymentsController < BaseOrigamiController
item_price_by_accounts = SaleItem.calculate_price_by_accounts(saleObj.sale_items)
printer = Printer::ReceiptPrinter.new(print_settings)
printer.print_receipt_bill(print_settings,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, member_info,rebate_amount)
printer.print_receipt_bill(print_settings,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, member_info,rebate_amount,shop_details)
end

View File

@@ -1,4 +1,5 @@
class Origami::RequestBillsController < BaseOrigamiController
# Print Request Bill and add to sale tables
def print
@sale = Sale.new
@@ -20,8 +21,9 @@ class Origami::RequestBillsController < BaseOrigamiController
end
unique_code = "ReceiptBillPdf"
#shop detail
shop_details = Shop.find(1)
# customer= Customer.where('customer_id=' +.customer_id)
customer= Customer.find(@sale_data.customer_id)
# get member information
member_info = Customer.get_member_account(customer)
@@ -36,7 +38,7 @@ class Origami::RequestBillsController < BaseOrigamiController
printer = Printer::ReceiptPrinter.new(print_settings)
printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, item_price_by_accounts,member_info)
printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, item_price_by_accounts,member_info,shop_details)
# redirect_to origami_path(@sale_data.sale_id)
end

View File

@@ -0,0 +1,40 @@
class Origami::RoomInvoicesController < BaseOrigamiController
def index
@room = DiningFacility.find(params[:room_id])
puts "room bookig lenght"
@sale_array = Array.new
@room.bookings.each do |booking|
puts booking.sale_id
if booking.sale_id.nil?
else
sale = Sale.find(booking.sale_id)
if sale.sale_status != "completed"
@sale_array.push(sale)
end
end
end
end
def show
@room = DiningFacility.find(params[:room_id])
@sale_array = Array.new
@room.bookings.each do |booking|
if booking.sale_id.nil?
else
sale = Sale.find(booking.sale_id)
if sale.sale_status != "completed"
@sale_array.push(sale)
end
end
end
@sale = Sale.find(params[:invoice_id])
@date = @sale.created_at
@status_sale = 'sale'
@customer = @sale.customer
end
end

View File

@@ -1,11 +1,13 @@
class Origami::SaleEditController < BaseOrigamiController
# Index for sale item void OR edit
def edit
sale_id = params[:sale_id]
@table_id = params[:table_id]
@saleobj = Sale.find(sale_id)
end
# create item void. make duplicate old record and update qty and price
def item_void
saleitemId = params[:sale_item_id]
saleitemObj = SaleItem.find(saleitemId)
@@ -19,4 +21,38 @@ class Origami::SaleEditController < BaseOrigamiController
@newsaleitem.product_name = saleitemObj.product_name + " - void"
@newsaleitem.save
end
# make cancel void item
def item_void_cancel
saleitemId = params[:sale_item_id]
saleitemObj = SaleItem.find(saleitemId)
both = SaleItem.where('product_code=?',saleitemObj.product_code)
both.each do |item|
if item.qty.to_i > 0
item.remark = nil
item.save
end
end
saleitemObj.destroy
end
# remove all void items
def cancel_all_void
sale_id = params[:sale_id]
saleobj = Sale.find(sale_id)
saleobj.sale_items.each do |item|
if item.qty.to_i < 0
item.destroy
else
item.remark = nil
end
item.save
end
end
def apply_void
sale_id = params[:sale_id]
saleObj = Sale.find(sale_id)
saleObj.compute_without_void
end
end

View File

@@ -0,0 +1,40 @@
class Origami::TableInvoicesController < BaseOrigamiController
def index
@table = DiningFacility.find(params[:table_id])
puts "table bookig lenght"
@sale_array = Array.new
@table.bookings.each do |booking|
puts booking.sale_id
if booking.sale_id.nil?
else
sale = Sale.find(booking.sale_id)
if sale.sale_status != "completed"
@sale_array.push(sale)
end
end
end
end
def show
@table = DiningFacility.find(params[:table_id])
@sale_array = Array.new
@table.bookings.each do |booking|
if booking.sale_id.nil?
else
sale = Sale.find(booking.sale_id)
if sale.sale_status != "completed"
@sale_array.push(sale)
end
end
end
@sale = Sale.find(params[:invoice_id])
@date = @sale.created_at
@status_sale = 'sale'
@customer = @sale.customer
end
end

View File

@@ -0,0 +1,28 @@
class Origami::VoidController < BaseOrigamiController
def overall_void
sale_id = params[:sale_id]
if Sale.exists?(sale_id)
sale = Sale.find_by_sale_id(sale_id)
sale.payment_status = 'void'
sale.sale_status = 'void'
sale.save
table_avaliable = true
table = sale.bookings[0].dining_facility
table.bookings.each do |booking|
if booking.sale.sale_status == 'new'
table_avaliable = false
end
end
if table_avaliable == true
table.status = 'available'
table.save
end
end
end
end

View File

@@ -1,4 +1,5 @@
class PrintSettingsController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_print_setting, only: [:show, :edit, :update, :destroy]
# GET /print_settings

View File

@@ -1,5 +1,5 @@
class Reports::SaleItemController < BaseReportController
class Reports::SaleItemsController < BaseReportController
authorize_resource :class => false
def index
from, to, report_type = get_date_range_from_params

View File

@@ -0,0 +1,17 @@
class Reports::DailySalesController < BaseReportController
# authorize_resource :class => false
def index
from, to ,report_type = get_date_range_from_params
@sale_data = Sale.daily_sales_list(from,to)
@tax = SaleTax.get_tax(from,to)
respond_to do |format|
format.html
format.xls
end
end
def show
end
end

View File

@@ -1,5 +1,5 @@
class Reports::DailySaleController < BaseReportController
class Reports::DailySalesController < BaseReportController
authorize_resource :class => false
def index
from, to ,report_type = get_date_range_from_params
@sale_data = Sale.daily_sales_list(from,to)

View File

@@ -0,0 +1,19 @@
class Reports::SaleItemsController < BaseReportController
# authorize_resource :class => false
def index
from, to, report_type = get_date_range_from_params
@sale_data = Sale.get_by_range_by_saleitems(from,to,Sale::SALE_STATUS_COMPLETED,report_type)
respond_to do |format|
format.html
format.xls
end
end
def show
end
end

View File

@@ -1,4 +1,5 @@
class Settings::AccountsController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_account, only: [:show, :edit, :update, :destroy]
# GET /settings/accounts

View File

@@ -1,4 +1,5 @@
class Settings::CashierTerminalsController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_settings_cashier_terminal, only: [:show, :edit, :update, :destroy]
# GET /settings/cashier_terminals

View File

@@ -1,5 +1,5 @@
class Settings::EmployeesController < ApplicationController
# load_and_authorize_resource
load_and_authorize_resource
before_action :set_employee, only: [:show, :edit, :update, :destroy]

View File

@@ -1,4 +1,5 @@
class Settings::MembershipActionsController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_settings_membership_action, only: [:show, :edit, :update, :destroy]
# GET /settings/membership_actions

View File

@@ -1,4 +1,5 @@
class Settings::MembershipSettingsController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_settings_membership_setting, only: [:show, :edit, :update, :destroy]
# GET /settings/membership_settings

View File

@@ -1,4 +1,5 @@
class Settings::MenuCategoriesController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_settings_menu_category, only: [:show, :edit, :update, :destroy]
before_action :set_settings_menu, only: [:new]

View File

@@ -1,4 +1,5 @@
class Settings::MenuItemAttributesController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_settings_menu_item_attribute, only: [:show, :edit, :update, :destroy]
# GET /settings/menu_item_attributes

View File

@@ -1,4 +1,5 @@
class Settings::MenuItemInstancesController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_settings_menu_item_instance, only: [:show, :edit, :update, :destroy]
before_action :set_settings_menu_item, only: [ :show, :edit, :new, :update]

View File

@@ -1,4 +1,5 @@
class Settings::MenuItemOptionsController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_settings_menu_item_option, only: [:show, :edit, :update, :destroy]
# GET /settings/menu_item_options

View File

@@ -1,4 +1,5 @@
class Settings::MenusController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_settings_menu, only: [:show, :edit, :update, :destroy]
# GET /settings/menus

View File

@@ -1,4 +1,5 @@
class Settings::OrderQueueStationsController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_settings_order_queue_station, only: [:show, :edit, :update, :destroy]
# GET /settings/order_queue_stations

View File

@@ -1,4 +1,5 @@
class Settings::PaymentMethodSettingsController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_settings_payment_method_setting, only: [:show, :edit, :update, :destroy]
# GET /settings/payment_method_settings

View File

@@ -1,4 +1,5 @@
class Settings::TaxProfilesController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_settings_tax_profile, only: [:show, :edit, :update, :destroy]
# GET /settings/tax_profiles

View File

@@ -1,4 +1,5 @@
class Settings::ZonesController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_settings_zone, only: [:show, :edit, :update, :destroy]
# GET /settings/zones

View File

@@ -0,0 +1,18 @@
class Transactions::CreditNotesController < ApplicationController
before_action :set_transactions_sale, only: [:show, :edit, :update, :destroy]
# GET /transactions/sales
# GET /transactions/sales.json
def index
@sales = Sale.where('payment_status = ?', Sale::SALE_STATUS_OUTSTANDING)
respond_to do |format|
format.html # index.html.erb
format.json { render json: @sales }
end
end
end

View File

@@ -1,4 +1,5 @@
class Transactions::OrdersController < ApplicationController
load_and_authorize_resource except: [:create]
def index
filter = params[:filter]

View File

@@ -1,4 +1,5 @@
class Transactions::SalesController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_transactions_sale, only: [:show, :edit, :update, :destroy]
# GET /transactions/sales

View File

@@ -0,0 +1,2 @@
module Reports::DailySalesHelper
end

View File

@@ -0,0 +1,2 @@
module Reports::DailysalesHelper
end

View File

@@ -0,0 +1,2 @@
module Reports::SaleItemsHelper
end

View File

@@ -4,30 +4,84 @@ class Ability
def initialize(user)
user ||= Employee.new
if user.role? :administrator
if user.role == "administrator"
can :manage, :all
elsif user.role? :cashier
can :read, Order
can :update, Order
can :completed_order_item, Order
elsif user.role == "manager"
can :manage, Menu
can :manage, MenuCategory
can :manage, MenuItemAttribute
can :manage, MenuItemInstance
can :manage, MenuItemOption
can :manage, SetMenuItem
can :manage, OrderQueueStation
can :manage, Zone
can :manage, CashierTerminal
can :manage, Employee
# can :manage, MembershipSetting
# can :manage, MembershipAction
# can :manage, PaymentMethodSetting
can :manage, TaxProfile
can :manage, PrintSetting
can :manage, Account
can :manage, Order
can :manage, Sale
can :manage, Customer
can :index, :dailysale
can :index, :saleitem
can :add_customer, Customer
can :update_sale_by_customer, Customer
can :index, :discount
can :create, :discount
can :show, :payment
can :create, :payment
can :reprint, :payment
can :move_dining, :movetable
can :moving, :movetable
can :move_dining, :moveroom
elsif user.role == "cashier"
can :read, Order
can :update, Order
can :read, Sale
can :update, Sale
can :read, Sale
can :update, Sale
can :add_customer, Customer
can :update_sale_by_customer, Customer
can :index, :discount
can :create, :discount
can :show, :payment
can :create, :payment
can :reprint, :payment
can :move_dining, :movetable
can :moving, :movetable
can :move_dining, :moveroom
elsif user.role? :accountant
elsif user.role == "accountant"
can :read, Order
can :update, Order
can :completed_order_item, Order
can :read, Sale
can :update, Sale
can :manual_complete_sale, Sale
can :index, :dailysale
can :index, :saleitem
can :index, :receiptno
can :show, :dailysale
can :show, :saleitem
can :show, :receiptno
end
end
end
end

View File

@@ -27,7 +27,7 @@ class Order < ApplicationRecord
if self.new_booking
booking = Booking.create({:dining_facility_id => self.table_id,:type => "TableBooking",
:checkin_at => Time.now.utc, :checkin_by => self.employee_name,
:checkin_at => Time.now.utc.getlocal, :checkin_by => self.employee_name,
:booking_status => "assign" })
table = DiningFacility.find(self.table_id)
table.status = "occupied"

View File

@@ -22,7 +22,8 @@ class OrderQueueStation < ApplicationRecord
#Assign OQS id to order Items
oqs_stations.each do |oqs|
is_auto_printed = false
is_auto_printed = false
oqs_order_items = []
#Get List of items -
pq_items = JSON.parse(oqs.processing_items)
@@ -37,15 +38,18 @@ class OrderQueueStation < ApplicationRecord
# else
AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
# end
# Auto Printing
if oqs.auto_print && is_auto_printed == false
print_slip(oqs, order, order_items)
is_auto_printed = true
end
oqs_order_items.push(order_item)
# end
end
end
end
# Auto Printing
# ToDo per item per printer
if oqs.auto_print && is_auto_printed == false
if oqs_order_items.length > 0
print_slip(oqs, order, oqs_order_items)
is_auto_printed = true
end
end
end
end
@@ -57,7 +61,7 @@ class OrderQueueStation < ApplicationRecord
print_settings=PrintSetting.find_by_unique_code(unique_code)
order_queue_printer= Printer::OrderQueuePrinter.new(print_settings)
order_queue_printer.print_order_summary(oqs,order.order_id, print_status="")
order_queue_printer.print_order_summary(oqs,order.order_id, order_items, print_status="")
AssignedOrderItem.where("order_id = '#{ order.order_id }'").find_each do |ai|
# update print status for order items

View File

@@ -22,14 +22,14 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
end
# Query for per order
def print_order_summary(oqs, order_id, print_status)
def print_order_summary(oqs, order_id, order_items, print_status)
#Use CUPS service
#Generate PDF
#Print
#Print
order=print_query('order_summary', order_id)
# For Print Per Item
if oqs.cut_per_item
order.each do|odi|
order_items.each do|odi|
filename = "tmp/order_item_#{odi.item_name}" + ".pdf"
# For Item Options
options = odi.options == "[]"? "" : odi.options
@@ -46,7 +46,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
# For Print Order Summary
else
filename = "tmp/order_summary_#{ order_id }" + ".pdf"
pdf = OrderSummaryPdf.new(order, print_status)
pdf = OrderSummaryPdf.new(order, print_status, order_items)
pdf.render_file filename
if oqs.print_copy
self.print(filename, oqs.printer_name)
@@ -103,7 +103,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
# Query for OQS with status
def print_query(type, id)
if type == "order_item"
OrderItem.select("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.name as dining")
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")
.joins("left join orders ON orders.order_id = order_items.order_id
left join booking_orders AS bo ON bo.order_id=order_items.order_id
left join bookings AS b ON b.booking_id = bo.booking_id
@@ -112,7 +112,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
.where("order_items.item_code = '#{ id }'")
.group("order_items.item_code")
elsif type == "order_summary"
OrderItem.select("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.name as dining")
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")
.joins("left join orders ON orders.order_id = order_items.order_id
left join booking_orders AS bo ON bo.order_id=order_items.order_id
left join bookings AS b ON b.booking_id = bo.booking_id
@@ -122,7 +122,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
.group("order_items.order_items_id")
else
# order summary for booking
OrderItem.select("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.name as dining")
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")
.joins("left join orders ON orders.order_id = order_items.order_id
left join booking_orders AS bo ON bo.order_id=order_items.order_id
left join bookings AS b ON b.booking_id = bo.booking_id

View File

@@ -65,11 +65,11 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
end
#Bill Receipt Print
def print_receipt_bill(printer_settings,sale_items,sale_data, customer_name, item_price_by_accounts, member_info = nil,rebate_amount=nil)
def print_receipt_bill(printer_settings,sale_items,sale_data, customer_name, item_price_by_accounts, member_info = nil,rebate_amount=nil,shop_details)
#Use CUPS service
#Generate PDF
#Print
pdf = ReceiptBillPdf.new(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, member_info,rebate_amount)
pdf = ReceiptBillPdf.new(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, member_info,rebate_amount,shop_details)
pdf.render_file "tmp/receipt_bill.pdf"
self.print("tmp/receipt_bill.pdf")

View File

@@ -21,9 +21,9 @@ class Sale < ApplicationRecord
"daily" => 0,
"monthly" => 1,
"yearly" => 2
}
SALE_STATUS_COMPLETED = "completed"
}
SALE_STATUS_OUTSTANDING = "outstanding"
SALE_STATUS_COMPLETED = "completed"
def generate_invoice_from_booking(booking_id, requested_by)
booking = Booking.find(booking_id)
@@ -98,7 +98,7 @@ class Sale < ApplicationRecord
order.save
booking.sale_id = self.id
booking.checkout_at = Time.now.utc
booking.checkout_at = Time.now.utc.getlocal
booking.checkout_by = requested_by.name
booking.save
@@ -115,7 +115,7 @@ class Sale < ApplicationRecord
def generate_invoice_by_items (items, requested_by)
taxable = true
self.requested_by = requested_by
self.requested_at = DateTime.now.utc
self.requested_at = DateTime.now.utc.getlocal
items.each do |item|
add_item(item)
@@ -185,7 +185,7 @@ 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
total_taxable = total_taxable + (item.taxable_price * item.qty)
end
apply_tax (total_taxable)
@@ -199,6 +199,31 @@ class Sale < ApplicationRecord
end
def compute_without_void
sales_items = self.sale_items
#Computation Fields
subtotal_price = 0
total_taxable = 0
rounding_adjustment = 0
sales_items.each do |item|
if item.remark != 'void'
#compute each item and added to total
subtotal_price = subtotal_price + item.price
total_taxable = total_taxable + item.taxable_price
end
end
apply_tax (total_taxable)
self.total_amount = subtotal_price
self.total_discount = total_discount
self.grand_total = (self.total_amount - self.total_discount) + self.total_tax
#compute rounding adjustment
adjust_rounding
self.save!
end
# Tax Calculate
def apply_tax(total_taxable)
#if tax is not apply create new record
@@ -354,28 +379,28 @@ def self.get_by_range_by_saleitems(from,to,status,report_type)
mc.name as menu_category_name,
mc.id as menu_category_id ")
.group('mi.id')
.order("mi.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_categories mc ON mc.id = mi.menu_category_id
.order("mi.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_categories mc ON mc.id = mi.menu_category_id
JOIN employees ea ON ea.id = sales.cashier_id")
query = query.where("receipt_date between ? and ? and sale_status=?",from,to,status)
case report_type.to_i
when REPORT_TYPE["daily"]
return query
when REPORT_TYPE["monthly"]
return query.group("MONTH(date)")
return query.group("MONTH(date)")
when REPORT_TYPE["yearly"]
return query.group("YEAR(date)")
return query.group("YEAR(date)")
end
end
private

View File

@@ -9,7 +9,6 @@ class SalePayment < ApplicationRecord
attr_accessor :received_amount, :card_payment_reference, :voucher_no, :giftcard_no, :customer_id, :external_payment_status
def process_payment(invoice, action_by, cash_amount, payment_method)
self.sale = invoice
self.received_amount = cash_amount
amount_due = invoice.grand_total
@@ -28,7 +27,7 @@ class SalePayment < ApplicationRecord
when "cash"
payment_status = cash_payment
when "creditnote"
if !self.customer_id.nil?
if !self.sale.customer_id.nil?
payment_status = creditnote_payment(self.customer_id)
end
when "visa"
@@ -54,7 +53,7 @@ class SalePayment < ApplicationRecord
#record an payment in sale-audit
remark = "Payment #{payment_method}- for Invoice #{invoice.receipt_no} Due [#{amount_due}]| pay amount -> #{cash_amount} | Payment Status ->#{payment_status}"
sale_audit = SaleAudit.record_payment(invoice.id, remark, action_by)
return true, self.save
else
#record an payment in sale-audit
@@ -94,10 +93,15 @@ class SalePayment < ApplicationRecord
sale_data = Sale.find_by_sale_id(sale_id)
if sale_data
others = 0
sale_data.sale_payments.each do |sale_payment|
others = others + sale_payment.payment_amount
end
redeem_prices = sale_data.grand_total -others
# Control for Paypar Cloud
begin
response = HTTParty.post(url,
:body => { generic_customer_id:membership_id,redeem_amount:received_amount,receipt_no:sale_data.receipt_no,campaign_type_id:campaign_type_id,account_no:"",merchant_uid:merchant_uid,auth_token:auth_token}.to_json,
:body => { generic_customer_id:membership_id,total_amount: redeem_prices,total_sale_transaction_amount: sale_data.grand_total,redeem_amount:received_amount,receipt_no:sale_data.receipt_no,campaign_type_id:campaign_type_id,account_no:"",merchant_uid:merchant_uid,auth_token:auth_token}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
@@ -137,7 +141,7 @@ class SalePayment < ApplicationRecord
self.payment_method = "creditnote"
self.payment_amount = self.received_amount
self.customer_id = self.customer_id
self.outstanding_amount = 0 - self.received_amount
self.outstanding_amount = 0 - self.received_amount.to_f
self.payment_status = "outstanding"
payment_method = self.save!
@@ -202,10 +206,7 @@ class SalePayment < ApplicationRecord
customer_data = Customer.find_by_customer_id(self.sale.customer_id)
membership_setting = MembershipSetting.find_by_membership_type("paypar_url")
membership_data = SalePayment.redeem(membership_setting.gateway_url,membership_setting.auth_token,customer_data.membership_id,self.received_amount,self.sale.sale_id)
puts 'mmmmmmmmmmmmmmmmmmmmmmmmmmm'
puts membership_data.to_json
puts "amountttttttttttttttttttttt"
puts self.received_amount
if membership_data["status"]==true
self.payment_method = "paypar"
self.payment_amount = self.received_amount
@@ -266,8 +267,7 @@ class SalePayment < ApplicationRecord
def rebat(sObj)
rebate_prices = SaleItem.calculate_rebate_by_account(sObj.sale_items)
puts "eeeeeeeeeeeeeeeeeeeeeeee"
puts rebate_prices
generic_customer_id = sObj.customer.membership_id
if generic_customer_id != nil || generic_customer_id != "" || generic_customer_id != 0
paypar = sObj.sale_payments
@@ -292,7 +292,7 @@ class SalePayment < ApplicationRecord
# Control for Paypar Cloud
begin
response = HTTParty.post(url, :body => { generic_customer_id:generic_customer_id ,merchant_uid:merchant_uid,total_amount: total_amount,campaign_type_id: campaign_type_id,
response = HTTParty.post(url, :body => { generic_customer_id:generic_customer_id ,total_sale_transaction_amount: sObj.grand_total,merchant_uid:merchant_uid,total_amount: total_amount,campaign_type_id: campaign_type_id,
receipt_no: receipt_no,auth_token:auth_token}.to_json,
:headers => {
'Content-Type' => 'application/json',

View File

@@ -18,24 +18,29 @@ class OrderItemPdf < Prawn::Document
# font "public/fonts/#{font_name}".to_s + ".ttf".to_s
# font "public/fonts/Zawgyi-One.ttf"
# font "public/fonts/padauk.ttf"
self.header_font_size = 14
self.item_font_size = 12
self.header_font_size = 12
self.item_font_size = 10
text "#{ order_item.dining+print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
stroke_horizontal_rule
move_down 5
#order_info
order_info(order_item.order_by,order_item.order_at)
order_info(order_item.order_id, order_item.order_by,order_item.order_at)
# order items
order_items(order_item, options)
end
# Write Order Information to PDF
def order_info(order_by, order_at)
def order_info(order_no, order_by, order_at)
y_position = cursor
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
text "OrderNo: #{order_no} ", :size => self.item_font_size,:align => :left
end
move_down 5
y_position = cursor
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
text "OrderBy: #{order_by} ", :size => self.item_font_size,:align => :left
end
@@ -43,7 +48,7 @@ class OrderItemPdf < Prawn::Document
move_down 5
y_position = cursor
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left
text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left
end
stroke_horizontal_rule

View File

@@ -1,6 +1,6 @@
class OrderSummaryPdf < Prawn::Document
attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width
def initialize(order, print_status)
def initialize(order, print_status, order_items = nil)
self.page_width = 210
self.page_height = 1450
self.margin = 5
@@ -20,22 +20,30 @@ class OrderSummaryPdf < Prawn::Document
self.header_font_size = 12
self.item_font_size = 10
text "#{ order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
stroke_horizontal_rule
move_down 5
#order_info
order_info(order[0].order_by,order[0].order_at)
order_info(order[0].order_id, order[0].order_by,order[0].order_at)
# order items
order_items(order)
if order_items == nil
order_items(order)
else
order_items(order_items)
end
end
# Write Order Information to PDF
def order_info(order_by, order_at)
def order_info(order_no, order_by, order_at)
y_position = cursor
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
text "OrderNo: #{order_no} ", :size => self.item_font_size,:align => :left
end
move_down 5
y_position = cursor
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
text "OrderBy: #{order_by} ", :size => self.item_font_size,:align => :left
end
@@ -43,7 +51,7 @@ class OrderSummaryPdf < Prawn::Document
move_down 5
y_position = cursor
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left
text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left
end
stroke_horizontal_rule
@@ -68,6 +76,7 @@ class OrderSummaryPdf < Prawn::Document
#Add Order Item
add_order_items(order_item)
end
# Add order items under order info
@@ -84,11 +93,11 @@ class OrderSummaryPdf < Prawn::Document
# text_box "#{odi.qty}", :at =>[self.item_width,y_position], :width => self.qty_width, :height =>self.item_height, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix
# }
bounding_box([0,y_position], :width => self.item_width) do
text "#{odi.item_name}", :size => self.item_font_size,:align => :left, :height => self.item_height
text "#{odi.item_name}", :size => self.item_font_size,:align => :left
end
bounding_box([self.item_width,y_position], :width => self.qty_width) do
text "#{odi.qty}", :size => self.item_font_size,:align => :left, :height => self.item_height
text "#{odi.qty}", :size => self.item_font_size,:align => :left
end
move_down 5
@@ -104,6 +113,10 @@ class OrderSummaryPdf < Prawn::Document
move_down 5
end
dash(1, :space => 1, :phase => 1)
stroke_horizontal_line 0, (self.page_width - self.margin)
move_down 5
end
end

View File

@@ -1,6 +1,6 @@
class ReceiptBillPdf < Prawn::Document
attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width
def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, member_info = nil,rebate_amount = nil)
def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details)
self.page_width = 210
self.page_height = 2500
self.margin = 5
@@ -24,13 +24,12 @@ class ReceiptBillPdf < Prawn::Document
self.header_font_size = 10
self.item_font_size = 8
header( "Beauty In the Pot", printer_settings.name)
header( shop_details)
stroke_horizontal_rule
cashier_info(sale_data, customer_name)
line_items(sale_items)
items_account(item_price_by_accounts)
all_total(sale_data)
@@ -39,16 +38,21 @@ class ReceiptBillPdf < Prawn::Document
end
customer(customer_name)
items_account(item_price_by_accounts)
footer
end
def header (printer_name, name)
text "#{printer_name}", :left_margin => -10, :size => self.header_font_size,:align => :center
def header (shop_details)
move_down 7
text "#{shop_details.name}", :left_margin => -10, :size => self.header_font_size,:align => :center
move_down 5
text "#{name}", :size => self.header_font_size,:align => :center
text "#{shop_details.address}", :size => self.item_font_size,:align => :center
# move_down self.item_height
move_down 5
text "#{shop_details.phone_no}", :size => self.item_font_size,:align => :center
move_down 5
stroke_horizontal_rule
end
@@ -61,19 +65,10 @@ class ReceiptBillPdf < Prawn::Document
text "Receipt No: #{sale_data.receipt_no}", :size => self.item_font_size,:align => :left
end
bounding_box([self.label_width,y_position], :width => self.label_width, :height => self.item_height) do
text "#{ sale_data.bookings[0].dining_facility.name }" , :size => self.item_font_size,:align => :right
text "#{ sale_data.bookings[0].dining_facility.type } - #{ sale_data.bookings[0].dining_facility.name }" , :size => self.item_font_size,:align => :right
end
move_down 5
# y_position = cursor
# bounding_box([0,y_position], :width =>self.label_width, :height => self.item_height) do
# text "Customer:", :size => self.item_font_size,:align => :left
# end
# bounding_box([self.label_width,y_position], :width =>self.item_width) do
# text "#{customer_name}" , :size => self.item_font_size,:align => :left
# end
# move_down 5
y_position = cursor
bounding_box([0, y_position], :width =>self.item_width) do
text "Waiter: #{sale_data.requested_by}" , :size => self.item_font_size, :align => :left
@@ -86,27 +81,26 @@ class ReceiptBillPdf < Prawn::Document
end
move_down 5
# bounding_box([self.label_width,y_position], :width =>self.item_width) do
# text "#{customer_name}" , :size => self.item_font_size,:align => :left
# end
# move_down 5
y_position = cursor
bounding_box([0,y_position], :width =>self.label_width, :height => self.item_height) do
text "Time In: #{ sale_data.bookings[0].checkin_at.strftime('%I:%M %p') }", :size => self.item_font_size,:align => :left
end
bounding_box([self.label_width,y_position], :width => self.label_width, :height => self.item_height) do
text "Time Out: #{ sale_data.bookings[0].checkout_at.strftime('%I:%M %p') }" , :size => self.item_font_size,:align => :right
bounding_box([0,y_position], :width =>self.page_width - 10, :height => self.item_height) do
text "Receipt Date : #{ sale_data.receipt_date.strftime('%d-%m-%Y') } ( #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') } - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') } )",:size => self.item_font_size,:align => :left
end
# bounding_box([self.item_description_width,y_position], :width =>self.label_width+5) do
# text "(#{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') }
# - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') })" ,
# :size => self.item_font_size,:align => :right
# end
move_down 5
stroke_horizontal_rule
move_down 5
end
def line_items(sale_items)
move_down 5
y_position = cursor
move_down 5
pad_top(15) {
# @item_width.to_i + @half_qty.to_i
text_box "Items", :at =>[0,y_position], :width => self.item_width, :height =>self.item_height, :size => self.item_font_size, :overflow => :shrink_to_fix
@@ -114,10 +108,8 @@ class ReceiptBillPdf < Prawn::Document
text_box "Qty", :at =>[(self.item_width+self.price_width),y_position], :width => self.qty_width, :height =>self.item_height, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix
text_box "Total", :at =>[(self.item_width+self.price_width+4),y_position], :width => self.total_width+3, :height =>self.item_height, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix
}
move_down 5
move_down -5
stroke_horizontal_rule
add_line_item_row(sale_items)
end
@@ -142,7 +134,7 @@ class ReceiptBillPdf < Prawn::Document
text_box "#{qty}", :at =>[item_name_width,y_position], :width => self.qty_width, :height =>self.item_height, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix
text_box "#{total_price}", :at =>[(item_name_width+4),y_position], :width =>self.total_width+3, :height =>self.item_height, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix
}
move_down 3
move_down 1
end
stroke_horizontal_rule
@@ -158,20 +150,6 @@ class ReceiptBillPdf < Prawn::Document
move_down 5
end
def items_account(item_price_by_accounts)
y_position = cursor
item_price_by_accounts.each do |ipa|
y_position = cursor
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
text "#{ ipa[:name] }", :size => self.item_font_size,:align => :left
end
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{ ipa[:price] }" , :size => self.item_font_size,:align => :right
end
move_down 5
end
end
def all_total(sale_data)
item_name_width = self.item_width
y_position = cursor
@@ -267,7 +245,7 @@ class ReceiptBillPdf < Prawn::Document
move_down 5
y_position = cursor
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
text "Rebate Amount", :size => self.item_font_size,:align => :left
text "Current Rebate Amount", :size => self.item_font_size,:align => :left
end
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{ res["rebate"] }" , :size => self.item_font_size,:align => :right
@@ -278,10 +256,10 @@ class ReceiptBillPdf < Prawn::Document
move_down 5
y_position = cursor
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
text "Redeem Amount", :size => self.item_font_size,:align => :left
text "Current Redeem Amount", :size => self.item_font_size,:align => :left
end
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{ res["redeem"] }" , :size => self.item_font_size,:align => :right
text "(#{ res["redeem"] })" , :size => self.item_font_size,:align => :right
end
end
@@ -289,22 +267,23 @@ class ReceiptBillPdf < Prawn::Document
end
end
if member_info["status"] == true
balance = 0.0
member_info["data"].each do |res|
if res["accountable_type"]== "RebateAccount"
move_down 5
y_position = cursor
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
text "Current Balance", :size => self.item_font_size,:align => :left
end
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{ res["balance"] }" , :size => self.item_font_size,:align => :right
end
if res["accountable_type"] == "RebateAccount" || res["accountable_type"] == "RebatebonusAccount"
balance = balance + res["balance"]
end
end
move_down 5
y_position = cursor
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
text "Current Balance", :size => self.item_font_size,:align => :left
end
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{ balance }" , :size => self.item_font_size,:align => :right
end
end
end
@@ -317,7 +296,23 @@ class ReceiptBillPdf < Prawn::Document
end
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{ customer_name }" , :size => self.item_font_size,:align => :right
end
end
end
def items_account(item_price_by_accounts)
move_down 5
stroke_horizontal_rule
move_down 5
y_position = cursor
item_price_by_accounts.each do |ipa|
y_position = cursor
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
text "#{ ipa[:name] }", :size => self.item_font_size,:align => :left
end
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{ ipa[:price] }" , :size => self.item_font_size,:align => :right
end
end
end
def footer
@@ -331,3 +326,4 @@ class ReceiptBillPdf < Prawn::Document
end
end

View File

@@ -11,24 +11,20 @@
<% str="[\"#{msg['name']}\"]"
str.gsub!('["', '')
str.gsub!('"]', '') %>
<span class="help-block" style="margin-top:-10px"><%= str %></span>
<span class="help-block" style="margin-top:-6px"><%= str %></span>
<% end -%>
</div>
<div class="form-group">
<label>Salutation :</label><br>
<label>
<input type="radio" value="Mr" name="salutation" class="salutation mr" style="width: 30px">Mr
</label>
<label>
<input type="radio" value="Miss" name="salutation" class="salutation miss" style="width: 30px">Miss
</label>
<label>
<input type="radio" value="Mrs" name="salutation" class="salutation mrs" style="width: 30px">Mrs
</label>
<label>
<input type="radio" value="Mdm" name="salutation" class="salutation mdm" style="width: 30px">Mdm
</label>
<label>Mr</label>
<%= f.radio_button :salutation,"Mr", :class => "salutation mr", :value=>"Mr", :style=>"width: 30px"%>
<label>Miss</label>
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs", :value=>"Mrs", :style=>"width: 30px"%>
<label>Mrs</label>
<%= f.radio_button :salutation,"Miss", :class => "salutation miss", :value=>"Miss", :style=>"width: 30px"%>
<label>Mdm</label>
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm", :value=>"Mdm", :style=>"width: 30px"%>
</div>
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
@@ -37,18 +33,16 @@
<% str="[\"#{msg['name']}\"]"
str.gsub!('["', '')
str.gsub!('"]', '') %>
<span class="help-block" style="margin-top:-10px"><%= str %></span>
<span class="help-block" style="margin-top:-6px"><%= str %></span>
<% end -%>
</div>
<div class="form-group">
<label>Gender :</label><br>
<label>
<input type="radio" value="Male" name="gender" class="gender male" style="width:30px;">Male
</label>
<label>
<input type="radio" value="Female" name="gender" class="gender female" style="width:30px;">Female
</label>
<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">
@@ -62,7 +56,7 @@
<% str="[\"#{msg['company']}\"]"
str.gsub!('["', '')
str.gsub!('"]', '') %>
<span class="help-block" style="margin-top:-10px"><%= str %></span>
<span class="help-block" style="margin-top:-6px"><%= str %></span>
<% end -%>
</div>
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
@@ -72,7 +66,7 @@
<% str="[\"#{msg['contact_no']}\"]"
str.gsub!('["', '')
str.gsub!('"]', '') %>
<span class="help-block" style="margin-top:-10px"><%= str %></span>
<span class="help-block" style="margin-top:-6px"><%= str %></span>
<% end -%>
</div>
@@ -83,7 +77,7 @@
<% str="[\"#{msg['contact_no']}\"]"
str.gsub!('["', '')
str.gsub!('"]', '') %>
<span class="help-block" style="margin-top:-10px"><%= str %></span>
<span class="help-block" style="margin-top:-6px"><%= str %></span>
<% end -%>
</div>

View File

@@ -47,7 +47,7 @@
<tbody>
<% @i = 0 %>
<% @crm_customers.each do |crm_customer| %>
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
<% if crm_customer.customer_id != "CUS-00001" && crm_customer.customer_id != "CUS-000000000" %>
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
<td>
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
@@ -152,7 +152,6 @@ $(document).on('click',".customer_tr",function(){
$("#new_customer").attr('class', 'simple_form edit_customer');
var id = "edit_customer_"+customer_id;
alert(id)
$("#new_customer").attr('id', id);
$(".edit_customer").attr('id', id);

View File

@@ -55,12 +55,16 @@
<div class="table-responsive">
<table class="table table-striped">
<thead>
<% puts "'''''''''''''''''''"
puts @response
if @response["status"] == true %>
<tr>
<th colspan="5">Membership Transactions</th>
<% if @response["status"] == true %>
<th>Current Balance : <%= @response["data"][0]["balance"]%></th>
<% end %>
</tr>
<% end %>
<tr>
<th>Date</th>
<th>Redeem</th>
@@ -99,28 +103,22 @@
<table class="table table-striped">
<thead>
<tr>
<th>Order ID</th>
<th>Menu Item</th>
<th>QTY</th>
<th>Unit Price </th>
<th>Option</th>
<th>Status</th>
<th>Waiter</th>
<th>Created at </th>
<th>Order ID </th>
<th>Type</th>
<th>Order status</th>
<th>Order date</th>
<th>Items Count</th>
</tr>
</thead>
<tbody>
<% @order_items.each do |order_item| %>
<% @orders.each do |order| %>
<tr>
<td><%= order_item.order_id %></td>
<td><%= order_item.item_name %></td>
<td><%= order_item.qty %></td>
<td><%= order_item.price %></td>
<td><%= order_item.options %></td>
<td><%= order_item.order_item_status %></td>
<td><%= order_item.item_order_by %> </td>
<td><%= order_item.created_at.strftime("%d-%m-%y") %></td>
<td><%= order.order_id %></td>
<td><%= order.order_type %></td>
<td><%= order.status %></td>
<td><%= order.date.strftime("%d-%m-%Y") %> </td>
<td><%= order.item_count %> </td>
</tr>
<% end %>
</tbody>
@@ -135,62 +133,33 @@
<table class="table table-striped">
<thead>
<tr>
<th>Sale ID </th>
<th>Menu Item</th>
<th>QTY</th>
<th>Unit Price </th>
<th>Tax Price</th>
<th>Created At</th>
<th>Sale Id </th>
<th>Receipt no </th>
<th>Grand total</th>
<th>Tax amount</th>
<th>Cashier</th>
<th>Sales status</th>
<th>Receipt Date</th>
</tr>
</thead>
<tbody>
<% @sale_items.each do |sale_item| %>
<tr>
<td><%= sale_item.sale_id %></td>
<td><%= sale_item.product_name %></td>
<td><%= sale_item.qty %></td>
<td><%= sale_item.unit_price %></td>
<td><%= sale_item.taxable_price %></td>
<td><%= sale_item.created_at %></td>
</tr>
<% end %>
<% @sales.each do |sale| %>
<tr>
<td><%= sale.sale_id %></td>
<td><%= sale.receipt_no %></td>
<td><%= sale.grand_total rescue '-' %></td>
<td><%= sale.total_tax %></td>
<td><%= sale.cashier_name rescue '-' %></td>
<td> <%= sale.sale_status %> </td>
<td> <%= sale.receipt_date.strftime("%d-%m-%Y") %> </td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="customer" role="tabpanel">
<h3>Sale Details</h3>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Sale ID </th>
<th>Menu Item</th>
<th>QTY</th>
<th>Unit Price </th>
<th>Tax Price</th>
<th>Created At</th>
</tr>
</thead>
<tbody>
<% @sale_items.each do |sale_item| %>
<tr>
<td><%= sale_item.sale_id %></td>
<td><%= sale_item.product_name %></td>
<td><%= sale_item.qty %></td>
<td><%= sale_item.unit_price %></td>
<td><%= sale_item.taxable_price %></td>
<td><%= sale_item.created_at %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@@ -23,7 +23,6 @@
</div>
<% end %>
<%= yield %>
</div>
</body>
</html>

View File

@@ -33,13 +33,14 @@
<ul class="dropdown-menu">
<li><%= link_to "Orders ", transactions_orders_path, :tabindex =>"-1" %></li>
<li><%= link_to "Sales ", transactions_sales_path, :tabindex =>"-1" %></li>
<!-- <li><%= link_to "Sales ", transactions_credit_notes_path, :tabindex =>"-1" %></li> -->
</ul>
</li>
<li class="navbar-nav mr-auto dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">&nbsp;&nbsp;&nbsp;Reports</a>
<ul class="dropdown-menu">
<li><%= link_to "Daily Sale Report", reports_daily_sale_index_path, :tabindex =>"-1" %></li>
<li><%= link_to "Sales Item Report", reports_sale_item_index_path, :tabindex =>"-1" %></li>
<li><%= link_to "Daily Sale Report", reports_daily_sales_path, :tabindex =>"-1" %></li>
<li><%= link_to "Sales Item Report", reports_sale_items_path, :tabindex =>"-1" %></li>
<li><%= link_to "Receipt Report", reports_receipt_no_index_path, :tabindex =>"-1" %></li>
</ul>
</li>
@@ -49,10 +50,13 @@
<% if current_login_employee %>
<div class="right">
<ul class="navbar-nav mr-auto">
<%if current_login_employee.role !="waiter" %>
<li style="color: #959595"><%= current_login_employee.name %> </li>
<li style="padding-right:10px;padding-left:10px"> | </li>
<li ><%= link_to 'Logout', logout_path, method: :delete, data: { confirm: 'Are you sure?' } %>
</li>
<%end%>
</ul>
</div>
<% end %>

View File

@@ -18,7 +18,16 @@
<%= render 'layouts/header' %>
<div class="container-fluid">
<% flash.each do |type, message| %>
<div class="alert fade-in">
<%
if type== "warning"
alert = "alert-warning"
elsif type== "notice"
alert = "alert-success"
else
alert = "alert-danger"
end
%>
<div class="alert <%=alert%> fade-in">
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
<%= message %>
</div>

View File

@@ -0,0 +1,27 @@
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">Update Quantity</div>
<div class="card-body">
<div class="col-md-12">
<h3><%= @order_item[0].item_name + " - [" + @order_item[0].qty.to_s + "]" %></h3>
<div class="form-group">
<label class="col-md-1">Quantity: </label>
<input type="text" name="qty_weight" class="text-right" value="<%= @order_item[0].qty %>" />
</div>
<div class="form-group">
<label class="col-md-1">Remark: </label>
<textarea rows="2" cols="22" name="remarks"></textarea>
</div>
<div class="form-group">
<a href="<%= oqs_root_path %>" class="btn btn-primary">
<i class="fa fa-arrow-left"></i> Back
</a>
<button id="qty-update" class="btn btn-info" data-id="<%= @order_item[0].order_items_id %>">Update</button>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -29,7 +29,7 @@
</ul>
<!-- Nav tabs - End -->
<div class="tab-content" style="min-height:670px; max-height:670px; overflow:auto">
<div class="tab-content" style="max-height:670px; overflow:auto">
<!--- Panel 0 - Completed -->
<div class="tab-pane active" id="completed" role="tabpanel">
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
@@ -39,9 +39,11 @@
<div class="card queue_station">
<div class="card-block">
<h4 class="card-title">
<span class="order-zone">
<%= qid.zone %>
</span> -
<span class="order-zone-type"><%= qid.type %> - </span>
<span class="order-zone"><%= qid.zone %></span>
<small class="pull-right"><%= qid.order_id %></small>
</h4>
<h4>
<span class="order-item">
<%= qid.item_name %>
</span> [x
@@ -55,7 +57,7 @@
<p class="card-text">
<small class="text-muted">Order at
<span class="order-at">
<%= qid.created_at.strftime("%Y %m %d") %>
<%= qid.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %>
</span> -
<span class="order-by">
<%= qid.item_order_by %>
@@ -89,15 +91,13 @@
<div class="card queue_station">
<div class="card-block">
<h4 class="card-title">
<span class="order-zone">
<%= qid.zone %>
</span> -
<span class="order-item">
<%= qid.item_name %>
</span> [x
<span class="order-qty">
<%= qid.qty %>
</span> ]
<span class="order-zone-type"><%= qid.type %> - </span>
<span class="order-zone"><%= qid.zone %></span>
<small class="pull-right"><%= qid.order_id %></small>
</h4>
<h4>
<span class="order-item"><%= qid.item_name %></span> [x
<span class="order-qty"><%= qid.qty %></span> ]
</h4>
<p class="card-text item-options"><%= qid.options == "[]"? "" : qid.options %></p>
@@ -105,7 +105,7 @@
<p class="card-text">
<small class="text-muted">Order at
<span class="order-at">
<%= qid.created_at.strftime("%Y %m %d") %>
<%= qid.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %>
</span> -
<span class="order-by">
<%= qid.item_order_by %>
@@ -116,8 +116,9 @@
<p class="hidden order-customer"><%= qid.customer_name %></p>
<p class="hidden assigned-order-item"><%= qid.assigned_order_item_id %></p>
</div>
<div class="card-footer">
<button id=<%= 'assigned_queue_' + qid.assigned_order_item_id.to_s %> class="btn btn-primary btn-lg btn-block order-complete">COMPLETE</button>
<div class="card-footer">
<button id=<%= 'edit_' + qid.assigned_order_item_id.to_s %> class="btn btn-warning order-item order-item-edit">EDIT</button>
<button id=<%= 'assigned_queue_' + qid.assigned_order_item_id.to_s %> class="btn btn-primary order-item order-complete">COMPLETE</button>
</div>
</div>
<%
@@ -163,7 +164,7 @@
</tbody>
</table>
</div>
<div class="card-text" style="min-height:400px; max-height:400px; overflow:auto">
<div class="card-text" style="min-height:360px; max-height:360px; overflow:auto">
<table class="table" id="oqs-order-details-table">
<thead>
<tr>

View File

@@ -0,0 +1 @@
json.status true

View File

@@ -1 +1,166 @@
hello Credit
<div class="row">
<div class="col-lg-5 col-md-5 col-sm-3">
<div class="row">
<div class="col-md-6">
<h2>CREDIT PAYMENT</h2>
</div>
</div>
<div class="card" style="margin-top:10px;padding-top:20px;">
<div class="rebate-form">
<div class="row">
<div class="form-group col-lg-12 col-md-12 col-sm-12">
<label class="col-lg-4 col-md-4 col-sm-4">You can pay up to </label>
<input type="text" name="validamount" id="validamount" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@can_credit %>" data-member-value="">
</div>
<hr>
</div>
<% if @creditcount != 0 %>
<div class="row">
<div class="form-group col-lg-12 col-md-12 col-sm-12">
<label class="col-lg-4 col-md-4 col-sm-4">Recent Credit Amount </label>
<input type="text" name="" id="" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@creditcount %>" data-member-value="">
</div>
<hr>
</div>
<% end %>
<div class="row">
<div class="form-group col-lg-12 col-md-12 col-sm-12">
<label class="col-lg-4 col-md-4 col-sm-4">Recent Credit Amount</label>
<input type="text" name="valid_amount" id="valid_amount" class="form-control col-lg-7 col-md-7 col-sm-7" value="" data-value="<%=@sale_id %>" data-member-value="">
</div>
<hr>
</div>
<div class="row">
<div class="form-group col-lg-12 col-md-12 col-sm-12">
<label class="col-lg-4 col-md-4 col-sm-4">Amount</label>
<div id="amount" class="form-control col-lg-7 col-md-7 col-sm-7">0.0</div>
</div>
<hr>
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6" style="margin-top:75px;">
<div class="row">
<div class="col-lg-6 col-md-1 col-sm-1">
<div class="row bottom">
<div class=" cashier_number " data-value="1" data-type="num">1</div>
<div class=" cashier_number left" data-value="2" data-type="num">2</div>
<div class=" cashier_number left" data-value="3" data-type="num">3</div>
</div>
<div class="row bottom">
<div class=" cashier_number " data-value="4" data-type="num">4</div>
<div class=" cashier_number left" data-value="5" data-type="num">5</div>
<div class=" cashier_number left" data-value="6" data-type="num">6</div>
</div>
<div class="row bottom">
<div class=" cashier_number " data-value="7" data-type="num">7</div>
<div class=" cashier_number left" data-value="8" data-type="num">8</div>
<div class=" cashier_number left" data-value="9" data-type="num">9</div>
</div>
<div class="row bottom">
<div class=" cashier_number " data-value="0" data-type="num">0</div>
<div class=" cashier_number left" data-value="." data-type="num">.</div>
<div class=" cashier_number left" data-value="00" data-type="num">00</div>
</div>
<div class="row bottom">
<div class=" cashier_number green" data-type="nett" >Nett</div>
<div class=" cashier_number red left" data-type="del">Del</div>
<div class=" cashier_number orange left" data-type="clr">Clr</div>
</div>
</div>
<div class="col-lg-6 col-md-1 col-sm-1">
<div class="row bottom">
<div class="cashier_number long" data-value="1000" data-type="add">1000</div>
<div class="cashier_number long left" data-value="3000" data-type="add">3000</div>
</div>
<div class="row bottom">
<div class="cashier_number long" data-value="5000" data-type="add">5000</div>
<div class="cashier_number long left" data-value="10000" data-type="add">10000</div>
</div>
<div class="row bottom">
<div class="pay purple" id="credit_pay">Pay</div>
</div>
</div>
</div>
</div>
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-primary btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment';"> Back </button>
</div>
</div>
<script>
$(document).ready(function() {
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
else {
$('#validamount').attr("value",parseFloat("<%= @can_credit %>") - parseFloat(localStorage.getItem("cash")));
}
});
$(document).on('click', '.cashier_number', function(event){
event.stopPropagation();
event.preventDefault();
if(event.handled !== true) {
var original_value;
original_value = $('#amount').text();
var input_value = $(this).attr("data-value");
var input_type = $(this).attr("data-type");
switch (input_type) {
case 'num':
if (original_value == "0.0"){
$('#amount').text(input_value);
}else{
$('#amount').append(input_value);
}
break;
case 'add':
var input_value = $(this).attr("data-value");
amount = parseInt(input_value) + parseInt(original_value);
$('#amount').html(amount);
break;
case 'clr':
$('#amount').html("0.0");
break;
case 'del' :
var cash=$('#amount').text();
$('#amount').text(cash.substr(0,cash.length-1));
break;
case 'nett':
var remain_amount = $('#validamount').val();
$('#amount').text(remain_amount);
break;
}
event.handled = true;
} else {
return false;
}
});
$('#credit_pay').on('click',function(){
var amount = $('#amount').text();
var sale_id = "<%= @sale_id %>";
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value"))){
$.ajax({type: "POST",
url: "<%= origami_payment_credit_path %>",
data: "amount="+ amount + "&sale_id="+ sale_id,
success:function(result){
if(result){
alert("Payment success")
window.location.href = '/origami/sale/'+ sale_id + "/payment";
}
}
});
}else{
alert("Paid Amount is over!");
}
})
</script>

View File

@@ -41,7 +41,7 @@
<% if @crm_customers.count > 0 %>
<% @i = 0 %>
<% @crm_customers.each do |crm_customer| %>
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
<% if crm_customer.customer_id != "CUS-00000" && crm_customer.customer_id != "CUS-00000000" %>
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
<td>
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
@@ -88,18 +88,14 @@
</div>
<div class="form-group">
<label>Salutation :</label><br>
<label>
<input type="radio" value="Mr" name="salutation" class="salutation mr" style="width: 30px">Mr
</label>
<label>
<input type="radio" value="Miss" name="salutation" class="salutation miss" style="width: 30px">Miss
</label>
<label>
<input type="radio" value="Mrs" name="salutation" class="salutation mrs" style="width: 30px">Mrs
</label>
<label>
<input type="radio" value="Mdm" name="salutation" class="salutation mdm" style="width: 30px">Mdm
</label>
<label>Mr</label>
<%= f.radio_button :salutation,"Mr", :class => "salutation mr", :value=>"Mr", :style=>"width: 30px"%>
<label>Miss</label>
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs", :value=>"Mrs", :style=>"width: 30px"%>
<label>Mrs</label>
<%= f.radio_button :salutation,"Miss", :class => "salutation miss", :value=>"Miss", :style=>"width: 30px"%>
<label>Mdm</label>
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm", :value=>"Mdm", :style=>"width: 30px"%>
</div>
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
@@ -115,12 +111,10 @@
<div class="form-group">
<label>Gender :</label><br>
<label>
<input type="radio" value="Male" name="gender" class="gender male" style="width:30px;">Male
</label>
<label>
<input type="radio" value="Female" name="gender" class="gender female" style="width:30px;">Female
</label>
<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">
@@ -161,10 +155,10 @@
<%= f.input :address, :class => "form-control col-md-6 address" %>
</div>
<div class="form-group">
<!-- <div class="form-group">
<label>Sr.No</label>
<input type="text" name="" value="<%=@count_customer%>" class="form-control" readonly="true">
</div>
</div> -->
<div class="form-group">
<label>Date Of Birth</label>
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
@@ -327,16 +321,4 @@
})
</script>
class CreateDiningQueues < ActiveRecord::Migration[5.1]
def change
create_table :dining_queues do |t|
t.string :name
t.string :contact_no
t.string :queue_no
t.string :status
t.references :dining_facility, foreign_key: true
t.timestamps
end
end
end

View File

@@ -199,31 +199,26 @@ $(document).ready(function(){
case 'num':
var input_value = $(this).attr("data-value");
if (original_value == "0.0"){
$('#discount-amount').val(input_value);
// update_balance();
$('#discount-amount').val(input_value);
}
else{
$('#discount-amount').val(original_value + '' + input_value);
// update_balance();
$('#discount-amount').val(original_value + '' + input_value);
}
break;
case 'add':
var input_value = $(this).attr("data-value");
amount = parseInt(input_value);
$('#discount-amount').val(amount);
// update_balance();
$('#discount-amount').val(amount);
break;
case 'del' :
var discount_text=$('#discount-amount').val();
$('#discount-amount').val(discount_text.substr(0,discount_text.length-1));
// update_balance();
$('#discount-amount').val(discount_text.substr(0,discount_text.length-1));
break;
case 'clr':
$('#discount-amount').val("0.0");
// update_balance();
$('#discount-amount').val("0.0");
break;
}
event.handled = true;
@@ -254,19 +249,24 @@ $(document).ready(function(){
// Select for account types
$(".accounts-type").on('click', function(e){
var account_id = $(this).attr('id').substr(8);
if($(this).hasClass('selected-account') == true){
$(this).removeClass('selected-account');
$(".item-row").each(function(i){
if($(this).children().find("#item-account-type").text() == account_id){
$(this).removeClass("selected-item");
}
});
}
else {
$(this).addClass('selected-account');
}
var account_id = $(this).attr('id').substr(8);
$(".item-row").each(function(i){
if($(this).children().find("#item-account-type").text() == account_id){
$(this).addClass("selected-item");
}
});
$(".item-row").each(function(i){
if($(this).children().find("#item-account-type").text() == account_id){
$(this).addClass("selected-item");
}
});
}
});
// Calculate Net Discount for Payment
@@ -332,13 +332,7 @@ $(document).ready(function(){
var sale_id = $('#sale-id').text();
var discount_items = JSON.stringify(get_discount_item_rows());
var overall_discount = $("#order-discount").text();
var sub_total = $('#order-sub-total').text();
// var sale_item_id = $('.selected-item').attr('id').substr(0,16);
// var sub_total = $('#order-sub-total').text();
// var grand_total = $('#order-grand-total').text();
// var discount_type = $('#discount-type').val();
// var discount_value = $('#discount-amount').val();
// var discount_amount = discount_value;
var sub_total = $('#order-sub-total').text();
var ajax_url = "/origami/" + sale_id + "/discount";
var params = { 'sale_id': sale_id, 'sub_total': sub_total, 'discount_items': discount_items, 'overall_discount': overall_discount };
@@ -354,30 +348,12 @@ $(document).ready(function(){
}
else {
window.location.href = "/origami/room/" + result.table_id
}
// window.history.back();
}
}
});
});
});
/* For Receipt - Update Balance */
function update_balance(){
var discount_amount = $('#discount-amount').val();
var sub_total = $('#order-sub-total').text();
var tax = $('#order-Tax').text();
// For Percentage Discount
// if(discount_type == 1){
// discount_amount=(sub_total*discount_amount)/100;
// }
var total = (parseFloat(sub_total) + parseFloat(tax)) - discount_amount;
$('#order-discount').text(discount_amount);
$('#order-grand-total').text(total);
}
/* Remove Selection */
function selection_remove(){
$(".item-row").removeClass("selected-item");

View File

@@ -38,12 +38,21 @@
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<% @tables.each do |table| %>
<% if table.status == 'occupied' %>
<div class="card tables red text-white" data-id="<%= table.id %>">
<div class="card-block">
Zone <%= table.zone_id %> <br>
Table <%= table.name %> ( <%= table.seater %> Seat )
</div>
</div>
<% if table.get_booking.nil? %>
<div class="card tables red text-white" data-id="<%= table.id %>">
<div class="card-block">
Zone <%= table.zone_id %> <br>
Table <%= table.name %> ( <%= table.seater %> Seat )
</div>
</div>
<% else %>
<div class="card tables blue text-white" data-id="<%= table.id %>">
<div class="card-block">
Zone <%= table.zone_id %> <br>
Table <%= table.name %> ( <%= table.seater %> Seat )
</div>
</div>
<% end %>
<% else %>
<div class="card tables green text-white" data-id="<%= table.id %>">
<div class="card-block">
@@ -121,7 +130,7 @@ $(function() {
var timer;
function start() {
timer = setTimeout(function() { console.log("refresh");window.location.reload()}, 30000); //10000
timer = setTimeout(function() { console.log("refresh");window.location.reload()}, 10000); //10000
};
function stop() {

View File

@@ -38,16 +38,22 @@
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<% @tables.each do |table| %>
<% if table.status == 'occupied' %>
<div class="card tables red text-white" data-id="<%= table.id %>">
<div class="card-block">
<%= table.name %>
<% if table.get_booking.nil? %>
<span style="font-size:12px;float:right;line-height:inherit;"> billed</span>
<% else %>
<span style="font-size:12px;float:right;line-height:inherit;"> new</span>
<% end %>
</div>
</div>
<% if table.get_booking.nil? %>
<div class="card tables red text-white" data-id="<%= table.id %>">
<div class="card-block">
<%= table.name %>
<span style="font-size:12px;float:right;line-height:inherit;"> billed</span>
<div style="font-size:12px;"></div>
</div>
</div>
<% else %>
<div class="card tables blue text-white" data-id="<%= table.id %>">
<div class="card-block">
<%= table.name %>
<span style="font-size:12px;float:right;line-height:inherit;"> new</span>
</div>
</div>
<% end %>
<% else %>
<div class="card tables green text-white" data-id="<%= table.id %>">
<div class="card-block">
@@ -108,9 +114,9 @@
<div class="card" >
<div class="card-header">
<% if @status_order == 'order' && @status_sale != 'sale' %>
<div id="save_order_id" data-order="<%= @obj_order.order_id %>"><strong id="order-title">ORDER DETAILS </strong></div>
<div id="save_order_id" data-order="<%= @obj_order.order_id %>"><strong id="order-title">ORDER DETAILS </strong> | Table <%= @dining.name rescue "" %></div>
<% elsif @status_sale == 'sale' %>
<div><strong id="order-title">INVOICE DETAILS </strong></div>
<div><strong id="order-title">INVOICE DETAILS </strong> | Table <%= @dining.name rescue "" %></div>
<% end %>
</div>
<div class="card-block">
@@ -126,13 +132,14 @@
<p>Date: <span id="receipt_date"><%= @date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
</div>
</div>
<div class="card-title row">
<div class="col-lg-6 col-md-6 col-sm-6">
<p class="hidden customer-id"><%= @customer.customer_id %></p>
<p>Customer : <%= @customer.name %></p>
<%if @customer %>
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
<p>Customer : <%= @customer.name rescue "" %></p>
<%end%>
</div>
</div>
<div class="card-text">
<table class="table table-striped" id="order-items-table">
@@ -174,7 +181,7 @@
count = 0
@order_items.each do |order_item |
count += 1
sub_total = sub_total + order_item.price
sub_total = sub_total + (order_item.price * order_item.qty)
unless order_item.price == 0 %>
<tr>
@@ -241,18 +248,18 @@
%>
</table>
<button class='btn btn-primary' id='add_invoice'> Add to existing invoice </button>
<%
end
@sale_array.each do |sale|
<% end %>
<br><br>
Pending Payment
<% @sale_array.each do |sale|
if @sale_array.size > 1
unless sale.receipt_no == @sale_array[0].receipt_no
%>
<br><br>
Pending Payment
<table class="table table-striped">
<tr>
<td>Receipt No - <%= sale.receipt_no %></td>
<td><button class='btn btn-sm btn-primary '>Show Detail </button></td>
<td><button class='btn btn-sm btn-primary invoicedetails' id="<%= sale.sale_id %>">Show Detail </button></td>
</tr>
</table>
<%
@@ -288,16 +295,21 @@
<button type="button" class="btn btn-primary btn-block" id='move' disabled="">Move</button>
<button type="button" id="request_bills" class="btn btn-primary btn-block" disabled> Req.Bill</button>
<button type="button" id="pay" class="btn btn-primary btn-block">Pay</button>
<button type="button" class="btn btn-primary btn-block" > Void </button>
<button type="button" id="void" class="btn btn-primary btn-block" > Void </button>
<% end %>
<!-- Cashier Buttons -->
<button type="button" id="re-print" class="btn btn-primary btn-block" >Re.Print</button>
<!-- <button type="button" id="re-print" class="btn btn-primary btn-block" >Re.Print</button> -->
<% end %>
</div>
</div>
<script>
$(document).ready(function(){
$('.invoicedetails').on('click',function(){
var dining_id = "<%= @dining.id %>";
var sale_id = this.id;
window.location.href = '/origami/table/'+ dining_id + "/table_invoice/"+sale_id;
})
$(".tables").on('click', function(){
var customer_id=$(".customer-id").text();
@@ -348,6 +360,13 @@ $(document).ready(function(){
});
$('#re-print').click(function() {
var sale_id = $('#sale_id').val();
window.location.href = '/origami/'+ sale_id + "/reprint"
return false;
});
// Discount for Payment
$('#discount').click(function() {
var sale = $('#sale_id').val();
@@ -454,5 +473,24 @@ $('#edit').on('click',function(){
var sale_id = "<%= @obj_sale.sale_id rescue "" %>"
window.location.href = '/origami/table/'+ dining_id + "/sale/"+ sale_id + "/edit";
})
$('#void').on('click',function () {
var sure = confirm("Are you sure want to Void");
if (sure == true) {
var sale_id = $('#sale_id').val();
var ajax_url = "/origami/sale/" + sale_id + '/void';
$.ajax({
type: 'POST',
url: ajax_url,
success: function () {
window.location.href = '/origami/';
}
})
} else {
}
})
</script>

View File

@@ -189,7 +189,7 @@
<% if @sale_status != 'completed' %>
<button type="button" class="btn btn-primary btn-block" id='move'>MOVE</button>
<% end %>
<button type="button" id="re-print" class="btn btn-primary btn-block">Re.Print</button>
<!-- <button type="button" id="re-print" class="btn btn-primary btn-block">Re.Print</button> -->
</div>
</div>
<script>

View File

@@ -105,7 +105,7 @@
<div class="row payment credit-color" id="credit_payment" >
<div class="col-md-8">Credit</div>
<div class="col-md-4" id="credit">0.0</div>
<div class="col-md-4" id="credit"><%= @credit %></div>
</div>
<% if @other == 0.0 && @ppamount == 0.0 && @visacount == 0.0 && @jcbcount == 0.0 && @mastercount == 0.0%>
<div class="row payment other-payment-color" id="card_payment" >
@@ -241,8 +241,10 @@
</div>
<div class="col-lg-1 col-md-1 col-sm-1">
<!-- Waiter Buttons -->
<button type="button" class="btn btn-primary btn-block" onclick="localStorage.removeItem('cash');window.location.href = '/origami';"> Back </button>
<button type="button" class="btn btn-primary btn-block"> FOC </button>
<button type="button" class="btn btn-primary btn-block"> Void </button>
</div>
</div>

View File

@@ -5,7 +5,7 @@
<div class="rebate-form">
<div class="row">
<div class="form-group col-lg-12 col-md-12 col-sm-12">
<label class="col-lg-4 col-md-4 col-sm-4">You can redeem upto </label>
<label class="col-lg-4 col-md-4 col-sm-4">You can redeem up to </label>
<input type="text" name="" id="redeemamt" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%= @redeem_prices %>" data-value="<%=@sale_id %>" data-member-value="<%= @membership_id %>">
</div>
<hr>
@@ -21,7 +21,7 @@
<% end %>
<div class="row">
<div class="form-group col-lg-12 col-md-12 col-sm-12">
<label class="col-lg-4 col-md-4 col-sm-4"> Rebat Balance </label>
<label class="col-lg-4 col-md-4 col-sm-4"> Rebate Balance </label>
<input type="text" name="valid_amount" id="valid_amount" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@membership_rebate_balance%>" data-value="<%=@sale_id %>" data-member-value="<%= @membership_id %>">
</div>
<hr>
@@ -98,6 +98,12 @@
</div>
<script type="text/javascript">
$(document).ready(function() {
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
else {
$('#redeemamt').attr("value",parseFloat("<%= @redeem_prices %>") - parseFloat(localStorage.getItem("cash")));
}
});
$(document).on('click', '.cashier_number', function(event){
event.stopPropagation();
event.preventDefault();
@@ -131,7 +137,7 @@ $(document).on('click', '.cashier_number', function(event){
$('#used_amount').text(cash.substr(0,cash.length-1));
break;
case 'nett':
var remain_amount = $('#redeemamt').val();
var remain_amount = $('#valid_amount').val();
$('#used_amount').text(remain_amount);
break;

View File

@@ -0,0 +1,82 @@
<div class="row">
<div class="col-lg-4 col-md-6 col-sm-6">
<% @sale_array.each do |sale| %>
<div class="card tables" data-id="<%= sale.id %>">
<div class="card-block">
<%= sale.receipt_no %>
</div>
</div>
<% end %>
</div>
<!-- Column Two -->
<div class="col-lg-7 col-md-5 col-sm-5">
<div class="card" >
<div class="card-header">
<div><strong id="order-title">INVOICE DETAILS </strong></div>
</div>
<div class="card-block">
<div class="card-title row">
<div class="col-lg-6 col-md-6 col-sm-6">
<p> Receipt No: <span id="receipt_no">
<%= @sale.receipt_no rescue '' %>
</span></p>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
<p>Date: <span id="receipt_date"><%= @sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
</div>
</div>
<div class="card-title row customer_detail hide">
<div class="col-lg-6 col-md-6 col-sm-6">
<p>Customer : <span id="customer_name"></span></p>
</div>
</div>
<div class="card-footer">
<table class="table" id="order-charges-table" border="0">
<tr>
<td class="charges-name"><strong>Sub Total:</strong></td>
<td class="item-attr"><strong id="order-sub-total"></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Discount:</strong></td>
<td class="item-attr"><strong id="order-discount">(<%= @sale.total_discount rescue 0%>)</strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Tax:</strong></td>
<td class="item-attr"><strong id="order-Tax"><%= @sale.total_tax rescue 0%></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Grand Total:</strong></td>
<td class="item-attr"><strong id="order-grand-total"><%= @sale.grand_total rescue 0%></strong></td>
</tr>
<tr class="rebate_amount"></tr>
</table>
</div>
</div>
</div>
</div>
<!-- Column Three -->
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
<button type="button" id="pay" class="btn btn-primary btn-block" disabled>Pay</button>
</div>
</div>
<script>
$(document).ready(function(){
$(".tables").on('click', function(){
var dining_id = $(this).attr("data-id");
window.location.href = '/origami/table/<%= @room.id %>/table_invoice/' + dining_id;
})
});
$('#pay').on('click',function() {
// var sale_id = $('#sale_id').val();
// window.location.href = '/origami/sale/'+ sale_id + "/payment";
});
$('#back').on('click',function(){
window.location.href = '/origami/table/<%= @room.id %>';
})
</script>

View File

@@ -0,0 +1,147 @@
<div class="row">
<div class="col-lg-4 col-md-6 col-sm-6">
<!-- <div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;"> -->
<% @sale_array.each do |sale| %>
<div class="card tables" data-id="<%= sale.id %>">
<% if sale.id == @sale.id %>
<div class="card-bl ock" style="background-color:#6080f0;">
<%= sale.receipt_no %>
</div>
<% else %>
<div class="card-block">
<%= sale.receipt_no %>
</div>
<% end %>
</div>
<% end %>
</div>
<div class="col-lg-7 col-md-5 col-sm-5">
<div class="card" >
<div class="card-header">
<div><strong id="order-title">INVOICE DETAILS </strong></div>
</div>
<div class="card-block">
<div class="card-title row">
<div class="col-lg-6 col-md-6 col-sm-6">
<p> Receipt No: <span id="receipt_no">
<%= @sale.receipt_no rescue '' %>
</span></p>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
<p>Date: <span id="receipt_date"><%= @sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
</div>
</div>
<div class="card-title row customer_detail hide">
<div class="col-lg-6 col-md-6 col-sm-6">
<!-- <% if !@customer.nil? %> -->
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
<p>Customer : <%= @customer.name rescue "" %></p>
<!-- <% end %> -->
</div>
</div>
<div class="card-text">
<table class="table table-striped" id="order-items-table">
<thead>
<tr>
<th>#</th>
<th class="item-name">Items</th>
<th class="item-attr">QTY</td>
<th class="item-attr">Price</td>
</tr>
</thead>
<tbody>
<%
count = 0
sub_total = 0
if @status_sale == "sale"
@sale.sale_items.each do |sale_item|
count += 1
sub_total = sub_total + sale_item.price
%>
<input type="hidden" id="sale_id" value="<%= @sale_array[0].sale_id %>">
<%
# Can't check for discount
unless sale_item.price == 0
%>
<tr>
<td><%= count %></td>
<td class='item-name'><%= sale_item.product_name %></td>
<td class='item-attr'><%= sale_item.qty %></td>
<td class='item-attr'><%= sale_item.price %></td>
</tr>
<%
end
end
end
if @status_order == 'order' && @status_sale != 'sale'
unless @order_items.nil?
count = 0
@order_items.each do |order_item |
count += 1
sub_total = sub_total + order_item.price
unless order_item.price == 0 %>
<tr>
<td><%= count %></td>
<td class='item-name'><%= order_item.item_name %></td>
<td class='item-attr'><%= order_item.qty %></td>
<td class='item-attr'><%= order_item.qty*order_item.price %></td>
</tr>
<%
end
end
end
end
%>
</tbody>
</table>
</div>
<div class="card-footer">
<table class="table" id="order-charges-table" border="0">
<tr>
<td class="charges-name"><strong>Sub Total:</strong></td>
<td class="item-attr"><strong id="order-sub-total"><%= sub_total %></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Discount:</strong></td>
<td class="item-attr"><strong id="order-discount">(<%= @sale.total_discount rescue 0%>)</strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Tax:</strong></td>
<td class="item-attr"><strong id="order-Tax"><%= @sale.total_tax rescue 0%></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Grand Total:</strong></td>
<td class="item-attr"><strong id="order-grand-total"><%= @sale.grand_total rescue 0%></strong></td>
</tr>
<tr class="rebate_amount"></tr>
</table>
</div>
</div>
</div>
</div>
<!-- Column Three -->
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
<button type="button" id="pay" class="btn btn-primary btn-block">Pay</button>
</div>
</div>
<script>
$(document).ready(function(){
$(".tables").on('click', function(){
var dining_id = $(this).attr("data-id");
window.location.href = '/origami/table/<%= @room.id %>/table_invoice/' + dining_id;
})
});
$('#pay').on('click',function() {
window.location.href = '/origami/sale/<%= @sale.id %>/payment';
});
$('#back').on('click',function(){
window.location.href = '/origami/table/<%= @room.id %>';
})
</script>

View File

@@ -38,16 +38,21 @@
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<% @tables.each do |table| %>
<% if table.status == 'occupied' %>
<div class="card tables red text-white" data-id="<%= table.id %>">
<div class="card-block">
<%= table.name %>
<% if table.get_booking.nil? %>
<span style="font-size:12px;float:right;line-height:inherit;"> billed</span>
<% else %>
<span style="font-size:12px;float:right;line-height:inherit;"> new</span>
<% end %>
</div>
</div>
<% if table.get_booking.nil? %>
<div class="card tables red text-white" data-id="<%= table.id %>">
<div class="card-block">
<%= table.name %>
<span style="font-size:12px;float:right;line-height:inherit;"> billed</span>
</div>
</div>
<% else %>
<div class="card tables blue text-white" data-id="<%= table.id %>">
<div class="card-block">
<%= table.name %>
<span style="font-size:12px;float:right;line-height:inherit;"> new</span>
</div>
</div>
<% end %>
<% else %>
<div class="card tables green text-white" data-id="<%= table.id %>">
<div class="card-block">
@@ -108,9 +113,9 @@
<div class="card" >
<div class="card-header">
<% if @status == 'order' %>
<div id="save_order_id" data-order="<%= @obj.order_id %>"><strong id="order-title">ORDER DETAILS </strong></div>
<div id="save_order_id" data-order="<%= @obj.order_id %>"><strong id="order-title">ORDER DETAILS </strong> | Table <%= @room.name rescue "" %></div>
<% elsif @status_sale == 'sale' %>
<div><strong id="order-title">INVOICE DETAILS </strong></div>
<div><strong id="order-title">INVOICE DETAILS </strong> | Table <%= @room.name rescue "" %></div>
<% end %>
</div>
@@ -129,8 +134,10 @@
</div>
<div class="card-title row customer_detail hide">
<div class="col-lg-6 col-md-6 col-sm-6">
<%if @customer %>
<p class="hidden customer-id"><%= @customer.customer_id %></p>
<p>Customer : <%= @customer.name %></p>
<p>Customer : <%= @customer.name %></p>
<%end%>
</div>
</div>
@@ -148,7 +155,7 @@
sub_total = 0
if @status == "sale"
@obj.sale_items.each do |sale_item|
sub_total = sub_total + sale_item.price
sub_total = sub_total + sale_item.price
%>
<input type="hidden" id="sale_id" value="<%= @obj.sale_id %>">
<% unless sale_item.price == 0 %>
@@ -165,7 +172,7 @@
if @status == 'order'
unless @order_items.nil?
@order_items.each do |order_item |
sub_total = sub_total + order_item.price
sub_total = sub_total + (order_item.price * order_item.qty)
unless order_item.price == 0 %>
<tr>
@@ -250,7 +257,7 @@
<button type="button" id="discount" class="btn btn-primary btn-block">Discount</button>
<!-- <button type="button" class="btn btn-primary btn-lg btn-block" disabled>Tax</button> -->
<button type="button" id="pay" class="btn btn-primary btn-block">Pay</button>
<button type="button" id="re-print" class="btn btn-primary btn-block">Re.Print</button>
<!-- <button type="button" id="re-print" class="btn btn-primary btn-block">Re.Print</button> -->
</div>
</div>
<script>
@@ -258,28 +265,28 @@ $(document).ready(function(){
$(".tables").on('click', function(){
var customer_id=$(".customer-id").text();
show_customer_details(customer_id);
var dining_id = $(this).attr("data-id");
window.location.href = '/origami/table/' + dining_id;
})
$(".sales").on('click',function(){
var customer_id=$(".customer-id").text();
show_customer_details(customer_id);
var sale_id = $(this).attr("data-id");
window.location.href = '/origami/sale/' + sale_id;
})
$(".rooms").on('click', function(){
var customer_id=$(".customer-id").text();
show_customer_details(customer_id);
var dining_id = $(this).attr("data-id");
window.location.href = '/origami/room/' + dining_id;
})
$(".orders").on('click',function(){
var customer_id=$(".customer-id").text();
show_customer_details(customer_id);
var order_id = $(this).attr("data-id");
window.location.href = '/origami/order/' + order_id;
})

View File

@@ -0,0 +1 @@
json.status true

View File

@@ -0,0 +1 @@
json.status true

View File

@@ -1,6 +1,6 @@
<div class="row">
<!-- Column Two -->
<div class="col-lg-11 col-md-11 col-sm-11">
<div class="col-lg-10 col-md-10 col-sm-10">
<div class="card" >
<div class="card-header">
<div><strong id="order-title">INVOICE DETAILS </strong></div>
@@ -13,7 +13,7 @@
</span></p>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
<p>Date: <span id="receipt_date"><%= @saleobj.created_at.utc.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
<p>Date: <span id="receipt_date"><%= @saleobj.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
</div>
</div>
<div class="card-title row customer_detail hide">
@@ -23,7 +23,7 @@
</div>
<div class="card-text">
<table class="table table-striped" id="order-items-table">
<table class="table " id="order-items-table">
<thead>
<tr>
<th>#</th>
@@ -49,13 +49,23 @@
<tr>
<td><%= count %></td>
<td class='item-name'><%= sale_item.product_name %></td>
<% if sale_item.remark != 'void' %>
<td class='item-attr-edit'><input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.qty %>" /></td>
<td class='item-attr-edit'><input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.price %>" /></td>
<% if sale_item.remark != 'void' || sale_item.qty.to_i > 0 %>
<td class='item-attr'>
<button data-id ="<%= sale_item.id %>" class='btn btn-primary btn-sm update'>Update</button>
<button data-id ="<%= sale_item.id %>" class='btn btn-danger btn-sm void'>Void</button></td>
</td>
<% elsif sale_item.qty.to_i < 0 %>
<td class='item-attr-edit'><input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.qty %>" disabled/></td>
<td class='item-attr-edit'><input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.price %>" disabled/></td>
<td class='item-attr'>
<button data-id ="<%= sale_item.id %>" class='btn btn-primary btn-sm cancel'>Cancel Void</button>
</td>
<% else %>
<td class='item-attr-edit'><input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.qty %>" disabled/></td>
<td class='item-attr-edit'><input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.price %>" disabled/></td>
<td></td>
<% end %>
</tr>
<%
@@ -70,18 +80,6 @@
<tr>
<td class="charges-name"><strong>Sub Total:</strong></td>
<td class="item-attr"><strong id="order-sub-total"><%= sub_total %></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Discount:</strong></td>
<td class="item-attr"><strong id="order-discount">(<%= @saleobj.total_discount rescue 0%>)</strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Tax:</strong></td>
<td class="item-attr"><strong id="order-Tax"><%= @saleobj.total_tax rescue 0%></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Grand Total:</strong></td>
<td class="item-attr"><strong id="order-grand-total"><%= @saleobj.grand_total rescue 0%></strong></td>
</tr>
<tr class="rebate_amount"></tr>
</table>
@@ -91,9 +89,11 @@
</div>
<!-- Column Three -->
<div class="col-lg-1 col-md-1 col-sm-1">
<div class="col-lg-2 col-md-2 col-sm-2">
<!-- Waiter Buttons -->
<button type="button" class="btn btn-primary btn-block" id='back' >Back</button>
<button type="button" class="btn btn-primary btn-block" id='cancel_all_void' >Cancel All Void</button>
<button type="button" class="btn btn-primary btn-block" id='apply' >Apply</button>
</div>
</div>
<script>
@@ -125,10 +125,51 @@ $(document).ready(function(){
});
})
$('.cancel').on('click',function(){
var sale_item_id = $(this).attr('data-id');
var ajax_url = "/origami/item_void_cancel";
$.ajax({
type: "POST",
url: ajax_url,
data: 'sale_item_id='+ sale_item_id,
success:function(result){
location.reload();
}
});
})
})
$('#back').on('click',function(){
var table_id = '<%= @table_id %>'
window.location.href = '/origami/table/'+ table_id;
})
$('#cancel_all_void').on('click',function(){
var sale_id = "<%= @saleobj.sale_id %>"
var ajax_url = "/origami/cancel_all_void";
$.ajax({
type: "POST",
url: ajax_url,
data: 'sale_id='+ sale_id,
success:function(result){
location.reload();
}
});
})
$('#apply').on('click',function(){
var sale_id = "<%= @saleobj.sale_id %>"
var ajax_url = "/origami/apply_void";
var table_id = '<%= @table_id %>'
$.ajax({
type: "POST",
url: ajax_url,
data: 'sale_id='+ sale_id,
success:function(result){
window.location.href = '/origami/table/'+ table_id ;
}
});
})
</script>

View File

@@ -0,0 +1 @@
json.status true

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