commission in sale edit
This commit is contained in:
101
.idea/sxrestaurant.iml
generated
101
.idea/sxrestaurant.iml
generated
@@ -11,106 +11,6 @@
|
||||
</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$">
|
||||
@@ -164,6 +64,7 @@
|
||||
<orderEntry type="library" scope="PROVIDED" name="httparty (v0.15.5, rbenv: 2.3.3) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.8.6, rbenv: 2.3.3) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="jbuilder (v2.7.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="jquery-datetimepicker-rails (v2.4.1.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="jquery-rails (v4.3.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="jquery-ui-rails (v6.0.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="kaminari (v1.0.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||
|
||||
387
.idea/workspace.xml
generated
387
.idea/workspace.xml
generated
@@ -2,11 +2,22 @@
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="89ca96af-a0e4-4fe4-b9a3-9969f22d7079" name="Default" comment="">
|
||||
<change type="DELETED" beforePath="$PROJECT_DIR$/app/views/origami/commissioners/_commissioners_form.html.erb" afterPath="" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/db/migrate/20170823034141_create_product_commissions.rb" />
|
||||
<change type="DELETED" beforePath="$PROJECT_DIR$/app/views/origami/commissions/_commissioners.html.erb" afterPath="" />
|
||||
<change type="DELETED" beforePath="$PROJECT_DIR$/db/migrate/20170822034139_create_product_commissions.rb" afterPath="" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/sxrestaurant.iml" afterPath="$PROJECT_DIR$/.idea/sxrestaurant.iml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/origami/commissions_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/origami/commissions_controller.rb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/origami/product_commissions_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/origami/product_commissions_controller.rb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/models/commission.rb" afterPath="$PROJECT_DIR$/app/models/commission.rb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/models/commissioner.rb" afterPath="$PROJECT_DIR$/app/models/commissioner.rb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/models/menu_item.rb" afterPath="$PROJECT_DIR$/app/models/menu_item.rb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/models/product_commission.rb" afterPath="$PROJECT_DIR$/app/models/product_commission.rb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/models/sale.rb" afterPath="$PROJECT_DIR$/app/models/sale.rb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/models/sale_item.rb" afterPath="$PROJECT_DIR$/app/models/sale_item.rb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/commissions/load_commissioners.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/commissions/load_commissioners.html.erb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/home/show.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/home/show.html.erb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/home/index_bk.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/home/index_bk.html.erb" />
|
||||
<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/" />
|
||||
@@ -20,26 +31,16 @@
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file leaf-file-name="load_commissioners.html.erb" pinned="false" current-in-tab="true">
|
||||
<file leaf-file-name="load_commissioners.html.erb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/load_commissioners.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="418">
|
||||
<caret line="212" column="33" lean-forward="false" selection-start-line="212" selection-start-column="33" selection-end-line="212" selection-end-column="33" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="_commissioners.html.erb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/_commissioners.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="90">
|
||||
<caret line="5" column="44" lean-forward="false" selection-start-line="5" selection-start-column="44" selection-end-line="5" selection-end-column="44" />
|
||||
<state relative-caret-position="353">
|
||||
<caret line="174" column="74" lean-forward="true" selection-start-line="174" selection-start-column="74" selection-end-line="174" selection-end-column="74" />
|
||||
<folding>
|
||||
<element signature="n#style#0;n#div#0;n#div#1;n#div#0;n#!!top" expanded="true" />
|
||||
<element signature="n#style#0;n#div#0;n#div#0;n#!!top" expanded="true" />
|
||||
<element signature="n#style#0;n#div#0;n#div#1;n#div#0;n#div#0;n#div#0;n#!!top" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@@ -48,28 +49,88 @@
|
||||
<file leaf-file-name="commissions_controller.rb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/origami/commissions_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="191">
|
||||
<caret line="78" column="0" lean-forward="true" selection-start-line="78" selection-start-column="0" selection-end-line="78" selection-end-column="0" />
|
||||
<state relative-caret-position="605">
|
||||
<caret line="87" column="92" lean-forward="false" selection-start-line="87" selection-start-column="92" selection-end-line="87" selection-end-column="92" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="index.html.erb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/app/views/origami/home/index.html.erb">
|
||||
<file leaf-file-name="product_commissions_controller.rb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/origami/product_commissions_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-436">
|
||||
<caret line="64" column="18" lean-forward="false" selection-start-line="64" selection-start-column="18" selection-end-line="64" selection-end-column="18" />
|
||||
<state relative-caret-position="356">
|
||||
<caret line="79" column="24" lean-forward="true" selection-start-line="79" selection-start-column="24" selection-end-line="79" selection-end-column="24" />
|
||||
<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">
|
||||
<file leaf-file-name="20170823034141_create_product_commissions.rb" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170823034141_create_product_commissions.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="469">
|
||||
<caret line="334" column="12" lean-forward="false" selection-start-line="334" selection-start-column="12" selection-end-line="334" selection-end-column="12" />
|
||||
<state relative-caret-position="18">
|
||||
<caret line="1" column="47" lean-forward="true" selection-start-line="1" selection-start-column="47" selection-end-line="1" selection-end-column="47" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="commissioner.rb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/app/models/commissioner.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="72">
|
||||
<caret line="4" column="2" lean-forward="false" selection-start-line="4" selection-start-column="2" selection-end-line="4" selection-end-column="31" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="commission.rb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/app/models/commission.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="54">
|
||||
<caret line="3" column="31" lean-forward="false" selection-start-line="3" selection-start-column="31" selection-end-line="3" selection-end-column="31" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="product_commission.rb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/app/models/product_commission.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="90">
|
||||
<caret line="5" column="16" lean-forward="false" selection-start-line="5" selection-start-column="16" selection-end-line="5" selection-end-column="16" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="sale.rb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/app/models/sale.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="108">
|
||||
<caret line="6" column="25" lean-forward="true" selection-start-line="6" selection-start-column="25" selection-end-line="6" selection-end-column="25" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="sale_item.rb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/app/models/sale_item.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="126">
|
||||
<caret line="7" column="31" lean-forward="false" selection-start-line="7" selection-start-column="31" selection-end-line="7" selection-end-column="31" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="menu_item.rb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/app/models/menu_item.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="108">
|
||||
<caret line="6" column="31" lean-forward="false" selection-start-line="6" selection-start-column="31" selection-end-line="6" selection-end-column="31" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -92,6 +153,8 @@
|
||||
<find>sale_edit#edit</find>
|
||||
<find>@saleobj</find>
|
||||
<find>edit</find>
|
||||
<find>sale_item</find>
|
||||
<find>commissioner</find>
|
||||
</findStrings>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
@@ -100,12 +163,6 @@
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="CHANGED_PATHS">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/app/views/origami/table_invoices/show.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/controllers/origami/table_invoices_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/app/controllers/origami/void_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/app/controllers/origami/home_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/payments/show.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/home/index.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/rooms/show.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/orders/show.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/sales/show.html.erb" />
|
||||
@@ -116,26 +173,21 @@
|
||||
<option value="$PROJECT_DIR$/app/controllers/origami/sale_edit_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/.gitignore" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20170818051922_create_commissioner.rb" />
|
||||
<option value="$PROJECT_DIR$/app/models/sale.rb" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20170818090115_create_commissioners.rb" />
|
||||
<option value="$PROJECT_DIR$/app/controllers/origami/commissioners_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/commissioners/edit.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/commissioners/new.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/commissions/edit.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/commissions/new.html.erb" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20170822034139_create_product_commissions.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/home/index.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/layouts/_header.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/home/dashboard.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/models/employee.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/commissioners/_form.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/models/commissioner.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/commissioners/show.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/commissioners/_commissioners.html.erb" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20170821093252_create_commissions.rb" />
|
||||
<option value="$PROJECT_DIR$/app/models/commission.rb" />
|
||||
<option value="$PROJECT_DIR$/app/models/product.rb" />
|
||||
<option value="$PROJECT_DIR$/app/models/menu_item.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/commissions/_form.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/commissions/index.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/commissions/show.html.erb" />
|
||||
@@ -145,11 +197,22 @@
|
||||
<option value="$PROJECT_DIR$/app/views/origami/commissioners/index.html.erb" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20170823075203_create_in_juties.rb" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20170823081747_create_in_juties.rb" />
|
||||
<option value="$PROJECT_DIR$/config/routes.rb" />
|
||||
<option value="$PROJECT_DIR$/app/controllers/origami/in_juties_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/app/controllers/origami/commissions_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/commissions/_commissioners.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/home/show.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/home/index_bk.html.erb" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20170822034139_create_product_commissions.rb" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20170823034140_create_product_commissions.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/commissions/_commissioners.html.erb" />
|
||||
<option value="$PROJECT_DIR$/config/routes.rb" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20170823034141_create_product_commissions.rb" />
|
||||
<option value="$PROJECT_DIR$/app/models/product_commission.rb" />
|
||||
<option value="$PROJECT_DIR$/app/models/commission.rb" />
|
||||
<option value="$PROJECT_DIR$/app/models/commissioner.rb" />
|
||||
<option value="$PROJECT_DIR$/app/models/menu_item.rb" />
|
||||
<option value="$PROJECT_DIR$/app/models/sale_item.rb" />
|
||||
<option value="$PROJECT_DIR$/app/models/sale.rb" />
|
||||
<option value="$PROJECT_DIR$/app/controllers/origami/commissions_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/app/controllers/origami/product_commissions_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/commissions/load_commissioners.html.erb" />
|
||||
</list>
|
||||
</option>
|
||||
@@ -211,6 +274,12 @@
|
||||
<item name="controllers" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="origami" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="sxrestaurant" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="sxrestaurant" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="app" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="models" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="sxrestaurant" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="sxrestaurant" type="462c0819:PsiDirectoryNode" />
|
||||
@@ -605,24 +674,26 @@
|
||||
<workItem from="1503328001970" duration="20307000" />
|
||||
<workItem from="1503406983258" duration="261000" />
|
||||
<workItem from="1503457057830" duration="7166000" />
|
||||
<workItem from="1503472116907" duration="9446000" />
|
||||
<workItem from="1503472116907" duration="36775000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="90588000" />
|
||||
<option name="totallyTimeSpent" value="117917000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="1442" y="22" width="1920" height="721" extended-state="0" />
|
||||
<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.19169329" 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.32978722" sideWeight="0.5" order="10" 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="Version Control" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.49160305" sideWeight="0.5" order="7" 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.32671756" 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.49160305" sideWeight="0.5" order="7" 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="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="9" 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.32977098" sideWeight="0.5" order="9" 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="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" />
|
||||
<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" />
|
||||
@@ -631,7 +702,6 @@
|
||||
<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="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="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3277439" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<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" />
|
||||
</layout>
|
||||
</component>
|
||||
@@ -646,50 +716,6 @@
|
||||
<watches-manager />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/app/models/sale.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="303">
|
||||
<caret line="269" column="45" lean-forward="false" selection-start-line="269" selection-start-column="45" selection-end-line="269" selection-end-column="45" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170403155230_create_employees.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="270">
|
||||
<caret line="15" column="0" lean-forward="false" selection-start-line="15" selection-start-column="0" selection-end-line="15" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170818090115_create_commissioners.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="126">
|
||||
<caret line="7" column="26" lean-forward="true" selection-start-line="3" selection-start-column="6" selection-end-line="7" selection-end-column="26" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/cashier_terminal.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" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/origami/cash_outs_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="57" lean-forward="false" selection-start-line="0" selection-start-column="36" selection-end-line="0" selection-end-column="57" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/booking_order.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" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/.gitignore">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="471">
|
||||
@@ -747,14 +773,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170822034139_create_product_commissions.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="108">
|
||||
<caret line="6" column="23" lean-forward="true" selection-start-line="6" selection-start-column="23" selection-end-line="6" selection-end-column="23" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/origami/sale_edit/apply_void.json.jbuilder">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
@@ -801,6 +819,7 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="36">
|
||||
<caret line="2" column="25" lean-forward="false" selection-start-line="2" selection-start-column="2" selection-end-line="2" selection-end-column="25" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@@ -822,13 +841,6 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="504">
|
||||
<caret line="28" column="34" lean-forward="false" selection-start-line="28" selection-start-column="34" selection-end-line="28" selection-end-column="34" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170821093252_create_commissions.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="90">
|
||||
<caret line="5" column="31" lean-forward="true" selection-start-line="5" selection-start-column="31" selection-end-line="5" selection-end-column="31" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -840,14 +852,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/menu_item.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="68">
|
||||
<caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/index.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="279">
|
||||
@@ -873,6 +877,7 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="501">
|
||||
<caret line="117" column="32" lean-forward="false" selection-start-line="117" selection-start-column="32" selection-end-line="117" selection-end-column="32" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@@ -887,13 +892,7 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="90">
|
||||
<caret line="5" column="32" lean-forward="false" selection-start-line="5" selection-start-column="32" selection-end-line="5" selection-end-column="32" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/commission.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="18">
|
||||
<caret line="1" column="50" lean-forward="true" selection-start-line="1" selection-start-column="50" selection-end-line="1" selection-end-column="50" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@@ -901,13 +900,6 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="135">
|
||||
<caret line="20" column="9" lean-forward="true" selection-start-line="20" selection-start-column="9" selection-end-line="20" selection-end-column="9" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/commissioner.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="90">
|
||||
<caret line="5" column="0" lean-forward="false" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -936,14 +928,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/config/routes.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="410">
|
||||
<caret line="176" column="15" lean-forward="false" selection-start-line="176" selection-start-column="15" selection-end-line="176" selection-end-column="15" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/origami/in_juties_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="18">
|
||||
@@ -976,23 +960,39 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/origami/commissions_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="191">
|
||||
<caret line="78" column="0" lean-forward="true" selection-start-line="78" selection-start-column="0" selection-end-line="78" 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="-436">
|
||||
<state relative-caret-position="-285">
|
||||
<caret line="64" column="18" lean-forward="false" selection-start-line="64" selection-start-column="18" selection-end-line="64" selection-end-column="18" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/origami/home/index_bk.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="427">
|
||||
<caret line="245" column="76" lean-forward="false" selection-start-line="245" selection-start-column="76" selection-end-line="245" selection-end-column="76" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170403161857_create_sale_items.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="180">
|
||||
<caret line="10" column="85" lean-forward="true" selection-start-line="10" selection-start-column="85" selection-end-line="10" selection-end-column="85" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170821093252_create_commissions.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="90">
|
||||
<caret line="5" column="31" lean-forward="true" selection-start-line="5" selection-start-column="31" selection-end-line="5" selection-end-column="31" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/_commissioners.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" />
|
||||
@@ -1002,26 +1002,107 @@
|
||||
</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="469">
|
||||
<caret line="334" column="12" lean-forward="false" selection-start-line="334" selection-start-column="12" selection-end-line="334" selection-end-column="12" />
|
||||
<state relative-caret-position="80">
|
||||
<caret line="345" column="8" lean-forward="true" selection-start-line="345" selection-start-column="8" selection-end-line="345" selection-end-column="8" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/_commissioners.html.erb">
|
||||
<entry file="file://$PROJECT_DIR$/config/routes.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="235">
|
||||
<caret line="92" column="85" lean-forward="true" selection-start-line="92" selection-start-column="85" selection-end-line="92" selection-end-column="85" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/promotion.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/models/commission.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="54">
|
||||
<caret line="3" column="31" lean-forward="false" selection-start-line="3" selection-start-column="31" selection-end-line="3" selection-end-column="31" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/commissioner.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="72">
|
||||
<caret line="4" column="2" lean-forward="false" selection-start-line="4" selection-start-column="2" selection-end-line="4" selection-end-column="31" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/menu_item.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="108">
|
||||
<caret line="6" column="31" lean-forward="false" selection-start-line="6" selection-start-column="31" selection-end-line="6" selection-end-column="31" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/sale_item.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="126">
|
||||
<caret line="7" column="31" lean-forward="false" selection-start-line="7" selection-start-column="31" selection-end-line="7" selection-end-column="31" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/sale.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="108">
|
||||
<caret line="6" column="25" lean-forward="true" selection-start-line="6" selection-start-column="25" selection-end-line="6" selection-end-column="25" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/product_commission.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="90">
|
||||
<caret line="5" column="44" lean-forward="false" selection-start-line="5" selection-start-column="44" selection-end-line="5" selection-end-column="44" />
|
||||
<folding>
|
||||
<element signature="n#style#0;n#div#0;n#div#1;n#div#0;n#!!top" expanded="true" />
|
||||
</folding>
|
||||
<caret line="5" column="16" lean-forward="false" selection-start-line="5" selection-start-column="16" selection-end-line="5" selection-end-column="16" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/origami/commissions_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="605">
|
||||
<caret line="87" column="92" lean-forward="false" selection-start-line="87" selection-start-column="92" selection-end-line="87" selection-end-column="92" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/load_commissioners.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="418">
|
||||
<caret line="212" column="33" lean-forward="false" selection-start-line="212" selection-start-column="33" selection-end-line="212" selection-end-column="33" />
|
||||
<state relative-caret-position="353">
|
||||
<caret line="174" column="74" lean-forward="true" selection-start-line="174" selection-start-column="74" selection-end-line="174" selection-end-column="74" />
|
||||
<folding>
|
||||
<element signature="n#style#0;n#div#0;n#div#0;n#!!top" expanded="true" />
|
||||
<element signature="n#style#0;n#div#0;n#div#1;n#div#0;n#div#0;n#div#0;n#!!top" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/origami/product_commissions_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="356">
|
||||
<caret line="79" column="24" lean-forward="true" selection-start-line="79" selection-start-column="24" selection-end-line="79" selection-end-column="24" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170823034141_create_product_commissions.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="18">
|
||||
<caret line="1" column="47" lean-forward="true" selection-start-line="1" selection-start-column="47" selection-end-line="1" selection-end-column="47" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
||||
@@ -74,13 +74,18 @@ class Origami::CommissionsController < BaseOrigamiController
|
||||
def select_sale_item
|
||||
# byebug
|
||||
sale_item_id = params[:sale_item_id]
|
||||
@sale_item = SaleItem.find_by_sale_item_id(sale_item_id)
|
||||
@selected_sale_item = SaleItem.find_by_sale_item_id(sale_item_id)
|
||||
@product_commission = ProductCommission.find_by_sale_item_id(@selected_sale_item.id)
|
||||
unless @product_commission.nil?
|
||||
selected_commissioner = @product_commission.commissioner
|
||||
end
|
||||
@commissioners = Commissioner.active.all
|
||||
|
||||
respond_to do |format|
|
||||
format.json {render json: @commissioners}
|
||||
# format.html {render @commissioners}
|
||||
end
|
||||
# respond_to do |format|
|
||||
# format.json {render json: {[@commissioners],[@selected_sale_item]}}
|
||||
# # format.html {render @commissioners}
|
||||
# end
|
||||
render json: {commissioner: @commissioners, selected_commissioner: selected_commissioner}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -28,11 +28,11 @@ class Origami::ProductCommissionsController < ApplicationController
|
||||
|
||||
respond_to do |format|
|
||||
if @product_commission.save
|
||||
format.html { redirect_to @product_commission, notice: 'Product commission was successfully created.' }
|
||||
format.json { render :show, status: :created, location: @product_commission }
|
||||
format.html {redirect_to @product_commission, notice: 'Product commission was successfully created.'}
|
||||
format.json {render :show, status: :created, location: @product_commission}
|
||||
else
|
||||
format.html { render :new }
|
||||
format.json { render json: @product_commission.errors, status: :unprocessable_entity }
|
||||
format.html {render :new}
|
||||
format.json {render json: @product_commission.errors, status: :unprocessable_entity}
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -42,11 +42,11 @@ class Origami::ProductCommissionsController < ApplicationController
|
||||
def update
|
||||
respond_to do |format|
|
||||
if @product_commission.update(product_commission_params)
|
||||
format.html { redirect_to @product_commission, notice: 'Product commission was successfully updated.' }
|
||||
format.json { render :show, status: :ok, location: @product_commission }
|
||||
format.html {redirect_to @product_commission, notice: 'Product commission was successfully updated.'}
|
||||
format.json {render :show, status: :ok, location: @product_commission}
|
||||
else
|
||||
format.html { render :edit }
|
||||
format.json { render json: @product_commission.errors, status: :unprocessable_entity }
|
||||
format.html {render :edit}
|
||||
format.json {render json: @product_commission.errors, status: :unprocessable_entity}
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -56,19 +56,62 @@ class Origami::ProductCommissionsController < ApplicationController
|
||||
def destroy
|
||||
@product_commission.destroy
|
||||
respond_to do |format|
|
||||
format.html { redirect_to product_commissions_url, notice: 'Product commission was successfully destroyed.' }
|
||||
format.json { head :no_content }
|
||||
format.html {redirect_to product_commissions_url, notice: 'Product commission was successfully destroyed.'}
|
||||
format.json {head :no_content}
|
||||
end
|
||||
end
|
||||
|
||||
def set_commissioner_to_sale_item
|
||||
deselect = false
|
||||
sale_item_id = params[:sale_item_id]
|
||||
commissioner_id = params[:commissioner_id]
|
||||
@sale_item = SaleItem.find(sale_item_id)
|
||||
@menu_item = MenuItem.find_by_item_code(@sale_item.product_code)
|
||||
@commission = Commission.where('product_id = ? AND is_active = ?', @menu_item.id, true).take
|
||||
@commissioner = Commissioner.where('id = ? AND is_active = ?', commissioner_id, true).take
|
||||
@product_commission = ProductCommission.where('sale_item_id = ?', @sale_item.id).take
|
||||
# byebug
|
||||
if !@product_commission.nil?
|
||||
if @product_commission.commissioner_id == @commissioner.id
|
||||
@product_commission.destroy
|
||||
deselect = true
|
||||
else
|
||||
@product_commission.commissioner_id = @commissioner.id
|
||||
deselect = false
|
||||
end
|
||||
else
|
||||
@product_commission = ProductCommission.new
|
||||
@product_commission.product_id = @menu_item.id
|
||||
unless @commission.nil?
|
||||
@product_commission.commission_id = @commission.id
|
||||
if @commission.commission_type == 'Percentage'
|
||||
@product_commission.price = @sale_item.unit_price * (@commission.amount / 100.0)
|
||||
@product_commission.amount = @product_commission.price * @sale_item.qty
|
||||
elsif @commission.commission_type == 'Net Amount'
|
||||
@product_commission.price = @commission.amount
|
||||
@product_commission.amount = @product_commission.price * @sale_item.qty
|
||||
end
|
||||
end
|
||||
@product_commission.commissioner_id = @commissioner.id
|
||||
@product_commission.qty = @sale_item.qty
|
||||
@product_commission.sale_id = @sale_item.sale_id
|
||||
@product_commission.sale_item_id = @sale_item.sale_item_id
|
||||
end
|
||||
if @product_commission.save
|
||||
render json: {status: true, deselect: deselect}
|
||||
else
|
||||
render json: {status: false, deselect: deselect}
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
# Use callbacks to share common setup or constraints between actions.
|
||||
def set_product_commission
|
||||
@product_commission = ProductCommission.find(params[:id])
|
||||
end
|
||||
# Use callbacks to share common setup or constraints between actions.
|
||||
def set_product_commission
|
||||
@product_commission = ProductCommission.find(params[:id])
|
||||
end
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def product_commission_params
|
||||
params.fetch(:product_commission, {})
|
||||
end
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def product_commission_params
|
||||
params.fetch(:product_commission, {})
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
class Commission < ApplicationRecord
|
||||
belongs_to :menu_item, foreign_key: 'product_id'
|
||||
has_many :commissioners
|
||||
has_many :product_commissions
|
||||
end
|
||||
|
||||
@@ -2,5 +2,6 @@ class Commissioner < ApplicationRecord
|
||||
belongs_to :employee, foreign_key: 'emp_id'
|
||||
belongs_to :commission, foreign_key: 'commission_type'
|
||||
has_many :in_juties
|
||||
has_many :product_commissions
|
||||
scope :active, -> { where(is_active: true) }
|
||||
end
|
||||
|
||||
@@ -4,6 +4,7 @@ class MenuItem < ApplicationRecord
|
||||
belongs_to :menu_category, :optional => true
|
||||
has_many :menu_item_instances
|
||||
has_many :commissions
|
||||
has_many :product_commissions
|
||||
|
||||
# belongs_to :parent, :class_name => "MenuItem", foreign_key: "menu_item_id", :optional => true
|
||||
# has_many :children, :class_name => "MenuItem", foreign_key: "menu_item_id"
|
||||
|
||||
@@ -1,2 +1,11 @@
|
||||
class ProductCommission < ApplicationRecord
|
||||
belongs_to :commission, foreign_key: 'commission_id'
|
||||
belongs_to :commissioner, foreign_key: 'commissioner_id'
|
||||
belongs_to :menu_item, foreign_key: 'product_id'
|
||||
belongs_to :sale_item, foreign_key: 'sale_item_id'
|
||||
belongs_to :sale, foreign_key: 'sale_id'
|
||||
|
||||
def self.check_product_commission(sale_item_id)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -13,6 +13,7 @@ class Sale < ApplicationRecord
|
||||
has_many :sale_payments
|
||||
has_many :sale_orders
|
||||
has_many :bookings
|
||||
has_many :product_commissions
|
||||
|
||||
scope :open_invoices, -> { where("sale_status = 'new' and receipt_date BETWEEN '#{DateTime.now.utc.end_of_day}' AND '#{DateTime.now.utc.beginning_of_day}'") }
|
||||
scope :complete_sale, -> { where("sale_status = 'completed' and receipt_date BETWEEN '#{DateTime.now.utc.beginning_of_day}' AND '#{DateTime.now.utc.end_of_day}'") }
|
||||
|
||||
@@ -5,6 +5,7 @@ class SaleItem < ApplicationRecord
|
||||
before_create :generate_custom_id
|
||||
|
||||
belongs_to :sale
|
||||
has_many :product_commissions
|
||||
|
||||
#compute items - discount, tax, price_change
|
||||
def compute_item
|
||||
@@ -80,7 +81,7 @@ class SaleItem < ApplicationRecord
|
||||
account_price[:amount] = account_price[:amount] + si.price
|
||||
price = price + si.price
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
rebate_arr.push(account_price)
|
||||
end
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div><strong id="order-title">COMMISSIONERS </strong></div>
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<div class="card-columns" id="commissioners" style="float: left; padding-top:10px; column-gap: 1.2rem; min-height:600px; max-height:600px; overflow-x:scroll;">
|
||||
<% @commissioners.each do |commissioner| %>
|
||||
<div class="card tables green text-white" data-id="<%= commissioner.id %>">
|
||||
<div class="card-block">
|
||||
<%= commissioner.name %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,11 +1,26 @@
|
||||
<div class="row">
|
||||
<!-- Column One -->
|
||||
<div class="col-lg-5 col-md-5 col-sm-5" style="height: 100%">
|
||||
<%= render 'origami/commissions/commissioners', commissioners: @commissioners %>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div><strong id="order-title">COMMISSIONERS </strong></div>
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<div class="card-columns" id="commissioners" style="float: left; padding-top:10px; column-gap: 1.2rem; min-height:600px; max-height:600px; overflow-x:scroll;">
|
||||
<% @commissioners.each do |commissioner| %>
|
||||
<div class="card tables green text-white commissioner" data-commissioner-id="<%= commissioner.id %>" data-commissioner-name="<%= commissioner.name %>">
|
||||
<div class="card-block">
|
||||
<%= commissioner.name %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Column Two -->
|
||||
<div class="col-lg-5 col-md-5 col-sm-5">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div><strong id="order-title">INVOICE DETAILS </strong></div>
|
||||
@@ -34,11 +49,10 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="4%">#</th>
|
||||
<th class="" width="60%">Items</th>
|
||||
<th style="" width="20%">QTY
|
||||
</td>
|
||||
<th class="" width="30%">Price
|
||||
</td>
|
||||
<th class="" width="40%">Items</th>
|
||||
<th style="" width="20%">QTY</th>
|
||||
<th class="" width="20%">Price</th>
|
||||
<th class="" width="20%">Commissioner</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -49,22 +63,26 @@
|
||||
count += 1
|
||||
sub_total = sub_total + sale_item.price
|
||||
%>
|
||||
<input type="hidden" id="sale_id" value="<%= @saleobj.sale_id %>">
|
||||
<input type="hidden" id="sale_id" class="sale_id" value="<%= @saleobj.sale_id %>">
|
||||
<%
|
||||
# Can't check for discount
|
||||
unless sale_item.price == 0
|
||||
%>
|
||||
<tr id="sale_item" data-sale-item="<%= sale_item.sale_item_id %>">
|
||||
<tr id="sale_item" class="sale_item" data-sale-item="<%= sale_item.sale_item_id %>">
|
||||
<td width="4%"><%= count %></td>
|
||||
<td class='' width="60%">
|
||||
<td class='product_name' width="40%">
|
||||
<%= sale_item.product_name %>
|
||||
</td>
|
||||
<td class='' width="20%">
|
||||
<td class='qty' width="20%">
|
||||
<%= sale_item.qty %>
|
||||
</td>
|
||||
<td class='' width="20%">
|
||||
<td class='unit_price' width="20%">
|
||||
<%= sale_item.unit_price %>
|
||||
</td>
|
||||
<td class='commissioner' width="20%">
|
||||
<% product_commission = ProductCommission.find_by_sale_item_id(sale_item.id) %>
|
||||
<%= product_commission.commissioner.name rescue '-' %>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
end
|
||||
@@ -87,135 +105,78 @@
|
||||
</div>
|
||||
|
||||
<!-- Column Three -->
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<!-- 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='apply'>Apply</button>
|
||||
<!--<button type="button" class="btn btn-primary btn-block" id='apply'>Apply</button>-->
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// Bill Request
|
||||
$(document).ready(function () {
|
||||
var selected_sale_item = 0;
|
||||
|
||||
$(".update").on('click', function () {
|
||||
var sale_item_id = $(this).attr('data-id');
|
||||
var qty = $('#' + sale_item_id + "_qty").val();
|
||||
var price = $('#' + sale_item_id + "_price").val();
|
||||
console.log(qty + "|" + price)
|
||||
var ajax_url = "/origami/item_edit";
|
||||
$('.sale_item').on('click', function () {
|
||||
$('#order-items-table tr').siblings().css( "background-color", "white" );
|
||||
this.style.backgroundColor = 'lightgray';
|
||||
var sale_item_id = this.getAttribute('data-sale-item');
|
||||
var ajax_url = "/origami/select_sale_item";
|
||||
selected_sale_item = sale_item_id;
|
||||
localStorage.setItem("selected_sale_item", selected_sale_item);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: 'sale_item_id=' + sale_item_id + "&update_qty=" + qty + "&update_price=" + price,
|
||||
data: 'sale_item_id=' + sale_item_id,
|
||||
success: function (result) {
|
||||
$.confirm({
|
||||
title: 'Alert!',
|
||||
content: 'Qty and Price was successfully Updated',
|
||||
buttons: {
|
||||
|
||||
confirm: {
|
||||
text: 'Ok',
|
||||
btnClass: 'btn-green btn-lg',
|
||||
action: function () {
|
||||
location.reload();
|
||||
if (result != null){
|
||||
$('#commissioners').empty();
|
||||
result.commissioner.forEach(function (c) {
|
||||
if (result.selected_commissioner != null){
|
||||
if (c.id == result.selected_commissioner.id){
|
||||
sale_item = "<div class=\"card tables blue text-white commissioner\" onclick=\"click_commissioner(this)\" data-commissioner-id=" + c.id + " data-commissioner-name=\"" + c.name + "\">" + "<div class=\"card-block\">" + c.name + "</div>" + "</div>"
|
||||
}else {
|
||||
sale_item = "<div class=\"card tables green text-white commissioner\" onclick=\"click_commissioner(this)\" data-commissioner-id=" + c.id + " data-commissioner-name=\"" + c.name + "\">" + "<div class=\"card-block\">" + c.name + "</div>" + "</div>"
|
||||
}
|
||||
}else {
|
||||
sale_item = "<div class=\"card tables green text-white commissioner\" onclick=\"click_commissioner(this)\" data-commissioner-id=" + c.id + " data-commissioner-name=\"" + c.name + "\">" + "<div class=\"card-block\">" + c.name + "</div>" + "</div>"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#commissioners').append(sale_item);
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.void').on('click', function () {
|
||||
var sale_item_id = $(this).attr('data-id');
|
||||
var ajax_url = "/origami/item_void";
|
||||
$.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;
|
||||
});
|
||||
|
||||
$('.foc').on('click', function () {
|
||||
var sale_item_id = $(this).attr('data-id');
|
||||
var ajax_url = "/origami/item_foc";
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: 'sale_item_id=' + sale_item_id,
|
||||
success: function (result) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
$('.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();
|
||||
}
|
||||
});
|
||||
})
|
||||
$('.commissioner').on('click', function () {
|
||||
alert('click');
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
|
||||
$('#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";
|
||||
function click_commissioner(commissioner) {
|
||||
var commissioner_id = commissioner.getAttribute('data-commissioner-id');
|
||||
var selected_sale_item = localStorage.getItem("selected_sale_item");
|
||||
$(commissioner).removeClass("green").addClass("blue");
|
||||
$(commissioner).siblings().removeClass("blue").addClass("green");
|
||||
$("tr[data-sale-item=" + selected_sale_item + "] td.commissioner").text(commissioner.getAttribute('data-commissioner-name'));
|
||||
var ajax_url = "/origami/select_commissioner";
|
||||
var param_data = 'sale_item_id=' + selected_sale_item + '&commissioner_id=' + commissioner_id;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: 'sale_id=' + sale_id,
|
||||
data: param_data,
|
||||
success: function (result) {
|
||||
location.reload();
|
||||
console.log(selected_sale_item + "," +commissioner_id);
|
||||
if(result.deselect == true){
|
||||
$(commissioner).removeClass("blue").addClass("green");
|
||||
$("tr[data-sale-item=" + selected_sale_item + "] td.commissioner").text('-');
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
};
|
||||
|
||||
$('#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;
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
$('#sale_item').on('click', function () {
|
||||
var sale_item_id = this.getAttribute('data-sale-item');
|
||||
var ajax_url = "/origami/select_sale_item";
|
||||
var table_id = '<%= @table_id %>'
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: 'sale_item_id=' + sale_item_id,
|
||||
success: function (result) {
|
||||
$('#commissioners').empty();
|
||||
result.forEach(function (t) {
|
||||
sale_item = "<div class=\"card tables green text-white\" data-id=" + t.id + ">" + "<div class=\"card-block\">" + t.name + "</div>" + "</div>"
|
||||
$('#commissioners').append(sale_item);
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
<p class="hidden orders-id"><%= unique_id %></p>
|
||||
<p class="hidden customer-id"><%= customer_id %></p>
|
||||
<p class="hidden order-cid"><%= odr.order_id %></p>
|
||||
<h4 class="card-title orders-table"><%= odr.table_name %></h4
|
||||
<h4 class="card-title orders-table"><%= odr.table_name %></h4>
|
||||
<p class="card-text">
|
||||
Receipt No :
|
||||
<span class="orders-receipt-no">
|
||||
|
||||
@@ -89,6 +89,8 @@ Rails.application.routes.draw do
|
||||
# commissions
|
||||
get '/table/:table_id/sale/:sale_id/load_commissioners' => 'commissions#load_commissioners', as: 'load_commissioners'
|
||||
post 'select_sale_item' => 'commissions#select_sale_item'
|
||||
# product_commission
|
||||
post 'select_commissioner' => 'product_commissions#set_commissioner_to_sale_item'
|
||||
|
||||
get 'table/:dining_id/movetable' => "movetable#move_dining"
|
||||
get 'table/:dining_id/moveroom' => "moveroom#move_dining"
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
class CreateProductCommissions < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :product_commissions do |t|
|
||||
t.string :product_code
|
||||
t.integer :commission_id
|
||||
t.integer :qty
|
||||
t.string :sale_id
|
||||
t.string :sale_item_id
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
16
db/migrate/20170823034141_create_product_commissions.rb
Normal file
16
db/migrate/20170823034141_create_product_commissions.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
class CreateProductCommissions < ActiveRecord::Migration[5.1]
|
||||
# rake db:migrate:down VERSION=20170823034141
|
||||
def change
|
||||
create_table :product_commissions do |t|
|
||||
t.string :product_id
|
||||
t.integer :commission_id
|
||||
t.integer :commissioner_id
|
||||
t.decimal :qty, :precision => 10, :scale => 2, :default => 0.00
|
||||
t.string :sale_id
|
||||
t.string :sale_item_id
|
||||
t.decimal :price, :precision => 10, :scale => 2, :default => 0.00
|
||||
t.decimal :amount, :precision => 10, :scale => 2, :default => 0.00
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user