shop code

This commit is contained in:
Myat Zin Wai Maw
2019-11-22 18:24:02 +06:30
parent 5a3f328789
commit d1ab2c194d
106 changed files with 834 additions and 895 deletions

View File

@@ -30,6 +30,7 @@ class Settings::PromotionsController < ApplicationController
def create
@promotion = Promotion.new(promotion_params)
@promotion.created_by = current_login_employee.id
@promotion.shop_code = @shop.shop_code
if !@promotion.promo_start_hour.nil?
@promotion.promo_start_hour = @promotion.promo_start_hour.to_datetime.advance(hours: +6, minutes: +30)
end
@@ -126,7 +127,7 @@ class Settings::PromotionsController < ApplicationController
redirect_to root_path
end
end
private
# Use callbacks to share common setup or constraints between actions.
def set_promotion