Promotion Product Bug Fix
This commit is contained in:
@@ -4,7 +4,7 @@ class Settings::PromotionsController < ApplicationController
|
||||
# GET /promotions
|
||||
# GET /promotions.json
|
||||
def index
|
||||
@promotions = Promotion.all
|
||||
@promotions = Promotion.all.order("created_at asc")
|
||||
end
|
||||
|
||||
# GET /promotions/1
|
||||
@@ -85,6 +85,6 @@ class Settings::PromotionsController < ApplicationController
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def promotion_params
|
||||
params.require(:promotion).permit(:promo_code, :promo_start_date, :promo_end_date, :promo_start_hour,:promo_end_hour ,:promo_day, :promo_type,:original_product ,:min_qty ,:created_by,
|
||||
:promotion_products_attributes => [:item_code, :min_qty, :net_off, :net_price, :percentage, :_destroy])
|
||||
:promotion_products_attributes => [:id,:item_code, :min_qty, :net_off, :net_price, :percentage, :_destroy])
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user