shop code
This commit is contained in:
@@ -11,7 +11,7 @@ class PrintSettingsController < ApplicationController
|
||||
# GET /print_settings/1
|
||||
# GET /print_settings/1.json
|
||||
def show
|
||||
@lookup = Lookup.shift_sale_items_lookup_value
|
||||
@lookup = Lookup.shift_sale_items_lookup_value(@shop.shop_code)
|
||||
end
|
||||
|
||||
# GET /print_settings/new
|
||||
@@ -22,7 +22,7 @@ class PrintSettingsController < ApplicationController
|
||||
|
||||
# GET /print_settings/1/edit
|
||||
def edit
|
||||
@lookup = Lookup.shift_sale_items_lookup_value
|
||||
@lookup = Lookup.shift_sale_items_lookup_value(@shop.shop_code)
|
||||
@server_mode = ENV["SERVER_MODE"]
|
||||
end
|
||||
|
||||
@@ -30,7 +30,7 @@ class PrintSettingsController < ApplicationController
|
||||
# POST /print_settings.json
|
||||
def create
|
||||
@print_setting = PrintSetting.new(print_setting_params)
|
||||
|
||||
@print_setting.shop_code = @shop.shop_code
|
||||
respond_to do |format|
|
||||
if @print_setting.save
|
||||
format.html { redirect_to @print_setting, notice: 'Print setting was successfully created.' }
|
||||
@@ -48,7 +48,7 @@ class PrintSettingsController < ApplicationController
|
||||
respond_to do |format|
|
||||
if @print_setting.update(print_setting_params)
|
||||
if @print_setting.unique_code == 'CloseCashierPdf'
|
||||
Lookup.save_shift_sale_items_settings(params[:shift_sale_items])
|
||||
Lookup.save_shift_sale_items_settings(params[:shift_sale_items],@shop.shop_code)
|
||||
end
|
||||
|
||||
format.html { redirect_to @print_setting, notice: 'Print setting was successfully updated.' }
|
||||
@@ -68,8 +68,8 @@ class PrintSettingsController < ApplicationController
|
||||
render :json => {:status=> "Success", :url => print_settings_url }.to_json
|
||||
end
|
||||
|
||||
def get_printer_options
|
||||
printer_name = params[:printer_name]
|
||||
def get_printer_options
|
||||
printer_name = params[:printer_name]
|
||||
printer_options = Printer::PrinterWorker.printer_options(printer_name)
|
||||
options = {
|
||||
:url => printer_options['device-uri'],
|
||||
|
||||
Reference in New Issue
Block a user