merge with august spring but merge fail

This commit is contained in:
Yan
2017-08-31 15:58:01 +06:30
9 changed files with 306 additions and 176 deletions

4
.gitignore vendored
View File

@@ -47,9 +47,9 @@ config/deploy/config/*
#Gemfile.lock
# For Redis Server log file
dump.rdb
/dump.rdb
# Fonts
# Fonts
public/fonts/*
# Ruby-Mine IDE folder

346
.idea/workspace.xml generated
View File

@@ -3,14 +3,9 @@
<component name="ChangeListManager">
<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$/.gitignore" afterPath="$PROJECT_DIR$/.gitignore" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<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/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" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/db/migrate/20170824110103_create_inventory_definitions.rb" afterPath="$PROJECT_DIR$/db/migrate/20170824110103_create_inventory_definitions.rb" />
</list>
<ignored path="$PROJECT_DIR$/.bundle/" />
<ignored path="$PROJECT_DIR$/components/" />
@@ -25,7 +20,7 @@
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CoverageDataManager">
<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@Development__sxrestaurant.coverage" NAME="Development: sxrestaurant Coverage Results" MODIFIED="1504150298331" 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" />
</component>
@@ -52,76 +47,71 @@
</component>
<component name="FileEditorManager">
<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">
<file leaf-file-name="20170824110103_create_inventory_definitions.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/db/migrate/20170824110103_create_inventory_definitions.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" />
<state relative-caret-position="180">
<caret line="10" column="7" lean-forward="false" selection-start-line="10" selection-start-column="7" selection-end-line="10" selection-end-column="7" />
<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">
<file leaf-file-name=".gitignore" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/.gitignore">
<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" />
<state relative-caret-position="298">
<caret line="38" column="11" lean-forward="false" selection-start-line="38" selection-start-column="11" selection-end-line="38" selection-end-column="11" />
<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">
<entry file="file://$PROJECT_DIR$/app/views/inventory/inventory_definitions/_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" />
<state relative-caret-position="18">
<caret line="1" column="37" lean-forward="false" selection-start-line="1" selection-start-column="37" selection-end-line="1" selection-end-column="37" />
<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">
<file leaf-file-name="inventory_definitions_controller.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/controllers/inventory/inventory_definitions_controller.rb">
<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" />
<state relative-caret-position="270">
<caret line="15" column="9" lean-forward="false" selection-start-line="15" selection-start-column="9" selection-end-line="15" selection-end-column="9" />
<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">
<file leaf-file-name="inventory_definition.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/models/inventory_definition.rb">
<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 relative-caret-position="0">
<caret line="0" column="6" lean-forward="false" selection-start-line="0" selection-start-column="6" selection-end-line="0" selection-end-column="6" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="index.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/origami/in_juties/index.html.erb">
<entry file="file://$PROJECT_DIR$/app/views/inventory/inventory_definitions/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" />
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="new.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/inventory/inventory_definitions/new.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="162">
<caret line="9" column="18" lean-forward="false" selection-start-line="9" selection-start-column="18" selection-end-line="9" selection-end-column="18" />
<folding />
</state>
</provider>
@@ -161,8 +151,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/db/migrate/20170822034139_create_product_commissions.rb" />
<option value="$PROJECT_DIR$/db/migrate/20170823034140_create_product_commissions.rb" />
<option value="$PROJECT_DIR$/app/views/origami/commissions/_commissioners.html.erb" />
<option value="$PROJECT_DIR$/db/migrate/20170823034141_create_product_commissions.rb" />
<option value="$PROJECT_DIR$/app/models/menu_item.rb" />
@@ -212,6 +200,8 @@
<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" />
<option value="$PROJECT_DIR$/db/migrate/20170824110103_create_inventory_definitions.rb" />
<option value="$PROJECT_DIR$/.gitignore" />
</list>
</option>
</component>
@@ -291,53 +281,26 @@
<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="inventory" 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" />
<item name="inventory" type="462c0819:PsiDirectoryNode" />
<item name="inventory_definitions" 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="reports" type="462c0819:PsiDirectoryNode" />
<item name="db" 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="reports" type="462c0819:PsiDirectoryNode" />
<item name="commission" 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="settings" 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="settings" type="462c0819:PsiDirectoryNode" />
<item name="commissions" 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="settings" type="462c0819:PsiDirectoryNode" />
<item name="promotions" type="462c0819:PsiDirectoryNode" />
<item name="db" type="462c0819:PsiDirectoryNode" />
<item name="migrate" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
@@ -744,12 +707,12 @@
<workItem from="1503457057830" duration="7166000" />
<workItem from="1503472116907" duration="50209000" />
<workItem from="1503843212665" duration="21267000" />
<workItem from="1503909487511" duration="50516000" />
<workItem from="1503909487511" duration="54855000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="203134000" />
<option name="totallyTimeSpent" value="207473000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@@ -765,17 +728,17 @@
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.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="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="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="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.48701972" 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.34890965" 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="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.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="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="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="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
@@ -786,6 +749,42 @@
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="Vcs.Log.History.Properties">
<option name="COLUMN_ORDER">
<list>
<option value="0" />
<option value="2" />
<option value="3" />
<option value="1" />
</list>
</option>
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State>
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
</option>
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
<collection />
</option>
<option name="COLUMN_ORDER">
<list>
<option value="0" />
<option value="1" />
<option value="2" />
<option value="3" />
</list>
</option>
</State>
</value>
</entry>
</map>
</option>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
@@ -796,65 +795,6 @@
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/app/controllers/reports/bksaleitem_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/reports/shiftsale_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="4" column="0" lean-forward="true" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/reports/shiftsale/index.xls.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="54">
<caret line="3" column="12" lean-forward="true" selection-start-line="3" selection-start-column="12" selection-end-line="3" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/settings/commissions/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="142">
<caret line="19" column="27" lean-forward="true" selection-start-line="19" selection-start-column="27" selection-end-line="19" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20170403135934_create_orders.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="54">
<caret line="3" column="112" lean-forward="true" selection-start-line="3" selection-start-column="112" selection-end-line="3" selection-end-column="112" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20170701101420_create_sales.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="37" lean-forward="true" selection-start-line="2" selection-start-column="25" selection-end-line="2" selection-end-column="37" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/seeds.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-3790">
<caret line="16" column="53" lean-forward="true" selection-start-line="16" selection-start-column="53" selection-end-line="16" selection-end-column="53" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/models/seed_generator.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="11" lean-forward="false" selection-start-line="2" selection-start-column="11" selection-end-line="2" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20170825093252_create_commissions.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
@@ -863,14 +803,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20170825090115_create_commissioners.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="18">
<caret line="1" column="47" lean-forward="true" selection-start-line="1" selection-start-column="4" selection-end-line="1" selection-end-column="47" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20170825034141_create_product_commissions.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
@@ -1119,7 +1051,7 @@
<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" />
<element signature="n#!!doc" expanded="false" />
<marker date="1504065881000" expanded="true" signature="2006:2033" ph="..." />
<marker date="1504065881000" expanded="true" signature="2829:2856" ph="..." />
</folding>
@@ -1153,23 +1085,7 @@
<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" />
<caret line="56" column="21" lean-forward="false" selection-start-line="56" selection-start-column="12" selection-end-line="56" selection-end-column="21" />
<folding />
</state>
</provider>
@@ -1206,7 +1122,95 @@
<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" />
<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 />
</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="-215">
<caret line="1" column="38" lean-forward="false" 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="false" 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$/db/migrate/20170825090115_create_commissioners.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="18">
<caret line="1" column="47" lean-forward="true" selection-start-line="1" selection-start-column="2" selection-end-line="1" selection-end-column="47" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20170824110117_create_stock_journals.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/inventory/inventory_definitions/new.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="162">
<caret line="9" column="18" lean-forward="false" selection-start-line="9" selection-start-column="18" selection-end-line="9" selection-end-column="18" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/inventory/inventory_definitions/_form.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="18">
<caret line="1" column="37" lean-forward="false" selection-start-line="1" selection-start-column="37" selection-end-line="1" selection-end-column="37" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/inventory/inventory_definitions/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/models/inventory_definition.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="6" lean-forward="false" selection-start-line="0" selection-start-column="6" selection-end-line="0" selection-end-column="6" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/inventory/inventory_definitions_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="15" column="9" lean-forward="false" selection-start-line="15" selection-start-column="9" selection-end-line="15" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20170824110103_create_inventory_definitions.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="10" column="7" lean-forward="false" selection-start-line="10" selection-start-column="7" selection-end-line="10" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="298">
<caret line="38" column="11" lean-forward="false" selection-start-line="38" selection-start-column="11" selection-end-line="38" selection-end-column="11" />
<folding />
</state>
</provider>

View File

@@ -22,7 +22,23 @@ class Inventory::StockChecksController < BaseInventoryController
StockJournal.from_stock_check(item)
end
end
def print_stock_check
stock_id = params[:stock_check_id] # sale_id
stockcheck = StockCheck.find(stock_id)
stockcheck_items = stockcheck.stock_check_items
member_info = nil
unique_code = "StockPrint"
shop_details = Shop.find(1)
checker = Employee.find(stockcheck.check_by)
print_settings=PrintSetting.find_by_unique_code(unique_code)
printer = Printer::ReceiptPrinter.new(print_settings)
printer.print_stock_check_result(print_settings,stockcheck, stockcheck_items,checker.name, shop_details)
end
# before_action :set_stock_check, only: [:show, :edit, :update, :destroy]
# GET /stock_checks

View File

@@ -74,7 +74,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
# print as print copies in printer setting
count = printer_settings.print_copies
begin
begin
if count == 1
pdf.render_file "tmp/receipt_bill_#{sale_data.receipt_no}.pdf"
self.print("tmp/receipt_bill_#{sale_data.receipt_no}.pdf")
@@ -84,9 +84,16 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
end
count -= 1
end until count == 0
end until count == 0
end
# stock check
def print_stock_check_result(print_settings,stockcheck, stockcheck_items,checker_name, shop_details)
pdf = StockResultPdf.new(print_settings,stockcheck, stockcheck_items,checker_name, shop_details)
pdf.render_file "tmp/print_stock_check_result.pdf"
self.print("tmp/print_stock_check_result.pdf")
end
#Queue No Print
def print_queue_no(printer_settings,queue)
#Use CUPS service

View File

@@ -0,0 +1,92 @@
class StockResultPdf < Prawn::Document
attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width,:text_width
def initialize(printer_settings,stockcheck, stockcheck_items,checker_name, shop_details)
self.page_width = printer_settings.page_width #PrintSetting.where("name = ?","Close Cashier").first.page_width
self.page_height = printer_settings.page_height
self.margin = 5
self.price_width = 40
self.qty_width = 20
self.total_width = 40
self.item_width = self.page_width - ((self.price_width + self.qty_width + self.total_width))
self.item_height = 15
self.item_description_width = (self.page_width-20) / 2
self.label_width = 100
self.text_width = (self.page_width - 80) - self.price_width / 3
# @item_width = self.page_width.to_i / 2
# @qty_width = @item_width.to_i / 3
# @double = @qty_width * 1.3
# @half_qty = @qty_width / 2
#setting page margin and width
super(:margin => [printer_settings.heading_space, self.margin, self.margin, self.margin], :page_size => [self.page_width, self.page_height])
# font "public/fonts/#{font_name}".to_s + ".ttf".to_s
# font "public/fonts/Zawgyi-One.ttf"
# font "public/fonts/padauk.ttf"
self.header_font_size = 10
self.item_font_size = 8
header( shop_details)
stroke_horizontal_rule
detail(stockcheck,stockcheck_items, checker_name)
end
def header (shop_details)
move_down 7
text "#{shop_details.name}", :left_margin => -10, :size => self.header_font_size,:align => :center
move_down 5
text "#{shop_details.address}", :size => self.item_font_size,:align => :center
# move_down self.item_height
move_down 5
text "#{shop_details.phone_no}", :size => self.item_font_size,:align => :center
move_down 5
stroke_horizontal_rule
end
def detail(stockcheck, stockcheck_items, checker_name)
move_down 7
y_position = cursor
bounding_box([0,y_position], :width =>self.label_width, :height => self.item_height) do
text "Checker : ", :size => self.item_font_size,:align => :left
end
bounding_box([self.label_width,y_position], :width => self.label_width, :height => self.item_height) do
text "#{checker_name}" , :size => self.item_font_size,:align => :left
end
y_position = cursor
bounding_box([0,y_position], :width =>self.label_width, :height => self.item_height) do
text "Check Start Time : ", :size => self.item_font_size,:align => :left
end
bounding_box([self.label_width,y_position], :width => self.label_width, :height => self.item_height) do
text "#{ stockcheck.check_start.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') }" , :size => self.item_font_size,:align => :left
end
y_position = cursor
bounding_box([0,y_position], :width =>self.label_width, :height => self.item_height) do
text "Check End Time ", :size => self.item_font_size,:align => :left
end
bounding_box([self.label_width,y_position], :width => self.label_width, :height => self.item_height) do
text "#{ stockcheck.check_start.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') }" , :size => self.item_font_size,:align => :left
end
if stockcheck_items.length > 0
stockcheck_items.each do |st|
move_down 5
y_position = cursor
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
text "#{ st.item_code }", :size => self.item_font_size,:align => :left
end
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{st.stock_count.to_i}" , :size => self.item_font_size,:align => :right
end
end
end
move_down 5
stroke_horizontal_rule
end
end

View File

@@ -71,4 +71,13 @@ $('#save_to_journal').on('click', function(){
}
})
})
$('#print').on('click',function(){
check_id = $('#stock_check_id').val();
$.ajax({
type: 'post',
url: '<%= inventory_print_stock_check_path %>',
data: 'stock_check_id='+ check_id
})
})
</script>

View File

@@ -347,6 +347,7 @@ Rails.application.routes.draw do
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'
post 'print_stock_check' => 'stock_checks#print_stock_check', as: 'print_stock_check'
# resources :stock_checks
resources :stock_journals
resources :inventory_definitions

View File

@@ -1,4 +1,5 @@
class CreateInventoryDefinitions < ActiveRecord::Migration[5.1]
# rake db:migrate:down VERSION=20170824110103
def change
create_table :inventory_definitions do |t|
t.string :item_code

BIN
dump.rdb

Binary file not shown.