update instanc code unique receipt bill and sale item

This commit is contained in:
Aung Myo
2017-12-04 12:18:20 +06:30
parent 070ab18832
commit 7ef75a285a
6 changed files with 50 additions and 35 deletions

View File

@@ -70,7 +70,8 @@ class Settings::MenuItemInstancesController < ApplicationController
format.html { redirect_to settings_menu_category_simple_menu_item_path(category,catID), notice: 'Menu item instance was successfully created.' }
format.json { render :show, status: :created, location: @settings_menu_item_instances }
else
format.html { render :new }
flash[:instance_code_error] = @settings_menu_item_instances.errors
format.html { redirect_to new_settings_simple_menu_item_menu_item_instance_path }
format.json { render json: @settings_menu_item_instances.errors, status: :unprocessable_entity }
end
end