Merge branch 'august_spring' of bitbucket.org:code2lab/sxrestaurant into august_spring
This commit is contained in:
2
.idea/.generators
generated
2
.idea/.generators
generated
@@ -5,4 +5,4 @@ You are allowed to:
|
|||||||
2. Remove generators
|
2. Remove generators
|
||||||
3. Add installed generators
|
3. Add installed generators
|
||||||
To add new installed generators automatically delete this file and reload the project.
|
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>
|
--><GeneratorsGroup><Generator name="assets" /><Generator name="cancan:ability" /><Generator name="channel" /><Generator name="coffee:assets" /><Generator name="controller" /><Generator name="factory_girl:model" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="jbuilder" /><Generator name="job" /><Generator name="js:assets" /><Generator name="kaminari:config" /><Generator name="kaminari:views" /><Generator name="mailer" /><Generator name="migration" /><Generator name="model" /><Generator name="nested_form:install" /><Generator name="resource" /><Generator name="rspec:controller" /><Generator name="rspec:feature" /><Generator name="rspec:helper" /><Generator name="rspec:install" /><Generator name="rspec:integration" /><Generator name="rspec:job" /><Generator name="rspec:mailer" /><Generator name="rspec:model" /><Generator name="rspec:observer" /><Generator name="rspec:request" /><Generator name="rspec:scaffold" /><Generator name="rspec:view" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="sidekiq:worker" /><Generator name="simple_form:install" /><Generator name="system_test" /><Generator name="task" /><Generator name="test_unit:controller" /><Generator name="test_unit:generator" /><Generator name="test_unit:helper" /><Generator name="test_unit:integration" /><Generator name="test_unit:job" /><Generator name="test_unit:mailer" /><Generator name="test_unit:model" /><Generator name="test_unit:plugin" /><Generator name="test_unit:scaffold" /><Generator name="test_unit:system" /><Generator name="uploader" /></GeneratorsGroup></Settings>
|
||||||
|
|||||||
4
.idea/sxrestaurant.iml
generated
4
.idea/sxrestaurant.iml
generated
@@ -52,7 +52,6 @@
|
|||||||
<orderEntry type="library" scope="PROVIDED" name="connection_pool (v2.2.1, 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="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="database_cleaner (v1.6.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="datetimepicker-rails (v@36d21c, 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="diff-lcs (v1.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="erubi (v1.6.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="erubi (v1.6.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="execjs (v2.7.0, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="execjs (v2.7.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
@@ -66,7 +65,6 @@
|
|||||||
<orderEntry type="library" scope="PROVIDED" name="httparty (v0.15.5, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="httparty (v0.15.5, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.8.6, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="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="jbuilder (v2.7.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="jquery-datatables-rails (v3.4.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-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-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="jquery-ui-rails (v6.0.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
@@ -82,7 +80,7 @@
|
|||||||
<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="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="mini_portile2 (v2.2.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.10.3, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.10.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="momentjs-rails (v2.17.1@ea58a2, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="momentjs-rails (v2.17.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.12.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="multi_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="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="mysql2 (v0.4.6, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
|
|||||||
425
.idea/workspace.xml
generated
425
.idea/workspace.xml
generated
@@ -3,10 +3,14 @@
|
|||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="89ca96af-a0e4-4fe4-b9a3-9969f22d7079" name="Default" comment="">
|
<list default="true" id="89ca96af-a0e4-4fe4-b9a3-9969f22d7079" name="Default" comment="">
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/dump.rdb" afterPath="$PROJECT_DIR$/dump.rdb" />
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/dump.rdb" afterPath="$PROJECT_DIR$/dump.rdb" />
|
||||||
<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$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/reports/commission_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/reports/commission_controller.rb" />
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/origami/in_juties_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/origami/in_juties_controller.rb" />
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/reports/commission/_commission_report_filter.html.erb" afterPath="$PROJECT_DIR$/app/views/reports/commission/_commission_report_filter.html.erb" />
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/in_juties/_assign_in_juty.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/in_juties/_assign_in_juty.html.erb" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/in_juties/_edit_in_juty.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/in_juties/_edit_in_juty.html.erb" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/in_juties/_form.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/in_juties/_form.html.erb" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/in_juties/index.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/in_juties/index.html.erb" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/in_juties/index_in_juty.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/in_juties/index_in_juty.html.erb" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/in_juties/new.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/in_juties/new.html.erb" />
|
||||||
</list>
|
</list>
|
||||||
<ignored path="$PROJECT_DIR$/.bundle/" />
|
<ignored path="$PROJECT_DIR$/.bundle/" />
|
||||||
<ignored path="$PROJECT_DIR$/components/" />
|
<ignored path="$PROJECT_DIR$/components/" />
|
||||||
@@ -21,7 +25,7 @@
|
|||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="CoverageDataManager">
|
<component name="CoverageDataManager">
|
||||||
<SUITE FILE_PATH="coverage/sxrestaurant@Development__sxrestaurant.coverage" NAME="Development: sxrestaurant Coverage Results" MODIFIED="1504001134539" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="sxrestaurant" />
|
<SUITE FILE_PATH="coverage/sxrestaurant@Development__sxrestaurant.coverage" NAME="Development: sxrestaurant Coverage Results" MODIFIED="1504066735497" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="sxrestaurant" />
|
||||||
<SUITE FILE_PATH="coverage/sxrestaurant@db_migrate__sxrestaurant.coverage" NAME="db:migrate: sxrestaurant Coverage Results" MODIFIED="1503652404616" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="sxrestaurant" />
|
<SUITE FILE_PATH="coverage/sxrestaurant@db_migrate__sxrestaurant.coverage" NAME="db:migrate: sxrestaurant Coverage Results" MODIFIED="1503652404616" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="sxrestaurant" />
|
||||||
<SUITE FILE_PATH="coverage/sxrestaurant@Rails_console__sxrestaurant.coverage" NAME="Rails console: sxrestaurant Coverage Results" MODIFIED="1503651318886" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="sxrestaurant" />
|
<SUITE FILE_PATH="coverage/sxrestaurant@Rails_console__sxrestaurant.coverage" NAME="Rails console: sxrestaurant Coverage Results" MODIFIED="1503651318886" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="sxrestaurant" />
|
||||||
</component>
|
</component>
|
||||||
@@ -48,55 +52,76 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="FileEditorManager">
|
<component name="FileEditorManager">
|
||||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||||
|
<file leaf-file-name="in_juties_controller.rb" pinned="false" current-in-tab="true">
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/controllers/origami/in_juties_controller.rb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="452">
|
||||||
|
<caret line="29" column="0" lean-forward="true" selection-start-line="29" selection-start-column="0" selection-end-line="29" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="_assign_in_juty.html.erb" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/views/origami/in_juties/_assign_in_juty.html.erb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="-294">
|
||||||
|
<caret line="1" column="38" lean-forward="true" selection-start-line="1" selection-start-column="38" selection-end-line="1" selection-end-column="38" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="new.html.erb" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/views/origami/in_juties/new.html.erb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="144">
|
||||||
|
<caret line="8" column="55" lean-forward="false" selection-start-line="8" selection-start-column="55" selection-end-line="8" selection-end-column="55" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="_form.html.erb" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/views/origami/in_juties/_form.html.erb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="68">
|
||||||
|
<caret line="15" column="54" lean-forward="false" selection-start-line="15" selection-start-column="54" selection-end-line="15" selection-end-column="54" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="_edit_in_juty.html.erb" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/views/origami/in_juties/_edit_in_juty.html.erb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="198">
|
||||||
|
<caret line="11" column="29" lean-forward="true" selection-start-line="11" selection-start-column="29" selection-end-line="11" selection-end-column="29" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="index_in_juty.html.erb" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/views/origami/in_juties/index_in_juty.html.erb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="194">
|
||||||
|
<caret line="38" column="14" lean-forward="false" selection-start-line="38" selection-start-column="14" selection-end-line="38" selection-end-column="14" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#1270#1276#0#HTML" expanded="true" />
|
||||||
|
<element signature="e#1276#1282#0#HTML" expanded="true" />
|
||||||
|
<element signature="e#1370#1376#0#HTML" expanded="true" />
|
||||||
|
<element signature="e#1376#1382#0#HTML" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
<file leaf-file-name="index.html.erb" pinned="false" current-in-tab="false">
|
<file leaf-file-name="index.html.erb" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/reports/commission/index.html.erb">
|
<entry file="file://$PROJECT_DIR$/app/views/origami/in_juties/index.html.erb">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="412">
|
<state relative-caret-position="142">
|
||||||
<caret line="29" column="13" lean-forward="false" selection-start-line="29" selection-start-column="13" selection-end-line="29" selection-end-column="13" />
|
<caret line="56" column="21" lean-forward="true" selection-start-line="56" selection-start-column="12" selection-end-line="56" selection-end-column="21" />
|
||||||
<folding>
|
|
||||||
<element signature="n#style#0;n#tr#1;n#tbody#0;n#table#0;n#div#0;n#div#0;n#div#3;n#!!top" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file leaf-file-name="index.xls.erb" pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/reports/commission/index.xls.erb">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="126">
|
|
||||||
<caret line="7" column="13" lean-forward="false" selection-start-line="7" selection-start-column="13" selection-end-line="7" selection-end-column="13" />
|
|
||||||
<folding>
|
|
||||||
<element signature="n#style#0;n#tr#1;n#tbody#0;n#table#0;n#div#0;n#div#0;n#div#0;n#!!top" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file leaf-file-name="_commission_report_filter.html.erb" pinned="false" current-in-tab="true">
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/reports/commission/_commission_report_filter.html.erb">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="247">
|
|
||||||
<caret line="49" column="21" lean-forward="false" selection-start-line="49" selection-start-column="21" selection-end-line="49" selection-end-column="21" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file leaf-file-name="commission_controller.rb" pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/controllers/reports/commission_controller.rb">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="216">
|
|
||||||
<caret line="12" column="26" lean-forward="false" selection-start-line="12" selection-start-column="26" selection-end-line="12" selection-end-column="26" />
|
|
||||||
<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="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 />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
@@ -136,14 +161,6 @@
|
|||||||
<component name="IdeDocumentHistory">
|
<component name="IdeDocumentHistory">
|
||||||
<option name="CHANGED_PATHS">
|
<option name="CHANGED_PATHS">
|
||||||
<list>
|
<list>
|
||||||
<option value="$PROJECT_DIR$/app/views/origami/commissions/index.html.erb" />
|
|
||||||
<option value="$PROJECT_DIR$/app/views/origami/commissions/show.html.erb" />
|
|
||||||
<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$/app/controllers/origami/in_juties_controller.rb" />
|
|
||||||
<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/20170822034139_create_product_commissions.rb" />
|
||||||
<option value="$PROJECT_DIR$/db/migrate/20170823034140_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$/app/views/origami/commissions/_commissioners.html.erb" />
|
||||||
@@ -181,12 +198,20 @@
|
|||||||
<option value="$PROJECT_DIR$/app/models/product_commission.rb" />
|
<option value="$PROJECT_DIR$/app/models/product_commission.rb" />
|
||||||
<option value="$PROJECT_DIR$/app/views/reports/commission/index.html.erb" />
|
<option value="$PROJECT_DIR$/app/views/reports/commission/index.html.erb" />
|
||||||
<option value="$PROJECT_DIR$/app/views/reports/commission/index.xls.erb" />
|
<option value="$PROJECT_DIR$/app/views/reports/commission/index.xls.erb" />
|
||||||
<option value="$PROJECT_DIR$/app/assets/javascripts/application.js" />
|
|
||||||
<option value="$PROJECT_DIR$/app/assets/stylesheets/application.scss" />
|
|
||||||
<option value="$PROJECT_DIR$/Gemfile" />
|
|
||||||
<option value="$PROJECT_DIR$/Gemfile.lock" />
|
<option value="$PROJECT_DIR$/Gemfile.lock" />
|
||||||
<option value="$PROJECT_DIR$/app/controllers/reports/commission_controller.rb" />
|
<option value="$PROJECT_DIR$/app/controllers/reports/commission_controller.rb" />
|
||||||
<option value="$PROJECT_DIR$/app/views/reports/commission/_commission_report_filter.html.erb" />
|
<option value="$PROJECT_DIR$/app/views/reports/commission/_commission_report_filter.html.erb" />
|
||||||
|
<option value="$PROJECT_DIR$/Gemfile" />
|
||||||
|
<option value="$PROJECT_DIR$/app/assets/javascripts/application.js" />
|
||||||
|
<option value="$PROJECT_DIR$/app/assets/stylesheets/application.scss" />
|
||||||
|
<option value="$PROJECT_DIR$/app/views/settings/promotions/new.html.erb" />
|
||||||
|
<option value="$PROJECT_DIR$/app/views/origami/in_juties/_assign_in_juty.html.erb" />
|
||||||
|
<option value="$PROJECT_DIR$/app/views/origami/in_juties/new.html.erb" />
|
||||||
|
<option value="$PROJECT_DIR$/app/views/origami/in_juties/index.html.erb" />
|
||||||
|
<option value="$PROJECT_DIR$/app/views/origami/in_juties/_edit_in_juty.html.erb" />
|
||||||
|
<option value="$PROJECT_DIR$/app/views/origami/in_juties/index_in_juty.html.erb" />
|
||||||
|
<option value="$PROJECT_DIR$/app/views/origami/in_juties/_form.html.erb" />
|
||||||
|
<option value="$PROJECT_DIR$/app/controllers/origami/in_juties_controller.rb" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
@@ -211,6 +236,7 @@
|
|||||||
<option name="CUSTOM_FILTER" />
|
<option name="CUSTOM_FILTER" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectFrameBounds" extendedState="6">
|
<component name="ProjectFrameBounds" extendedState="6">
|
||||||
|
<option name="x" value="1440" />
|
||||||
<option name="y" value="22" />
|
<option name="y" value="22" />
|
||||||
<option name="width" value="1440" />
|
<option name="width" value="1440" />
|
||||||
<option name="height" value="834" />
|
<option name="height" value="834" />
|
||||||
@@ -258,14 +284,22 @@
|
|||||||
<item name="sxrestaurant" type="b2602c69:ProjectViewProjectNode" />
|
<item name="sxrestaurant" type="b2602c69:ProjectViewProjectNode" />
|
||||||
<item name="sxrestaurant" type="462c0819:PsiDirectoryNode" />
|
<item name="sxrestaurant" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="app" type="462c0819:PsiDirectoryNode" />
|
<item name="app" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="controllers" type="462c0819:PsiDirectoryNode" />
|
<item name="views" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="reports" type="462c0819:PsiDirectoryNode" />
|
|
||||||
</path>
|
</path>
|
||||||
<path>
|
<path>
|
||||||
<item name="sxrestaurant" type="b2602c69:ProjectViewProjectNode" />
|
<item name="sxrestaurant" type="b2602c69:ProjectViewProjectNode" />
|
||||||
<item name="sxrestaurant" type="462c0819:PsiDirectoryNode" />
|
<item name="sxrestaurant" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="app" type="462c0819:PsiDirectoryNode" />
|
<item name="app" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="views" type="462c0819:PsiDirectoryNode" />
|
<item name="views" 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="views" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="origami" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="in_juties" type="462c0819:PsiDirectoryNode" />
|
||||||
</path>
|
</path>
|
||||||
<path>
|
<path>
|
||||||
<item name="sxrestaurant" type="b2602c69:ProjectViewProjectNode" />
|
<item name="sxrestaurant" type="b2602c69:ProjectViewProjectNode" />
|
||||||
@@ -297,6 +331,14 @@
|
|||||||
<item name="settings" type="462c0819:PsiDirectoryNode" />
|
<item name="settings" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="commissions" type="462c0819:PsiDirectoryNode" />
|
<item name="commissions" type="462c0819:PsiDirectoryNode" />
|
||||||
</path>
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="sxrestaurant" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="sxrestaurant" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="app" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="views" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="settings" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="promotions" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
</expand>
|
</expand>
|
||||||
<select />
|
<select />
|
||||||
</subPane>
|
</subPane>
|
||||||
@@ -702,12 +744,12 @@
|
|||||||
<workItem from="1503457057830" duration="7166000" />
|
<workItem from="1503457057830" duration="7166000" />
|
||||||
<workItem from="1503472116907" duration="50209000" />
|
<workItem from="1503472116907" duration="50209000" />
|
||||||
<workItem from="1503843212665" duration="21267000" />
|
<workItem from="1503843212665" duration="21267000" />
|
||||||
<workItem from="1503909487511" duration="29840000" />
|
<workItem from="1503909487511" duration="50516000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TimeTrackingManager">
|
<component name="TimeTrackingManager">
|
||||||
<option name="totallyTimeSpent" value="182458000" />
|
<option name="totallyTimeSpent" value="203134000" />
|
||||||
</component>
|
</component>
|
||||||
<component name="TodoView">
|
<component name="TodoView">
|
||||||
<todo-panel id="selected-file">
|
<todo-panel id="selected-file">
|
||||||
@@ -719,20 +761,19 @@
|
|||||||
</todo-panel>
|
</todo-panel>
|
||||||
</component>
|
</component>
|
||||||
<component name="ToolWindowManager">
|
<component name="ToolWindowManager">
|
||||||
<frame x="0" y="22" width="1440" height="833" extended-state="6" />
|
<frame x="1440" y="22" width="1920" height="1058" extended-state="6" />
|
||||||
<editor active="true" />
|
|
||||||
<layout>
|
<layout>
|
||||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.27110156" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20181043" 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.32917964" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917964" 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="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.17412141" sideWeight="0.5" order="3" side_tool="false" 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.17412141" 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.3258786" sideWeight="0.5" order="1" 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.3258786" 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.4878049" sideWeight="0.5" order="7" 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.48701972" 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.3759086" sideWeight="0.5" order="2" 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.3759086" 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="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.4905149" 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.34994808" 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="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.39701897" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
<window_info id="Debug" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3561786" 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" />
|
<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="Messages" 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="8" side_tool="false" content_ui="tabs" />
|
<window_info id="Messages" 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="8" 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="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" />
|
||||||
@@ -750,80 +791,11 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="XDebuggerManager">
|
<component name="XDebuggerManager">
|
||||||
<breakpoint-manager>
|
<breakpoint-manager>
|
||||||
<option name="time" value="24" />
|
<option name="time" value="40" />
|
||||||
</breakpoint-manager>
|
</breakpoint-manager>
|
||||||
<watches-manager />
|
<watches-manager />
|
||||||
</component>
|
</component>
|
||||||
<component name="editorHistoryManager">
|
<component name="editorHistoryManager">
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/settings/commissions/_form.html.erb">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="108">
|
|
||||||
<caret line="6" column="4" lean-forward="false" selection-start-line="6" selection-start-column="4" selection-end-line="6" selection-end-column="127" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/assets/javascripts/CRM.js">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="324">
|
|
||||||
<caret line="18" column="21" lean-forward="true" selection-start-line="18" selection-start-column="21" selection-end-line="18" selection-end-column="21" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/crm/customers/_form.html.erb">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="33" lean-forward="false" selection-start-line="0" selection-start-column="33" selection-end-line="0" selection-end-column="33" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/CRM.scss">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="-913">
|
|
||||||
<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="269">
|
|
||||||
<caret line="579" column="40" lean-forward="false" selection-start-line="579" selection-start-column="33" selection-end-line="579" selection-end-column="40" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/origami.scss">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="386">
|
|
||||||
<caret line="176" column="16" lean-forward="true" selection-start-line="176" selection-start-column="16" selection-end-line="176" selection-end-column="16" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/settings.scss">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="653">
|
|
||||||
<caret line="89" column="16" lean-forward="false" selection-start-line="89" selection-start-column="16" selection-end-line="89" selection-end-column="16" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/controllers/settings/commissions_controller.rb">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="368">
|
|
||||||
<caret line="76" column="12" lean-forward="true" selection-start-line="76" selection-start-column="12" selection-end-line="76" selection-end-column="12" />
|
|
||||||
<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="164">
|
|
||||||
<caret line="65" column="12" lean-forward="true" selection-start-line="65" selection-start-column="12" selection-end-line="65" selection-end-column="12" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/controllers/reports/bksaleitem_controller.rb">
|
<entry file="file://$PROJECT_DIR$/app/controllers/reports/bksaleitem_controller.rb">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="0">
|
<state relative-caret-position="0">
|
||||||
@@ -970,14 +942,6 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/origami/in_juties/index_in_juty.html.erb">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="130">
|
|
||||||
<caret line="50" column="46" lean-forward="false" selection-start-line="50" selection-start-column="32" selection-end-line="50" selection-end-column="46" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/config/routes.rb">
|
<entry file="file://$PROJECT_DIR$/config/routes.rb">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="489">
|
<state relative-caret-position="489">
|
||||||
@@ -994,14 +958,6 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/app/models/promotion.rb">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="187">
|
|
||||||
<caret line="21" column="7" lean-forward="true" selection-start-line="21" selection-start-column="7" selection-end-line="21" selection-end-column="7" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/home/index.html.erb">
|
<entry file="file://$PROJECT_DIR$/app/views/home/index.html.erb">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="881">
|
<state relative-caret-position="881">
|
||||||
@@ -1079,7 +1035,7 @@
|
|||||||
<state relative-caret-position="126">
|
<state relative-caret-position="126">
|
||||||
<caret line="7" column="13" lean-forward="false" selection-start-line="7" selection-start-column="13" selection-end-line="7" selection-end-column="13" />
|
<caret line="7" column="13" lean-forward="false" selection-start-line="7" selection-start-column="13" selection-end-line="7" selection-end-column="13" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="n#style#0;n#tr#1;n#tbody#0;n#table#0;n#div#0;n#div#0;n#div#0;n#!!top" expanded="true" />
|
<element signature="n#style#0;n#tr#1;n#tbody#0;n#table#0;n#div#0;n#div#0;n#div#0;n#!!top" expanded="false" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
@@ -1097,31 +1053,11 @@
|
|||||||
<state relative-caret-position="412">
|
<state relative-caret-position="412">
|
||||||
<caret line="29" column="13" lean-forward="false" selection-start-line="29" selection-start-column="13" selection-end-line="29" selection-end-column="13" />
|
<caret line="29" column="13" lean-forward="false" selection-start-line="29" selection-start-column="13" selection-end-line="29" selection-end-column="13" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="n#style#0;n#tr#1;n#tbody#0;n#table#0;n#div#0;n#div#0;n#div#3;n#!!top" expanded="true" />
|
<element signature="n#style#0;n#tr#1;n#tbody#0;n#table#0;n#div#0;n#div#0;n#div#3;n#!!top" expanded="false" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/app/assets/javascripts/application.js">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="117">
|
|
||||||
<caret line="29" column="0" lean-forward="false" selection-start-line="29" selection-start-column="0" selection-end-line="29" selection-end-column="0" />
|
|
||||||
<folding>
|
|
||||||
<element signature="n#!!doc" expanded="true" />
|
|
||||||
<marker date="1504008524000" expanded="true" signature="2104:2131" ph="..." />
|
|
||||||
<marker date="1504008524000" expanded="true" signature="2927:2954" ph="..." />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/application.scss">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="136">
|
|
||||||
<caret line="10" column="35" lean-forward="false" selection-start-line="10" selection-start-column="35" selection-end-line="10" selection-end-column="35" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/Gemfile.lock">
|
<entry file="file://$PROJECT_DIR$/Gemfile.lock">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="203">
|
<state relative-caret-position="203">
|
||||||
@@ -1130,14 +1066,6 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/Gemfile">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="526">
|
|
||||||
<caret line="121" column="32" lean-forward="false" selection-start-line="121" selection-start-column="32" selection-end-line="121" selection-end-column="32" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/settings/commissions/load_commissioners.html.erb">
|
<entry file="file://$PROJECT_DIR$/app/views/settings/commissions/load_commissioners.html.erb">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="249">
|
<state relative-caret-position="249">
|
||||||
@@ -1162,5 +1090,126 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/models/promotion.rb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="91">
|
||||||
|
<caret line="17" column="45" lean-forward="true" selection-start-line="17" selection-start-column="45" selection-end-line="17" selection-end-column="45" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/Gemfile">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="12">
|
||||||
|
<caret line="93" column="10" lean-forward="false" selection-start-line="93" selection-start-column="10" selection-end-line="93" selection-end-column="10" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/application.scss">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="144">
|
||||||
|
<caret line="8" column="30" lean-forward="false" selection-start-line="8" selection-start-column="30" selection-end-line="8" selection-end-column="30" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/assets/javascripts/application.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="342">
|
||||||
|
<caret line="25" column="33" lean-forward="false" selection-start-line="25" selection-start-column="33" selection-end-line="25" selection-end-column="33" />
|
||||||
|
<folding>
|
||||||
|
<element signature="n#!!doc" expanded="true" />
|
||||||
|
<marker date="1504065881000" expanded="true" signature="2006:2033" ph="..." />
|
||||||
|
<marker date="1504065881000" expanded="true" signature="2829:2856" ph="..." />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/views/settings/promotions/new.html.erb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="234">
|
||||||
|
<caret line="13" column="33" lean-forward="true" selection-start-line="13" selection-start-column="33" selection-end-line="13" selection-end-column="33" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/views/settings/promotions/_form.html.erb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="-1395">
|
||||||
|
<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/in_juties/new.html.erb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="144">
|
||||||
|
<caret line="8" column="55" lean-forward="false" selection-start-line="8" selection-start-column="55" selection-end-line="8" selection-end-column="55" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/views/origami/in_juties/index.html.erb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="142">
|
||||||
|
<caret line="56" column="21" lean-forward="true" selection-start-line="56" selection-start-column="12" selection-end-line="56" selection-end-column="21" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/views/origami/in_juties/_assign_in_juty.html.erb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="-294">
|
||||||
|
<caret line="1" column="38" lean-forward="true" selection-start-line="1" selection-start-column="38" selection-end-line="1" selection-end-column="38" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/views/origami/in_juties/_edit_in_juty.html.erb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="198">
|
||||||
|
<caret line="11" column="29" lean-forward="true" selection-start-line="11" selection-start-column="29" selection-end-line="11" selection-end-column="29" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/views/origami/in_juties/index_in_juty.html.erb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="194">
|
||||||
|
<caret line="38" column="14" lean-forward="false" selection-start-line="38" selection-start-column="14" selection-end-line="38" selection-end-column="14" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#1270#1276#0#HTML" expanded="true" />
|
||||||
|
<element signature="e#1276#1282#0#HTML" expanded="true" />
|
||||||
|
<element signature="e#1370#1376#0#HTML" expanded="true" />
|
||||||
|
<element signature="e#1376#1382#0#HTML" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/views/origami/in_juties/_form.html.erb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="68">
|
||||||
|
<caret line="15" column="54" lean-forward="false" selection-start-line="15" selection-start-column="54" selection-end-line="15" selection-end-column="54" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$USER_HOME$/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="197">
|
||||||
|
<caret line="131" column="0" lean-forward="false" selection-start-line="131" selection-start-column="0" selection-end-line="131" selection-end-column="0" />
|
||||||
|
<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="452">
|
||||||
|
<caret line="29" column="0" lean-forward="true" selection-start-line="29" selection-start-column="0" selection-end-line="29" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
16
Gemfile
16
Gemfile
@@ -34,7 +34,7 @@ gem 'simple_form'
|
|||||||
gem 'nested_form'
|
gem 'nested_form'
|
||||||
gem 'bootstrap', '~> 4.0.0.alpha3'
|
gem 'bootstrap', '~> 4.0.0.alpha3'
|
||||||
gem 'tether-rails'
|
gem 'tether-rails'
|
||||||
gem "font-awesome-rails"
|
gem 'font-awesome-rails', '~> 4.7', '>= 4.7.0.2'
|
||||||
gem 'rack-cors'
|
gem 'rack-cors'
|
||||||
|
|
||||||
# image upload
|
# image upload
|
||||||
@@ -53,7 +53,6 @@ gem 'to_xls-rails'
|
|||||||
# Use jquery as the JavaScript library
|
# Use jquery as the JavaScript library
|
||||||
gem 'jquery-rails'
|
gem 'jquery-rails'
|
||||||
gem 'jquery-ui-rails'
|
gem 'jquery-ui-rails'
|
||||||
gem 'jquery-datatables-rails', '~> 3.4.0'
|
|
||||||
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
||||||
gem 'turbolinks', '~> 5'
|
gem 'turbolinks', '~> 5'
|
||||||
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
||||||
@@ -112,13 +111,8 @@ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
|||||||
|
|
||||||
gem 'httparty', '~> 0.15.5'
|
gem 'httparty', '~> 0.15.5'
|
||||||
|
|
||||||
gem 'momentjs-rails', :git => 'git://github.com/derekprior/momentjs-rails.git'
|
gem 'momentjs-rails' # for date-range selector
|
||||||
gem 'bootstrap-daterangepicker-rails'
|
gem 'bootstrap-daterangepicker-rails' # date-range picker
|
||||||
# # gem 'momentjs-rails', '>= 2.9.0'
|
gem 'bootstrap-datepicker-rails' # date picker
|
||||||
# gem 'bootstrap3-datetimepicker-rails'
|
|
||||||
# gem 'momentjs-rails', '>= 2.9.0'
|
|
||||||
# gem 'bootstrap3-datetimepicker-rails'
|
|
||||||
gem 'datetimepicker-rails', github: 'zpaulovics/datetimepicker-rails', branch: 'master', submodules: true
|
|
||||||
gem 'bootstrap-datepicker-rails'
|
|
||||||
gem 'jquery-datetimepicker-rails'
|
gem 'jquery-datetimepicker-rails'
|
||||||
gem 'select2-rails'
|
gem 'select2-rails' # for multi-select and auto-complete select box
|
||||||
|
|||||||
29
Gemfile.lock
29
Gemfile.lock
@@ -1,19 +1,3 @@
|
|||||||
GIT
|
|
||||||
remote: git://github.com/derekprior/momentjs-rails.git
|
|
||||||
revision: ea58a20b7b2c901831dd01f34e0054ef6c75bde8
|
|
||||||
specs:
|
|
||||||
momentjs-rails (2.17.1)
|
|
||||||
railties (>= 3.1)
|
|
||||||
|
|
||||||
GIT
|
|
||||||
remote: https://github.com/zpaulovics/datetimepicker-rails.git
|
|
||||||
revision: 36d21cec5da7f5b214925804f60e63c61c747023
|
|
||||||
branch: master
|
|
||||||
submodules: true
|
|
||||||
specs:
|
|
||||||
datetimepicker-rails (4.7.16)
|
|
||||||
momentjs-rails (>= 2.9.0)
|
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
@@ -107,11 +91,6 @@ GEM
|
|||||||
jbuilder (2.7.0)
|
jbuilder (2.7.0)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
multi_json (>= 1.2)
|
multi_json (>= 1.2)
|
||||||
jquery-datatables-rails (3.4.0)
|
|
||||||
actionpack (>= 3.1)
|
|
||||||
jquery-rails
|
|
||||||
railties (>= 3.1)
|
|
||||||
sass-rails
|
|
||||||
jquery-datetimepicker-rails (2.4.1.0)
|
jquery-datetimepicker-rails (2.4.1.0)
|
||||||
jquery-rails (4.3.1)
|
jquery-rails (4.3.1)
|
||||||
rails-dom-testing (>= 1, < 3)
|
rails-dom-testing (>= 1, < 3)
|
||||||
@@ -144,6 +123,8 @@ GEM
|
|||||||
mime-types-data (3.2016.0521)
|
mime-types-data (3.2016.0521)
|
||||||
mini_portile2 (2.2.0)
|
mini_portile2 (2.2.0)
|
||||||
minitest (5.10.3)
|
minitest (5.10.3)
|
||||||
|
momentjs-rails (2.17.1)
|
||||||
|
railties (>= 3.1)
|
||||||
multi_json (1.12.1)
|
multi_json (1.12.1)
|
||||||
multi_xml (0.6.0)
|
multi_xml (0.6.0)
|
||||||
mysql2 (0.4.6)
|
mysql2 (0.4.6)
|
||||||
@@ -286,20 +267,18 @@ DEPENDENCIES
|
|||||||
coffee-rails (~> 4.2)
|
coffee-rails (~> 4.2)
|
||||||
cups (~> 0.0.7)
|
cups (~> 0.0.7)
|
||||||
database_cleaner
|
database_cleaner
|
||||||
datetimepicker-rails!
|
|
||||||
factory_girl_rails (~> 4.0)
|
factory_girl_rails (~> 4.0)
|
||||||
faker
|
faker
|
||||||
filterrific
|
filterrific
|
||||||
font-awesome-rails
|
font-awesome-rails (~> 4.7, >= 4.7.0.2)
|
||||||
httparty (~> 0.15.5)
|
httparty (~> 0.15.5)
|
||||||
jbuilder (~> 2.5)
|
jbuilder (~> 2.5)
|
||||||
jquery-datatables-rails (~> 3.4.0)
|
|
||||||
jquery-datetimepicker-rails
|
jquery-datetimepicker-rails
|
||||||
jquery-rails
|
jquery-rails
|
||||||
jquery-ui-rails
|
jquery-ui-rails
|
||||||
kaminari (~> 1.0.1)
|
kaminari (~> 1.0.1)
|
||||||
listen (~> 3.0.5)
|
listen (~> 3.0.5)
|
||||||
momentjs-rails!
|
momentjs-rails
|
||||||
mysql2 (>= 0.3.18, < 0.5)
|
mysql2 (>= 0.3.18, < 0.5)
|
||||||
nested_form
|
nested_form
|
||||||
pg
|
pg
|
||||||
|
|||||||
@@ -20,13 +20,10 @@
|
|||||||
//= require settings/processing_items
|
//= require settings/processing_items
|
||||||
//= require jquery-ui
|
//= require jquery-ui
|
||||||
//= require bootstrap-datepicker
|
//= require bootstrap-datepicker
|
||||||
//= require jquery.datetimepicker
|
|
||||||
//= require dataTables/jquery.dataTables
|
|
||||||
//= require moment
|
//= require moment
|
||||||
//= require daterangepicker
|
//= require daterangepicker
|
||||||
//= require select2
|
//= require select2
|
||||||
//= require bootstrap-datetimepicker
|
//= require jquery.datetimepicker
|
||||||
//= require pickers
|
|
||||||
|
|
||||||
|
|
||||||
$(document).on('turbolinks:load', function() {
|
$(document).on('turbolinks:load', function() {
|
||||||
|
|||||||
@@ -4,11 +4,9 @@
|
|||||||
@import "theme";
|
@import "theme";
|
||||||
@import "jquery-ui";
|
@import "jquery-ui";
|
||||||
@import "bootstrap-datepicker3";
|
@import "bootstrap-datepicker3";
|
||||||
@import "jquery.datetimepicker";
|
|
||||||
@import "dataTables/jquery.dataTables";
|
|
||||||
@import "daterangepicker-bs3";
|
@import "daterangepicker-bs3";
|
||||||
@import "select2";
|
@import "select2";
|
||||||
@import "bootstrap-datetimepicker";
|
@import "jquery.datetimepicker";
|
||||||
|
|
||||||
/* Show it is fixed to the top */
|
/* Show it is fixed to the top */
|
||||||
// body {
|
// body {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Inventory::InventoryController < BaseInventoryController
|
class Inventory::InventoryController < BaseInventoryController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@products = InventoryDefinition.all.active.order('created_at desc')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class Inventory::InventoryDefinitionsController < BaseInventoryController
|
|||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @inventory_definition.save
|
if @inventory_definition.save
|
||||||
format.html { redirect_to @inventory_definition, notice: 'Inventory definition was successfully created.' }
|
format.html { redirect_to inventory_path, notice: 'Inventory definition was successfully created.' }
|
||||||
format.json { render :show, status: :created, location: @inventory_definition }
|
format.json { render :show, status: :created, location: @inventory_definition }
|
||||||
else
|
else
|
||||||
format.html { render :new }
|
format.html { render :new }
|
||||||
@@ -69,6 +69,6 @@ class Inventory::InventoryDefinitionsController < BaseInventoryController
|
|||||||
|
|
||||||
# Never trust parameters from the scary internet, only allow the white list through.
|
# Never trust parameters from the scary internet, only allow the white list through.
|
||||||
def inventory_definition_params
|
def inventory_definition_params
|
||||||
params.fetch(:inventory_definition, {})
|
params.require(:inventory_definition).permit(:item_code, :min_order_level, :max_stock_level)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class StockCheckItemsController < ApplicationController
|
class Inventory::StockCheckItemsController < BaseInventoryController
|
||||||
before_action :set_stock_check_item, only: [:show, :edit, :update, :destroy]
|
before_action :set_stock_check_item, only: [:show, :edit, :update, :destroy]
|
||||||
|
|
||||||
# GET /stock_check_items
|
# GET /stock_check_items
|
||||||
@@ -28,7 +28,7 @@ class StockCheckItemsController < ApplicationController
|
|||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @stock_check_item.save
|
if @stock_check_item.save
|
||||||
format.html { redirect_to @stock_check_item, notice: 'Stock check item was successfully created.' }
|
format.html { redirect_to inventory_stock_checks_path, notice: 'Stock check item was successfully created.' }
|
||||||
format.json { render :show, status: :created, location: @stock_check_item }
|
format.json { render :show, status: :created, location: @stock_check_item }
|
||||||
else
|
else
|
||||||
format.html { render :new }
|
format.html { render :new }
|
||||||
@@ -69,6 +69,6 @@ class StockCheckItemsController < ApplicationController
|
|||||||
|
|
||||||
# Never trust parameters from the scary internet, only allow the white list through.
|
# Never trust parameters from the scary internet, only allow the white list through.
|
||||||
def stock_check_item_params
|
def stock_check_item_params
|
||||||
params.fetch(:stock_check_item, {})
|
params.require(:stock_check_item).permit(:item_code, :stock_count)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,74 +1,98 @@
|
|||||||
class StockChecksController < ApplicationController
|
class Inventory::StockChecksController < BaseInventoryController
|
||||||
before_action :set_stock_check, only: [:show, :edit, :update, :destroy]
|
|
||||||
|
def index
|
||||||
|
@check = StockCheck.new
|
||||||
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
item_list = JSON.parse(params[:stock_item])
|
||||||
|
reason = params[:reason]
|
||||||
|
check = StockCheck.new
|
||||||
|
@check = check.create(current_user, reason, item_list)
|
||||||
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
@check = StockCheck.find(params[:id])
|
||||||
|
end
|
||||||
|
|
||||||
|
def save_to_journal
|
||||||
|
check = params[:data]
|
||||||
|
stockCheck = StockCheck.find(check)
|
||||||
|
stockCheck.stock_check_items.each do |item|
|
||||||
|
StockJournal.from_stock_check(item)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# before_action :set_stock_check, only: [:show, :edit, :update, :destroy]
|
||||||
|
|
||||||
# GET /stock_checks
|
# GET /stock_checks
|
||||||
# GET /stock_checks.json
|
# GET /stock_checks.json
|
||||||
def index
|
# def index
|
||||||
@stock_checks = StockCheck.all
|
# @stock_checks = StockCheck.all
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
# GET /stock_checks/1
|
# # GET /stock_checks/1
|
||||||
# GET /stock_checks/1.json
|
# # GET /stock_checks/1.json
|
||||||
def show
|
# def show
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
# GET /stock_checks/new
|
# # GET /stock_checks/new
|
||||||
def new
|
# def new
|
||||||
@stock_check = StockCheck.new
|
# @stock_check = StockCheck.new
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
# GET /stock_checks/1/edit
|
# # GET /stock_checks/1/edit
|
||||||
def edit
|
# def edit
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
# POST /stock_checks
|
# # POST /stock_checks
|
||||||
# POST /stock_checks.json
|
# # POST /stock_checks.json
|
||||||
def create
|
# def create
|
||||||
@stock_check = StockCheck.new(stock_check_params)
|
# @stock_check = StockCheck.new(stock_check_params)
|
||||||
|
#
|
||||||
respond_to do |format|
|
# respond_to do |format|
|
||||||
if @stock_check.save
|
# if @stock_check.save
|
||||||
format.html { redirect_to @stock_check, notice: 'Stock check was successfully created.' }
|
# format.html { redirect_to @stock_check, notice: 'Stock check was successfully created.' }
|
||||||
format.json { render :show, status: :created, location: @stock_check }
|
# format.json { render :show, status: :created, location: @stock_check }
|
||||||
else
|
# else
|
||||||
format.html { render :new }
|
# format.html { render :new }
|
||||||
format.json { render json: @stock_check.errors, status: :unprocessable_entity }
|
# format.json { render json: @stock_check.errors, status: :unprocessable_entity }
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
# PATCH/PUT /stock_checks/1
|
# # PATCH/PUT /stock_checks/1
|
||||||
# PATCH/PUT /stock_checks/1.json
|
# # PATCH/PUT /stock_checks/1.json
|
||||||
def update
|
# def update
|
||||||
respond_to do |format|
|
# respond_to do |format|
|
||||||
if @stock_check.update(stock_check_params)
|
# if @stock_check.update(stock_check_params)
|
||||||
format.html { redirect_to @stock_check, notice: 'Stock check was successfully updated.' }
|
# format.html { redirect_to @stock_check, notice: 'Stock check was successfully updated.' }
|
||||||
format.json { render :show, status: :ok, location: @stock_check }
|
# format.json { render :show, status: :ok, location: @stock_check }
|
||||||
else
|
# else
|
||||||
format.html { render :edit }
|
# format.html { render :edit }
|
||||||
format.json { render json: @stock_check.errors, status: :unprocessable_entity }
|
# format.json { render json: @stock_check.errors, status: :unprocessable_entity }
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
# DELETE /stock_checks/1
|
# # DELETE /stock_checks/1
|
||||||
# DELETE /stock_checks/1.json
|
# # DELETE /stock_checks/1.json
|
||||||
def destroy
|
# def destroy
|
||||||
@stock_check.destroy
|
# @stock_check.destroy
|
||||||
respond_to do |format|
|
# respond_to do |format|
|
||||||
format.html { redirect_to stock_checks_url, notice: 'Stock check was successfully destroyed.' }
|
# format.html { redirect_to stock_checks_url, notice: 'Stock check was successfully destroyed.' }
|
||||||
format.json { head :no_content }
|
# format.json { head :no_content }
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
private
|
# private
|
||||||
# Use callbacks to share common setup or constraints between actions.
|
# # Use callbacks to share common setup or constraints between actions.
|
||||||
def set_stock_check
|
# def set_stock_check
|
||||||
@stock_check = StockCheck.find(params[:id])
|
# @stock_check = StockCheck.find(params[:id])
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
# Never trust parameters from the scary internet, only allow the white list through.
|
# # Never trust parameters from the scary internet, only allow the white list through.
|
||||||
def stock_check_params
|
# def stock_check_params
|
||||||
params.fetch(:stock_check, {})
|
# params.fetch(:stock_check, {})
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Origami::InJutiesController < BaseOrigamiController
|
class Origami::InJutiesController < BaseOrigamiController
|
||||||
before_action :set_in_juty, only: [:show, :edit, :update, :edit_in_juty, :update_for_in_juty , :destroy ,:destroy_in_juty]
|
before_action :set_in_juty, only: %i[show edit update edit_in_juty update_for_in_juty destroy destroy_in_juty]
|
||||||
|
|
||||||
# GET /in_juties
|
# GET /in_juties
|
||||||
# GET /in_juties.json
|
# GET /in_juties.json
|
||||||
@@ -8,12 +8,12 @@ class Origami::InJutiesController < BaseOrigamiController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def index_in_juty
|
def index_in_juty
|
||||||
@juty_in= InJuty.where("dinning_id=?",params[:table_id])
|
@juty_in = InJuty.where('dinning_id=?', params[:table_id])
|
||||||
@table = DiningFacility.find(params[:table_id])
|
@table = DiningFacility.find(params[:table_id])
|
||||||
@in_juty = InJuty.new
|
@in_juty = InJuty.new
|
||||||
@juties_in = Kaminari.paginate_array(@juty_in).page(params[:page]).per(10)
|
@juties_in = Kaminari.paginate_array(@juty_in).page(params[:page]).per(10)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /in_juties/1
|
# GET /in_juties/1
|
||||||
# GET /in_juties/1.json
|
# GET /in_juties/1.json
|
||||||
def show
|
def show
|
||||||
@@ -21,12 +21,15 @@ class Origami::InJutiesController < BaseOrigamiController
|
|||||||
|
|
||||||
# GET /in_juties/new
|
# GET /in_juties/new
|
||||||
def new
|
def new
|
||||||
|
# this one use for new
|
||||||
@in_juty = InJuty.new
|
@in_juty = InJuty.new
|
||||||
|
@table = DiningFacility.find(params[:table_id])
|
||||||
|
@commissioner = @in_juty.commissioner
|
||||||
|
render partial: 'form'
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /in_juties/1/edit
|
# GET /in_juties/1/edit
|
||||||
def edit
|
def edit
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit_in_juty
|
def edit_in_juty
|
||||||
@@ -34,13 +37,15 @@ class Origami::InJutiesController < BaseOrigamiController
|
|||||||
@table = DiningFacility.find(params[:table_id])
|
@table = DiningFacility.find(params[:table_id])
|
||||||
@commissioner = @in_juty.commissioner
|
@commissioner = @in_juty.commissioner
|
||||||
|
|
||||||
render json: {in_juty: @in_juty, commissioner: @commissioner}
|
# render json: {in_juty: @in_juty, commissioner: @commissioner}
|
||||||
|
render partial: 'form'
|
||||||
end
|
end
|
||||||
|
|
||||||
def assign_in_juty
|
def assign_in_juty
|
||||||
@in_juty = InJuty.new
|
@in_juty = InJuty.new
|
||||||
@table = DiningFacility.find(params[:table_id])
|
@table = DiningFacility.find(params[:table_id])
|
||||||
end
|
end
|
||||||
|
|
||||||
# POST /in_juties
|
# POST /in_juties
|
||||||
# POST /in_juties.json
|
# POST /in_juties.json
|
||||||
def create
|
def create
|
||||||
@@ -58,32 +63,53 @@ class Origami::InJutiesController < BaseOrigamiController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def create_for_in_juty
|
def create_for_in_juty
|
||||||
|
# this one use for create and update
|
||||||
|
in_juty = in_juty_params
|
||||||
|
in_time = DateTime.new in_juty['in_time(1i)'].to_i, in_juty['in_time(2i)'].to_i, in_juty['in_time(3i)'].to_i, in_juty['in_time(4i)'].to_i, in_juty['in_time(5i)'].to_i
|
||||||
|
in_time = in_time.change(offset: '+06:30')
|
||||||
|
out_time = DateTime.new in_juty['out_time(1i)'].to_i, in_juty['out_time(2i)'].to_i, in_juty['out_time(3i)'].to_i, in_juty['out_time(4i)'].to_i, in_juty['out_time(5i)'].to_i
|
||||||
|
out_time = out_time.change(offset: '+06:30')
|
||||||
@in_juty = InJuty.new
|
@in_juty = InJuty.new
|
||||||
|
in_juty_id = in_juty[:id]
|
||||||
|
unless in_juty_id.nil?
|
||||||
|
@in_juty = InJuty.find(in_juty_id.to_i)
|
||||||
|
end
|
||||||
|
|
||||||
@in_juty.dinning_id = in_juty_params[:dinning_id]
|
@in_juty.dinning_id = in_juty_params[:dinning_id]
|
||||||
@in_juty.commissioner_ids = in_juty_params[:commissioner_ids]
|
@in_juty.commissioner_ids = in_juty_params[:commissioner_ids]
|
||||||
@in_juty.in_time = in_juty_params[:in_time]
|
@in_juty.in_time = in_time
|
||||||
@in_juty.out_time = in_juty_params[:out_time]
|
@in_juty.out_time = out_time
|
||||||
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @in_juty.save
|
if @in_juty.save
|
||||||
format.html { redirect_to origami_index_in_juty_path(in_juty_params[:dinning_id]), notice: 'In juty was successfully created.' }
|
if in_juty_id.nil?
|
||||||
format.json { render :show, status: :created, location: @in_juty }
|
format.html { redirect_to origami_index_in_juty_path(in_juty_params[:dinning_id]), notice: 'In juty was successfully created.' }
|
||||||
|
format.json { render :show, status: :created, location: @in_juty }
|
||||||
|
else
|
||||||
|
format.html { redirect_to origami_index_in_juty_path(in_juty_params[:dinning_id]), notice: 'In juty was successfully updated.' }
|
||||||
|
format.json { render :show, status: :created, location: @in_juty }
|
||||||
|
end
|
||||||
else
|
else
|
||||||
format.html { render :new }
|
format.html { render :new }
|
||||||
format.json { render json: @in_juty.errors, status: :unprocessable_entity }
|
format.json { render json: @in_juty.errors, status: :unprocessable_entity }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# PATCH/PUT /in_juties/1
|
# PATCH/PUT /in_juties/1
|
||||||
# PATCH/PUT /in_juties/1.json
|
# PATCH/PUT /in_juties/1.json
|
||||||
def update
|
def update
|
||||||
|
in_juty = in_juty_params
|
||||||
|
in_time = DateTime.new in_juty['in_time(1i)'].to_i, in_juty['in_time(2i)'].to_i, in_juty['in_time(3i)'].to_i, in_juty['in_time(4i)'].to_i, in_juty['in_time(5i)'].to_i
|
||||||
|
in_time = in_time.change(offset: '+06:30')
|
||||||
|
out_time = DateTime.new in_juty['out_time(1i)'].to_i, in_juty['out_time(2i)'].to_i, in_juty['out_time(3i)'].to_i, in_juty['out_time(4i)'].to_i, in_juty['out_time(5i)'].to_i
|
||||||
|
out_time = out_time.change(offset: '+06:30')
|
||||||
|
@in_juty.commissioner_ids = in_juty_params[:commissioner_ids]
|
||||||
|
@in_juty.in_time = in_time
|
||||||
|
@in_juty.out_time = out_time
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @in_juty.update(in_juty_params)
|
if @in_juty.save
|
||||||
format.html { redirect_to origami_in_juty_path(@in_juty), notice: 'In juty was successfully updated.' }
|
format.html { redirect_to origami_index_in_juty_path(in_juty_params[:dinning_id]), notice: 'In juty was successfully updated.' }
|
||||||
format.json { render :show, status: :ok, location: @in_juty }
|
format.json { render :show, status: :ok, location: @in_juty }
|
||||||
else
|
else
|
||||||
format.html { render :edit }
|
format.html { render :edit }
|
||||||
@@ -92,28 +118,32 @@ class Origami::InJutiesController < BaseOrigamiController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def update_for_in_juty
|
||||||
def update_for_in_juty
|
in_juty = in_juty_params
|
||||||
@in_juty.commissioner_ids = in_juty_params[:commissioner_ids]
|
in_time = DateTime.new in_juty['in_time(1i)'].to_i, in_juty['in_time(2i)'].to_i, in_juty['in_time(3i)'].to_i, in_juty['in_time(4i)'].to_i, in_juty['in_time(5i)'].to_i
|
||||||
@in_juty.in_time = in_juty_params[:in_time]
|
in_time = in_time.change(offset: '+06:30')
|
||||||
@in_juty.out_time = in_juty_params[:out_time]
|
out_time = DateTime.new in_juty['out_time(1i)'].to_i, in_juty['out_time(2i)'].to_i, in_juty['out_time(3i)'].to_i, in_juty['out_time(4i)'].to_i, in_juty['out_time(5i)'].to_i
|
||||||
respond_to do |format|
|
out_time = out_time.change(offset: '+06:30')
|
||||||
if @in_juty.save
|
@in_juty.commissioner_ids = in_juty_params[:commissioner_ids]
|
||||||
format.html { redirect_to origami_index_in_juty_path(in_juty_params[:dinning_id]), notice: 'In juty was successfully updated.' }
|
@in_juty.in_time = in_time
|
||||||
format.json { render :show, status: :ok, location: @in_juty }
|
@in_juty.out_time = out_time
|
||||||
else
|
respond_to do |format|
|
||||||
format.html { render :edit }
|
if @in_juty.save
|
||||||
format.json { render json: @in_juty.errors, status: :unprocessable_entity }
|
format.html { redirect_to origami_index_in_juty_path(in_juty_params[:dinning_id]), notice: 'In juty was successfully updated.' }
|
||||||
end
|
format.json { render :show, status: :ok, location: @in_juty }
|
||||||
end
|
else
|
||||||
|
format.html { render :edit }
|
||||||
|
format.json { render json: @in_juty.errors, status: :unprocessable_entity }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# DELETE /in_juties/1
|
# DELETE /in_juties/1
|
||||||
# DELETE /in_juties/1.json
|
# DELETE /in_juties/1.json
|
||||||
def destroy
|
def destroy
|
||||||
@in_juty.destroy
|
@in_juty.destroy
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to origami_in_juties_path, notice: 'In juty was successfully destroyed.' }
|
format.html { redirect_to origami_in_juties_path, notice: 'In juty was successfully removed.' }
|
||||||
format.json { head :no_content }
|
format.json { head :no_content }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -121,21 +151,22 @@ class Origami::InJutiesController < BaseOrigamiController
|
|||||||
def destroy_in_juty
|
def destroy_in_juty
|
||||||
@table_id = params[:table_id]
|
@table_id = params[:table_id]
|
||||||
@in_juty.destroy
|
@in_juty.destroy
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to origami_index_in_juty_path(@table_id), notice: 'In juty was successfully destroyed.' }
|
format.html { redirect_to origami_index_in_juty_path(@table_id), notice: 'In juty was successfully removed.' }
|
||||||
format.json { head :no_content }
|
format.json { head :no_content }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
# Use callbacks to share common setup or constraints between actions.
|
|
||||||
def set_in_juty
|
|
||||||
@in_juty = InJuty.find(params[:id])
|
|
||||||
end
|
|
||||||
|
|
||||||
# Never trust parameters from the scary internet, only allow the white list through.
|
# Use callbacks to share common setup or constraints between actions.
|
||||||
def in_juty_params
|
def set_in_juty
|
||||||
params.require(:in_juty).permit(:id,:dinning_id,:commissioner_ids,:in_time,:out_time)
|
@in_juty = InJuty.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Never trust parameters from the scary internet, only allow the white list through.
|
||||||
|
def in_juty_params
|
||||||
|
params.require(:in_juty).permit(:id, :dinning_id, :commissioner_ids, :in_time, :out_time)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
9
app/jobs/inventory_job.rb
Normal file
9
app/jobs/inventory_job.rb
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
class InventoryJob < ApplicationJob
|
||||||
|
queue_as :default
|
||||||
|
|
||||||
|
def perform(sale_id)
|
||||||
|
saleObj = Sale.find(sale_id)
|
||||||
|
InventoryDefinition.calculate_product_count(saleObj)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -1,2 +1,41 @@
|
|||||||
class InventoryDefinition < ApplicationRecord
|
class InventoryDefinition < ApplicationRecord
|
||||||
|
|
||||||
|
scope :active, -> {where(:is_active => true)}
|
||||||
|
|
||||||
|
def self.calculate_product_count(saleObj)
|
||||||
|
saleObj.sale_items.each do |item|
|
||||||
|
found, inventory_definition = find_product_in_inventory(item)
|
||||||
|
if found
|
||||||
|
check_balance(item,inventory_definition)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.find_product_in_inventory(item)
|
||||||
|
product = InventoryDefinition.find_by_item_code(item.product_code)
|
||||||
|
if product.nil?
|
||||||
|
return false, nil
|
||||||
|
else
|
||||||
|
return true, product
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.check_balance(item,inventory_definition) # item => saleItemOBj
|
||||||
|
stock = StockJournal.where('item_code=?', item.product_code).order('created_at desc').take
|
||||||
|
unless stock.nil?
|
||||||
|
modify_balance(item, stock, inventory_definition)
|
||||||
|
else
|
||||||
|
StockJournal.add_to_journal(item, 0, "out of stock", inventory_definition)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.modify_balance(item, stock, inventory_definition) #saleitemObj
|
||||||
|
if stock.balance.to_i >= item.qty
|
||||||
|
puts ">> stock is greater than orde qty"
|
||||||
|
StockJournal.add_to_journal(item, stock.balance, "ok", inventory_definition)
|
||||||
|
else
|
||||||
|
puts " << stock is less than order qty"
|
||||||
|
StockJournal.add_to_journal(item, stock.balance, "out of stock", inventory_definition)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -118,6 +118,8 @@ class Sale < ApplicationRecord
|
|||||||
create_saleitem_diningcharges(charges, diningprice, booking.dining_facility.name, dining_time)
|
create_saleitem_diningcharges(charges, diningprice, booking.dining_facility.name, dining_time)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
InventoryJob.perform_now(self.id)
|
||||||
|
|
||||||
return true, self.id
|
return true, self.id
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,17 @@
|
|||||||
class StockCheck < ApplicationRecord
|
class StockCheck < ApplicationRecord
|
||||||
|
|
||||||
|
has_many :stock_check_items
|
||||||
|
|
||||||
|
def create(user, eason, item_list)
|
||||||
|
self.reason = reason
|
||||||
|
self.check_by = user.id
|
||||||
|
self.check_start = Time.now
|
||||||
|
self.check_end = Time.now
|
||||||
|
self.save
|
||||||
|
item_list.each do |item|
|
||||||
|
stockItem = StockCheckItem.new
|
||||||
|
stockItem.create(self.id,item)
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,2 +1,36 @@
|
|||||||
class StockCheckItem < ApplicationRecord
|
class StockCheckItem < ApplicationRecord
|
||||||
|
|
||||||
|
belongs_to :stock_check
|
||||||
|
|
||||||
|
def create(stock_id, item)
|
||||||
|
journal_id, balance = StockCheckItem.find_journal(item['sku'])
|
||||||
|
remark, different = StockCheckItem.stock_different(item['qty'], balance )
|
||||||
|
self.stock_check_id = stock_id
|
||||||
|
self.item_code = item['sku']
|
||||||
|
self.stock_count = item['qty']
|
||||||
|
self.stock_journal_id = journal_id
|
||||||
|
self.stock_balance = balance
|
||||||
|
self.different = different
|
||||||
|
self.remark = remark
|
||||||
|
self.save
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.find_journal(item_code)
|
||||||
|
journal = StockJournal.where('item_code=?', item_code).order('created_at desc').take
|
||||||
|
if journal
|
||||||
|
return journal.id, journal.balance
|
||||||
|
else
|
||||||
|
return nil, 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.stock_different(stock_check_qty, journal_balance)
|
||||||
|
if stock_check_qty.to_i == journal_balance.to_i
|
||||||
|
return 'match', stock_check_qty
|
||||||
|
elsif stock_check_qty.to_i > journal_balance.to_i
|
||||||
|
return 'missing order item', stock_check_qty.to_i - journal_balance.to_i
|
||||||
|
elsif stock_check_qty.to_i < journal_balance.to_i
|
||||||
|
return 'missing stock', stock_check_qty.to_i - journal_balance.to_i
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,2 +1,39 @@
|
|||||||
class StockJournal < ApplicationRecord
|
class StockJournal < ApplicationRecord
|
||||||
|
|
||||||
|
SALES_TRANS = "sale"
|
||||||
|
STOCK_CHECK_TRANS = "stock_check"
|
||||||
|
|
||||||
|
def self.add_to_journal(item, balance, stock_message, inventory_definition) # item => saleObj | balance => Stock journal
|
||||||
|
|
||||||
|
balance = calculate_balance(balance, item.qty)
|
||||||
|
|
||||||
|
journal = StockJournal.new
|
||||||
|
journal.item_code = item.product_code
|
||||||
|
journal.inventory_definition_id = inventory_definition.id
|
||||||
|
journal.debit = item.qty
|
||||||
|
journal.balance = balance
|
||||||
|
journal.remark = stock_message
|
||||||
|
journal.trans_ref = item.id
|
||||||
|
journal.trans_type = StockJournal::SALES_TRANS
|
||||||
|
journal.save
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.calculate_balance(balance, qty)
|
||||||
|
return balance.to_i - qty.to_i
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.from_stock_check(item)
|
||||||
|
definition_id = InventoryDefinition.find_by_item_code(item.item_code)
|
||||||
|
journal = StockJournal.new
|
||||||
|
journal.item_code = item.item_code
|
||||||
|
journal.inventory_definition_id = definition_id.id
|
||||||
|
journal.debit = 0
|
||||||
|
journal.credit = item.stock_count
|
||||||
|
journal.balance = item.stock_count
|
||||||
|
journal.remark = StockJournal::STOCK_CHECK_TRANS
|
||||||
|
journal.trans_ref = item.id
|
||||||
|
journal.trans_type = StockJournal::STOCK_CHECK_TRANS
|
||||||
|
journal.save
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="card" id="backend" onclick="location.href='<%= inventory_inventory_path %>'">
|
<div class="card" id="backend" onclick="location.href='<%= inventory_path %>'">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">Inventory</span>
|
<span class="card-title">Inventory</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
40
app/views/inventory/inventory/_inventory_list.html.erb
Normal file
40
app/views/inventory/inventory/_inventory_list.html.erb
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8"><h2> Inventoy Product Lists</h2></div>
|
||||||
|
<div class="col-md-4"><button id='new_inventory_product' class='btn btn-primary' style='margin-top:15px;'>New Inventory Product</button></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<table class="table table-striped">
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>Product</th>
|
||||||
|
<th>Min Order</th>
|
||||||
|
<th>Max Stock</th>
|
||||||
|
<th>Created by</th>
|
||||||
|
<th>Created Time</th>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
count = 0
|
||||||
|
@products.each do |item|
|
||||||
|
count += 1
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td><%= count %></td>
|
||||||
|
<td><%= item.item_code rescue ""%></td>
|
||||||
|
<td><%= item.min_order_level %></td>
|
||||||
|
<td><%= item.max_stock_level %></td>
|
||||||
|
<td><%= item.created_by%></td>
|
||||||
|
<td><%= item.created_at%></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$('#new_inventory_product').on('click',function(){
|
||||||
|
window.location.href = '/inventory/inventory_definitions/new';
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -1,17 +1,22 @@
|
|||||||
# Hello Inventory
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-8 col-md-8 col-sm-8">
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-10 col-md-10 col-sm-10">
|
||||||
|
<%= render 'inventory_list' %>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4 col-md-4 col-sm-4">
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||||
<button id="refreshbutton" type="button" class="btn btn-block"> Inventory Product Lists</button>
|
|
||||||
<button id="cash_in" type="button" class="btn btn-block btn-primary"> Stock Taking </button>
|
|
||||||
<button id="cash_out" type="button" class="btn btn-block btn-primary"> Stock Check Report</button>
|
|
||||||
|
|
||||||
<%if current_login_employee.role == "administrator" || current_login_employee.role == "manager" %>
|
<%if current_login_employee.role == "administrator" || current_login_employee.role == "manager" %>
|
||||||
<button id="back" type="button" class="btn btn-block btn-primary"><i class="fa fa-home fa-lg"></i> Back
|
<button id="back" type="button" class="btn btn-block btn-primary"> Back </button>
|
||||||
</button>
|
|
||||||
<%end%>
|
<%end%>
|
||||||
|
<button id="stock_taking" type="button" class="btn btn-block btn-primary"> New Stock Taking </button>
|
||||||
|
<button id="stock_check_report" type="button" class="btn btn-block btn-primary"> Stock Check Report</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$('#stock_taking').on('click',function(){
|
||||||
|
window.location.href = '/inventory/stock_checks';
|
||||||
|
})
|
||||||
|
$('#stock_check_report').on('click', function(){
|
||||||
|
window.location.href = '';
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
<%= simple_form_for(@inventory_definition) do |f| %>
|
|
||||||
|
<%= simple_form_for([:inventory,@inventory_definition]) do |f| %>
|
||||||
<%= f.error_notification %>
|
<%= f.error_notification %>
|
||||||
|
|
||||||
<div class="form-inputs">
|
<div class="form-inputs">
|
||||||
|
<%= f.input :item_code %>
|
||||||
|
<%= f.input :min_order_level %>
|
||||||
|
<%= f.input :max_stock_level %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<%= f.button :submit %>
|
<%= f.button :submit %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
<h1>New Inventory Definition</h1>
|
|
||||||
|
|
||||||
<%= render 'form', inventory_definition: @inventory_definition %>
|
<div class="span12">
|
||||||
|
<div class="page-header">
|
||||||
<%= link_to 'Back', inventory_definitions_path %>
|
<ul class="breadcrumb">
|
||||||
|
<li><a href="<%= root_path %>">Home</a></li>
|
||||||
|
<li><a href="<%= inventory_path %>">Product Inventory</a></li>
|
||||||
|
<li>New</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<%= render 'form', inventory: @inventory_definition %>
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
<%= simple_form_for(@stock_check) do |f| %>
|
|
||||||
<%= f.error_notification %>
|
|
||||||
|
|
||||||
<div class="form-inputs">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-actions">
|
|
||||||
<%= f.button :submit %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
json.extract! stock_check, :id, :created_at, :updated_at
|
|
||||||
json.url stock_check_url(stock_check, format: :json)
|
|
||||||
1
app/views/inventory/stock_checks/create.json.jbuilder
Normal file
1
app/views/inventory/stock_checks/create.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
|||||||
|
json.stock_id @check.id
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<h1>Editing Stock Check</h1>
|
|
||||||
|
|
||||||
<%= render 'form', stock_check: @stock_check %>
|
|
||||||
|
|
||||||
<%= link_to 'Show', @stock_check %> |
|
|
||||||
<%= link_to 'Back', stock_checks_path %>
|
|
||||||
@@ -1,25 +1,102 @@
|
|||||||
<p id="notice"><%= notice %></p>
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
<h1>Stock Checks</h1>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<input type='text' id='stock_check_reason' class='form-control' placeholder="Set Stock Check Reason" value=''></input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2"></div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
Product
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7">
|
||||||
|
<input type='text' class='form-control' placeholder="Product Name" id='product_sku' value=''></input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2"></div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
Qty
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7">
|
||||||
|
<input type='text' class='form-control' placeholder="Qty" id='product_qty' value=''></input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4"></div>
|
||||||
|
<div class="col-md-7">
|
||||||
|
<button class="btn btn-primary form-control" id='save_to_stock_check'> Save </button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table>
|
<div class="col-md-5">
|
||||||
<thead>
|
<div class="row">
|
||||||
<tr>
|
<div class="col-md-12">
|
||||||
<th colspan="3"></th>
|
<table class="table table-striped" id='stock_item'>
|
||||||
</tr>
|
<tr>
|
||||||
</thead>
|
<th>#</th>
|
||||||
|
<th>Product</th>
|
||||||
|
<th>Balance</th>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<div class="row">
|
||||||
|
<button class="btn btn-primary pull-right form-control" style='margin-bottom:2px;' id='finish'> Finish </button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<tbody>
|
<script>
|
||||||
<% @stock_checks.each do |stock_check| %>
|
var count = 0
|
||||||
<tr>
|
|
||||||
<td><%= link_to 'Show', stock_check %></td>
|
|
||||||
<td><%= link_to 'Edit', edit_stock_check_path(stock_check) %></td>
|
|
||||||
<td><%= link_to 'Destroy', stock_check, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br>
|
$('#save_to_stock_check').on('click', function(){
|
||||||
|
count += 1;
|
||||||
|
product_sku = $('#product_sku').val();
|
||||||
|
product_qty = $('#product_qty').val();
|
||||||
|
var tr = '<tr>'
|
||||||
|
+ '<td>'+ count +'</td>'
|
||||||
|
+ '<td><input type=text value="'+ product_sku +'" id="item_sku_'+ count +'" name='+count+'></input></td>'
|
||||||
|
+ '<td><input type=text value="'+ product_qty +'" id="item_qty_'+ count +'" name='+count+'></input></td>'
|
||||||
|
+ '</tr>'
|
||||||
|
$('#stock_item').append(tr)
|
||||||
|
$('#product_sku').val('');
|
||||||
|
$('#product_qty').val('');
|
||||||
|
})
|
||||||
|
|
||||||
<%= link_to 'New Stock Check', new_stock_check_path %>
|
$('#finish').on('click',function(){
|
||||||
|
var reason = $('#stock_check_reason').val();
|
||||||
|
var arr = [];
|
||||||
|
var jsonStr = ''
|
||||||
|
|
||||||
|
for(var i = 1; i <= count; i++){
|
||||||
|
itemname = $('#item_sku_'+i ).val();
|
||||||
|
itemqty = $('#item_qty_'+i ).val();
|
||||||
|
arr.push({sku:itemname, qty:itemqty})
|
||||||
|
jsonStr = JSON.stringify(arr)
|
||||||
|
}
|
||||||
|
console.log(jsonStr)
|
||||||
|
$.ajax({
|
||||||
|
type: 'Post',
|
||||||
|
url: '<%= inventory_stock_check_save_path %>',
|
||||||
|
data:'stock_item='+ jsonStr + '&reason='+ reason,
|
||||||
|
success:function(data){
|
||||||
|
alert(data['stock_id'])
|
||||||
|
window.location.href = '/inventory/stock_checks/'+ data['stock_id'];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
json.array! @stock_checks, partial: 'stock_checks/stock_check', as: :stock_check
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<h1>New Stock Check</h1>
|
|
||||||
|
|
||||||
<%= render 'form', stock_check: @stock_check %>
|
|
||||||
|
|
||||||
<%= link_to 'Back', stock_checks_path %>
|
|
||||||
@@ -1,4 +1,74 @@
|
|||||||
<p id="notice"><%= notice %></p>
|
<div class="row">
|
||||||
|
<input type='hidden' id='stock_check_id' value='<%= @check.id %>'/>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2">
|
||||||
|
Check by
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<%= @check.check_by %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2">
|
||||||
|
Check At
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<%= @check.created_at %></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2">
|
||||||
|
Reason
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<%= @check.reason %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<table class="table table-striped col-md-12">
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>Product</th>
|
||||||
|
<th>Stock Count</th>
|
||||||
|
<th>Stock Balance</th>
|
||||||
|
<th>Different</th>
|
||||||
|
<th>Remark</th>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
count = 0
|
||||||
|
@check.stock_check_items.each do |item|
|
||||||
|
count += 1
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td><%= count %></td>
|
||||||
|
<td><%= item.item_code %></td>
|
||||||
|
<td><%= item.stock_count %></td>
|
||||||
|
<td><%= item.stock_balance %></td>
|
||||||
|
<td><%= item.different %></td>
|
||||||
|
<td><%= item.remark %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<button id="back" type="button" class="btn btn-block btn-primary"> Back </button>
|
||||||
|
<button id="save_to_journal" type="button" class="btn btn-block btn-primary"> Save to Journal </button>
|
||||||
|
<button id="print" type="button" class="btn btn-block btn-primary"> Print </button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= link_to 'Edit', edit_stock_check_path(@stock_check) %> |
|
<script>
|
||||||
<%= link_to 'Back', stock_checks_path %>
|
$('#save_to_journal').on('click', function(){
|
||||||
|
check_id = $('#stock_check_id').val();
|
||||||
|
$.ajax({
|
||||||
|
type: 'post',
|
||||||
|
url: '<%= inventory_save_to_journal_path %>',
|
||||||
|
data: 'data='+ check_id,
|
||||||
|
success: function(){
|
||||||
|
alert('success')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
json.partial! "stock_checks/stock_check", stock_check: @stock_check
|
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<title>SmartSales : Restaurant</title>
|
<title>SmartSales : Restaurant</title>
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
|
|
||||||
<%= stylesheet_link_tag 'inventory', media: 'all', 'data-turbolinks-track': 'reload' %>
|
<%= stylesheet_link_tag 'origami', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||||
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
||||||
<%= stylesheet_link_tag 'jquery-confirm', media: 'all', 'data-turbolinks-track': 'reload' %>
|
<%= stylesheet_link_tag 'jquery-confirm', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||||
<%= javascript_include_tag 'jquery-confirm', 'data-turbolinks-track': 'reload' %>
|
<%= javascript_include_tag 'jquery-confirm', 'data-turbolinks-track': 'reload' %>
|
||||||
|
|||||||
@@ -1,46 +1,43 @@
|
|||||||
<%= simple_form_for @in_juty,:url => origami_index_in_juty_path(@table.id), :method => :post do |f| %>
|
<%= simple_form_for @in_juty, :url => origami_index_in_juty_path(@table.id), :method => :post do |f| %>
|
||||||
<span class="patch_method"></span>
|
<span class="patch_method"></span>
|
||||||
<%= f.error_notification %>
|
<%= f.error_notification %>
|
||||||
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
|
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
|
||||||
|
|
||||||
<div class="form-inputs">
|
|
||||||
|
|
||||||
<%= f.hidden_field :dinning_id,:value => @table.id, :class => "form-control col-md-6 " %>
|
<div class="form-inputs">
|
||||||
|
|
||||||
|
<%= f.hidden_field :dinning_id, :value => @table.id, :class => "form-control col-md-4 " %>
|
||||||
|
|
||||||
|
<label>Dining Name:</label>
|
||||||
|
<%= @table.name %>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<label>Commissioner Name:</label>
|
||||||
|
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %>
|
||||||
|
<br/><br/>
|
||||||
|
|
||||||
|
<%= f.input :in_time, :placeholder => "From Date", :class => "form-control" %>
|
||||||
|
|
||||||
|
<%= f.input :out_time, :placeholder => "To Date", :class => "form-control" %>
|
||||||
|
|
||||||
|
</div><br>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<%= f.button :submit, "Create", :class => 'btn btn-primary ', :id => 'create' %>
|
||||||
|
<%= f.button :submit, "Update", :class => 'btn btn-primary ', :disabled => '', :id => 'update' %>
|
||||||
|
<%= f.button :button, "Reset", :class => 'btn btn-danger ', :id => 'reset' %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<label>Dining Name:</label>
|
|
||||||
<%= @table.name %>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
<label>Commissioner Name:</label>
|
|
||||||
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %><br/><br/>
|
|
||||||
|
|
||||||
<%= f.input :in_time, :placeholder => "From Date" , :class => "form-control", :as => :datetime_picker%>
|
|
||||||
|
|
||||||
<%= f.input :out_time, :placeholder => "From Date" , :class => "form-control", :as => :datetime_picker%>
|
|
||||||
</div><br>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<%= f.button :submit, "Create",:class => 'btn btn-primary ', :id => 'create' %>
|
|
||||||
<%= f.button :submit, "Update",:class => 'btn btn-primary ', :disabled =>'', :id => 'update' %>
|
|
||||||
<%= f.button :button, "Reset",:class => 'btn btn-danger ', :id => 'reset' %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function () {
|
||||||
// $('#in_juty_in_time').datetimepicker();
|
$('#reset').click(function () {
|
||||||
// $('#in_juty_out_time').datetimepicker();
|
location.reload();
|
||||||
$('#reset').click(function() {
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// window.location.href = '/origami/assign_in_juty/'+ table_id;
|
</script>
|
||||||
location.reload();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
<%= simple_form_for([:origami,@in_juty]) do |f| %>
|
<%= simple_form_for([:origami, @in_juty]) do |f| %>
|
||||||
<%= f.error_notification %>
|
<%= f.error_notification %>
|
||||||
|
|
||||||
<div class="form-inputs">
|
<div class="form-inputs">
|
||||||
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %><br/><br/>
|
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %>
|
||||||
<%= f.input :in_time %>
|
<br/><br/>
|
||||||
<%= f.input :out_time %>
|
<%= f.input :in_time %>
|
||||||
</div>
|
<%= f.input :out_time %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<%= f.button :submit %>
|
<%= f.button :submit %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,33 +1,43 @@
|
|||||||
<div class="col-md-3">
|
<%= simple_form_for @in_juty, :url => origami_index_in_juty_path(@table.id), :method => :post do |f| %>
|
||||||
<%= simple_form_for([:origami,@in_juty]) do |f| %>
|
<span class="patch_method"></span>
|
||||||
<%= f.error_notification %>
|
<%= f.error_notification %>
|
||||||
|
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
|
||||||
|
|
||||||
|
<div class="form-inputs">
|
||||||
|
|
||||||
|
<%= f.hidden_field :dinning_id, :value => @table.id, :class => "form-control col-md-4 " %>
|
||||||
|
|
||||||
|
<label>Dining Name:</label>
|
||||||
|
<%= @table.name %>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<label>Commissioner Name:</label>
|
||||||
|
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %>
|
||||||
|
<br/><br/>
|
||||||
|
|
||||||
|
<%= f.input :in_time, :placeholder => "From Date", :class => "form-control" %>
|
||||||
|
|
||||||
|
<%= f.input :out_time, :placeholder => "To Date", :class => "form-control" %>
|
||||||
|
|
||||||
|
</div><br>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<% f.button :submit, "Create", :class => 'btn btn-primary ', :id => 'create' %>
|
||||||
|
<% f.button :submit, "Update", :class => 'btn btn-primary ', :disabled => '', :id => 'update' %>
|
||||||
|
<% f.button :button, "Reset", :class => 'btn btn-danger ', :id => 'reset' %>
|
||||||
|
</div>
|
||||||
|
<div class="form-actions">
|
||||||
|
<%= f.button :submit, :class => 'btn btn-primary' %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-inputs">
|
|
||||||
<%= f.label :dinning_id %>
|
|
||||||
<%= f.collection_select :dinning_id, DiningFacility.all, :id, :name, {prompt: 'Select Dining Facilities'}, {class: 'form-control'} %><br/>
|
|
||||||
<%= f.label :commissioner_ids %>
|
|
||||||
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %><br/>
|
|
||||||
<label>In time</label>
|
|
||||||
<%= f.text_field :in_time, :value=>DateTime.now.strftime("%Y-%m-%d / %I:%M %p"),:class=>"form-control datepicker"%><br/>
|
|
||||||
<label>Out time</label>
|
|
||||||
<%= f.text_field :out_time, :value=>DateTime.now.strftime("%Y-%m-%d / %I:%M %p"),:class=>"form-control datepicker"%>
|
|
||||||
</div><br>
|
|
||||||
<div class="form-actions">
|
|
||||||
<%= link_to 'Back', origami_in_juties_path, class: 'btn btn-success' %>
|
|
||||||
<%= f.button :submit, class: 'btn btn-info' %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
$(function() {
|
$(document).ready(function () {
|
||||||
$('.datepicker').datepicker({
|
|
||||||
format : 'dd-mm-yyyy',
|
|
||||||
autoclose: true
|
|
||||||
});
|
|
||||||
$('.datepicker').attr('ReadOnly','true');
|
|
||||||
$('.datepicker').css('cursor','pointer');
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -1,38 +1,91 @@
|
|||||||
<div class="page-header">
|
<div class="row">
|
||||||
<ul class="breadcrumb">
|
|
||||||
<li><a href="<%= origami_root_path %>">Home</a></li>
|
<div class="col-md-8">
|
||||||
<li>In Juties</li>
|
<table class="table table-striped">
|
||||||
<span style="float: right">
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Select</th>
|
||||||
|
<th>Dining Facility Name</th>
|
||||||
|
<th>Commissioner Ids</th>
|
||||||
|
<th>In time</th>
|
||||||
|
<th>Out time</th>
|
||||||
|
<th colspan="2"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<% @juties_in.each do |in_juty| %>
|
||||||
|
<tr class="injuty_tr" data-ref="<%= in_juty.id %>">
|
||||||
|
<td>
|
||||||
|
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check"></td>
|
||||||
|
<td><%= in_juty.dining_facility.name rescue '-' %></td>
|
||||||
|
<td><%= in_juty.commissioner.name rescue '-' %></td>
|
||||||
|
<td><%= in_juty.in_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %></td>
|
||||||
|
<td><%= in_juty.out_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %></td>
|
||||||
|
<td><%= link_to 'Destroy', origami_destroy_in_juty_path(in_juty.dining_facility.id, in_juty), method: :delete, data: {confirm: 'Are you sure?'} %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<%= paginate @juties_in %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4 partial">
|
||||||
|
<%= render 'form', in_juty: @in_juty, table: @table %>
|
||||||
|
</div>
|
||||||
|
<span style="float: right">
|
||||||
<%= link_to t('.new', :default => t("helpers.links.new")), new_origami_in_juty_path, :class => 'btn btn-primary btn-sm' %>
|
<%= link_to t('.new', :default => t("helpers.links.new")), new_origami_in_juty_path, :class => 'btn btn-primary btn-sm' %>
|
||||||
</span>
|
</span>
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<div class="col-md-1">
|
||||||
<div class="card">
|
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
|
||||||
<table class="table table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Dining Facility Name</th>
|
|
||||||
<th>Commissioner Ids</th>
|
|
||||||
<th>In time</th>
|
|
||||||
<th>Out time</th>
|
|
||||||
<th colspan="3"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<% @in_juties.each do |in_juty| %>
|
|
||||||
<tr>
|
|
||||||
<td><%= in_juty.dining_facility.name rescue '-' %></td>
|
|
||||||
<td><%= in_juty.commissioner.name rescue '-' %></td>
|
|
||||||
<td><%= in_juty.in_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %></td>
|
|
||||||
<td><%= in_juty.out_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %></td>
|
|
||||||
<td><%= link_to 'Show', origami_in_juty_path(in_juty) %></td>
|
|
||||||
<td><%= link_to 'Edit', edit_origami_in_juty_path(in_juty) %></td>
|
|
||||||
<td><%= link_to 'Destroy', origami_in_juty_path(in_juty), method: :delete, data: {confirm: 'Are you sure?'} %></td>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).on('click', ".injuty_tr", function () {
|
||||||
|
|
||||||
|
$(this).closest('tr').find('.checkbox_check').prop("checked", true);
|
||||||
|
|
||||||
|
var in_juty_id = $(this).attr('data-ref');
|
||||||
|
var table_id = "<%= @table.id %>";
|
||||||
|
var url = "/origami/assign_in_juty/table/" + table_id + "/in_juty/" + in_juty_id + "/edit";
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: url,
|
||||||
|
data: {},
|
||||||
|
|
||||||
|
success: function (data) {
|
||||||
|
debugger;
|
||||||
|
$('.partial').empty().append(data);
|
||||||
|
// $('#in_juty_id').val(data.in_juty.id);
|
||||||
|
// $('#in_juty_commissioner_ids').val(data.commissioner.id);
|
||||||
|
// $('#in_juty_in_time').val(data.in_juty.in_time);
|
||||||
|
// $('#in_juty_out_time').val(data.in_juty.out_time);
|
||||||
|
//
|
||||||
|
// $('#update').removeAttr('disabled').val('');
|
||||||
|
// $('#update').attr('value', 'Update');
|
||||||
|
// $('#create').attr('disabled', 'disabled');
|
||||||
|
//
|
||||||
|
// $("#new_in_juty").attr('class', 'simple_form edit_in_juty');
|
||||||
|
// var id = "edit_in_juty_" + in_juty_id;
|
||||||
|
// $("#new_in_juty").attr('id', id);
|
||||||
|
//
|
||||||
|
// $(".edit_in_juty").attr('id', id);
|
||||||
|
// $(".edit_in_juty").attr('action', '/origami/edit_in_juty/' + $('#in_juty_id').val());
|
||||||
|
// $(".edit_in_juty").attr('action', '/origami/edit_in_juty/' + $('#in_juty_id').val());
|
||||||
|
// $(".patch_method").html('<input type="hidden" name="_method" value="patch">');
|
||||||
|
|
||||||
|
// setInterval(function () {
|
||||||
|
// $('.partial').load('/controller_name/action_name');
|
||||||
|
// }, 3000);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#back').on('click', function () {
|
||||||
|
window.location.href = '/origami/table/' + "<%= @table.id %>";
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -16,74 +16,87 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<% @juties_in.each do |in_juty| %>
|
<% @juties_in.each do |in_juty| %>
|
||||||
<tr class="injuty_tr" data-ref="<%= in_juty.id %>">
|
<tr class="injuty_tr" data-ref="<%= in_juty.id %>">
|
||||||
<td>
|
<td>
|
||||||
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check"></td>
|
||||||
<td><%= in_juty.dining_facility.name rescue '-' %></td>
|
<td><%= in_juty.dining_facility.name rescue '-' %></td>
|
||||||
<td><%= in_juty.commissioner.name rescue '-' %></td>
|
<td><%= in_juty.commissioner.name rescue '-' %></td>
|
||||||
<td><%= in_juty.in_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %></td>
|
<td><%= in_juty.in_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %></td>
|
||||||
<td><%= in_juty.out_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %></td>
|
<td><%= in_juty.out_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %></td>
|
||||||
<td><%= link_to 'Destroy', origami_destroy_in_juty_path(in_juty.dining_facility.id,in_juty),method: :delete, data: {confirm: 'Are you sure?'} %></td>
|
<td><%= link_to 'Remove', origami_destroy_in_juty_path(in_juty.dining_facility.id, in_juty), method: :delete, data: {confirm: 'Are you sure?'} %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<%= paginate @juties_in %>
|
<%= paginate @juties_in %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4 partial">
|
||||||
<%= render 'assign_in_juty', in_juty: @in_juty ,table: @table %>
|
<%= render 'form', in_juty: @in_juty, table: @table %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1">
|
<div class="row">
|
||||||
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
|
<button type="button" class="col-md-1 btn btn-primary btn-block" id='back'>Back</button>
|
||||||
|
<button class="col-md-1 btn btn-info" id="reset">New</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).on('click',".injuty_tr",function(){
|
$(document).on('click', ".injuty_tr", function () {
|
||||||
|
|
||||||
// if(this.checked){
|
|
||||||
$(this).closest('tr').find('.checkbox_check').prop( "checked", true );
|
|
||||||
//$( "#checkbox_check" ).prop( "checked", true );
|
|
||||||
|
|
||||||
var in_juty_id = $(this).attr('data-ref');
|
|
||||||
var table_id = "<%= @table.id %>";
|
|
||||||
var url = "/origami/assign_in_juty/table/" + table_id + "/in_juty/" + in_juty_id + "/edit";
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
type: "GET",
|
|
||||||
url: url,
|
|
||||||
data: {},
|
|
||||||
|
|
||||||
success: function(data) {
|
|
||||||
// Selected for Taxes
|
|
||||||
|
|
||||||
$('#in_juty_id').val(data.in_juty.id);
|
|
||||||
$('#in_juty_commissioner_ids').val(data.commissioner.id);
|
|
||||||
$('#in_juty_in_time').val(data.in_juty.in_time.split('T')[0]);
|
|
||||||
$('#in_juty_out_time').val(data.in_juty.out_time.split('T')[0]);
|
|
||||||
|
|
||||||
$('#update').removeAttr('disabled').val('');
|
$(this).closest('tr').find('.checkbox_check').prop("checked", true);
|
||||||
$('#update').attr('value', 'Update');
|
|
||||||
$('#create').attr('disabled','disabled');
|
|
||||||
|
|
||||||
$("#new_in_juty").attr('class', 'simple_form edit_in_juty');
|
var in_juty_id = $(this).attr('data-ref');
|
||||||
var id = "edit_in_juty_" + in_juty_id;
|
var table_id = "<%= @table.id %>";
|
||||||
$("#new_in_juty").attr('id', id);
|
var url = "/origami/assign_in_juty/table/" + table_id + "/in_juty/" + in_juty_id + "/edit";
|
||||||
|
|
||||||
$(".edit_in_juty").attr('id', id);
|
$.ajax({
|
||||||
$(".edit_in_juty").attr('action', '/origami/edit_in_juty/' + $('#in_juty_id').val());
|
type: "GET",
|
||||||
$(".edit_in_juty").attr('action', '/origami/edit_in_juty/' + $('#in_juty_id').val());
|
url: url,
|
||||||
$(".patch_method").html('<input type="hidden" name="_method" value="patch">');
|
data: {},
|
||||||
}
|
|
||||||
});
|
|
||||||
// }else{
|
|
||||||
|
|
||||||
// }
|
success: function (data) {
|
||||||
})
|
debugger;
|
||||||
|
$('.partial').empty().append(data);
|
||||||
|
// $('#in_juty_id').val(data.in_juty.id);
|
||||||
|
// $('#in_juty_commissioner_ids').val(data.commissioner.id);
|
||||||
|
// $('#in_juty_in_time').val(data.in_juty.in_time);
|
||||||
|
// $('#in_juty_out_time').val(data.in_juty.out_time);
|
||||||
|
//
|
||||||
|
// $('#update').removeAttr('disabled').val('');
|
||||||
|
// $('#update').attr('value', 'Update');
|
||||||
|
// $('#create').attr('disabled', 'disabled');
|
||||||
|
//
|
||||||
|
// $("#new_in_juty").attr('class', 'simple_form edit_in_juty');
|
||||||
|
// var id = "edit_in_juty_" + in_juty_id;
|
||||||
|
// $("#new_in_juty").attr('id', id);
|
||||||
|
//
|
||||||
|
// $(".edit_in_juty").attr('id', id);
|
||||||
|
// $(".edit_in_juty").attr('action', '/origami/edit_in_juty/' + $('#in_juty_id').val());
|
||||||
|
// $(".edit_in_juty").attr('action', '/origami/edit_in_juty/' + $('#in_juty_id').val());
|
||||||
|
// $(".patch_method").html('<input type="hidden" name="_method" value="patch">');
|
||||||
|
|
||||||
|
// setInterval(function () {
|
||||||
|
// $('.partial').load('/controller_name/action_name');
|
||||||
|
// }, 3000);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$('#back').on('click', function () {
|
$('#back').on('click', function () {
|
||||||
window.location.href = '/origami/table/'+ "<%= @table.id %>";
|
window.location.href = '/origami/table/' + "<%= @table.id %>";
|
||||||
})
|
});
|
||||||
</script>
|
|
||||||
|
$('#reset').click(function () {
|
||||||
|
var url = "<%= new_origami_in_juty_path %>";
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: url,
|
||||||
|
data: { table_id: <%= @table.id %> },
|
||||||
|
success: function (data) {
|
||||||
|
$('.partial').empty().append(data);
|
||||||
|
$('.injuty_tr > td > .checkbox_check').prop("checked", false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
<li>New</li>
|
<li>New</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<%= render 'form', in_juty: @in_juty %>
|
<%= render 'form', in_juty: @in_juty, table: @table %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,5 +13,4 @@
|
|||||||
$("#promotion_promo_code").val(Math.random().toString(36).slice(5) + Math.random().toString(36).slice(5));
|
$("#promotion_promo_code").val(Math.random().toString(36).slice(5) + Math.random().toString(36).slice(5));
|
||||||
// $( "#fromtime" ).timepicker();
|
// $( "#fromtime" ).timepicker();
|
||||||
// $( "#totime" ).timepicker({ 'scrollDefault': 'now' });
|
// $( "#totime" ).timepicker({ 'scrollDefault': 'now' });
|
||||||
$('#scrollDefaultExample').timepicker({ 'scrollDefault': 'now' });
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -335,9 +335,12 @@ Rails.application.routes.draw do
|
|||||||
# ----------- Inventory ---------------------------
|
# ----------- Inventory ---------------------------
|
||||||
|
|
||||||
namespace :inventory do
|
namespace :inventory do
|
||||||
get 'inventory' => 'inventory#index'
|
get '/' => 'inventory#index'
|
||||||
resources :stock_check_items
|
get '/stock_checks' => 'stock_checks#index'
|
||||||
resources :stock_checks
|
post 'save_stock' => 'stock_checks#create', as:'stock_check_save'
|
||||||
|
get '/stock_checks/:id' => 'stock_checks#show'
|
||||||
|
post 'save_to_journal' => 'stock_checks#save_to_journal', as: 'save_to_journal'
|
||||||
|
# resources :stock_checks
|
||||||
resources :stock_journals
|
resources :stock_journals
|
||||||
resources :inventory_definitions
|
resources :inventory_definitions
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ class CreateInventoryDefinitions < ActiveRecord::Migration[5.1]
|
|||||||
t.string :item_code
|
t.string :item_code
|
||||||
t.integer :min_order_level, :default => 0
|
t.integer :min_order_level, :default => 0
|
||||||
t.integer :max_stock_level, :default => 0
|
t.integer :max_stock_level, :default => 0
|
||||||
|
t.integer :created_by
|
||||||
|
t.boolean :is_active, :default => true
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class CreateStockCheckItems < ActiveRecord::Migration[5.1]
|
class CreateStockCheckItems < ActiveRecord::Migration[5.1]
|
||||||
def change
|
def change
|
||||||
create_table :stock_check_items do |t|
|
create_table :stock_check_items do |t|
|
||||||
t.integer :stock_check_id, :null => false
|
t.integer :stock_check_id
|
||||||
t.string :item_code, :null => false
|
t.string :item_code, :null => false
|
||||||
t.integer :stock_count, :default => 0
|
t.integer :stock_count, :default => 0
|
||||||
t.integer :stock_journal_id
|
t.integer :stock_journal_id
|
||||||
|
|||||||
Reference in New Issue
Block a user