check duplicate batch no
This commit is contained in:
@@ -26,9 +26,11 @@ namespace :setup do
|
||||
task :set_product_category, [:name,:product_type] => :environment do |t, args|
|
||||
find_product_type=ProductType.find_by_id(args.product_type)
|
||||
if !find_product_type.nil?
|
||||
|
||||
find_product_category=ProductCategory.find_by_name(args.name)
|
||||
|
||||
|
||||
if find_product_category.nil?
|
||||
|
||||
product_category=ProductCategory.new
|
||||
product_category.name=args.name
|
||||
product_category.product_type_id=args.product_type
|
||||
|
||||
Reference in New Issue
Block a user