update shop note
This commit is contained in:
@@ -13,7 +13,7 @@ class Settings::SetMenuItemsController < ApplicationController
|
||||
# GET /settings/menu_items/1.json
|
||||
def show
|
||||
# @sub_menu = MenuItem.where("menu_item_id=?",params[:id]).page(params[:page]).per(10)
|
||||
@menu_item_instance = MenuItemInstance.where("menu_item_id=?",params[:id]).page(params[:page]).per(10)
|
||||
@menu_item_instance = MenuItemInstance.where("menu_item_id=?",params[:id])
|
||||
end
|
||||
|
||||
# GET /settings/menu_items/new
|
||||
|
||||
@@ -101,6 +101,6 @@ class Settings::ShopsController < ApplicationController
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def shop_params
|
||||
params.require(:shop).permit(:logo, :name,:address,:city,:township,:state,:country,:phone_no,:reservation_no,:license,:activated_at,:license_data,:base_currency,:cloud_token,:cloud_url,:owner_token,:id_prefix,:is_rounding_adj,:quick_sale_summary,:calc_tax_order,:show_account_info, display_images_attributes: [:id, :shop_id, :name, :image])
|
||||
params.require(:shop).permit(:logo, :name,:address,:city,:township,:state,:country,:phone_no,:reservation_no,:license,:activated_at,:license_data,:base_currency,:cloud_token,:cloud_url,:owner_token,:id_prefix,:is_rounding_adj,:quick_sale_summary,:calc_tax_order,:show_account_info,:note, display_images_attributes: [:id, :shop_id, :name, :image])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -13,7 +13,7 @@ class Settings::SimpleMenuItemsController < ApplicationController
|
||||
# GET /settings/menu_items/1.json
|
||||
def show
|
||||
# @sub_menu = MenuItem.where("menu_item_id=?",params[:id]).page(params[:page]).per(10)
|
||||
@menu_item_instance = MenuItemInstance.where("menu_item_id=?",params[:id]).page(params[:page]).per(10)
|
||||
@menu_item_instance = MenuItemInstance.where("menu_item_id=?",params[:id])
|
||||
end
|
||||
|
||||
# GET /settings/menu_items/new
|
||||
|
||||
@@ -92,6 +92,10 @@ class ReceiptBillA5Pdf < Prawn::Document
|
||||
|
||||
sign(sale_data)
|
||||
|
||||
if shop_details.note != nil
|
||||
shop_note(printed_status)
|
||||
end
|
||||
|
||||
footer(printed_status)
|
||||
end
|
||||
|
||||
@@ -647,6 +651,19 @@ class ReceiptBillA5Pdf < Prawn::Document
|
||||
|
||||
end
|
||||
|
||||
def shop_note(shop)
|
||||
move_down line_move
|
||||
stroke_horizontal_rule
|
||||
move_down line_move
|
||||
|
||||
move_down line_move
|
||||
y_position = cursor
|
||||
|
||||
text "#{shop.note}", :size => self.item_font_size,:align => :left
|
||||
|
||||
move_down line_move
|
||||
end
|
||||
|
||||
def footer(printed_status)
|
||||
move_down line_move
|
||||
stroke_horizontal_rule
|
||||
|
||||
@@ -93,6 +93,10 @@ class ReceiptBillPdf < Prawn::Document
|
||||
|
||||
sign(sale_data)
|
||||
|
||||
if shop_details.note != nil
|
||||
shop_note(shop_details)
|
||||
end
|
||||
|
||||
footer(printed_status)
|
||||
end
|
||||
|
||||
@@ -647,6 +651,19 @@ class ReceiptBillPdf < Prawn::Document
|
||||
|
||||
end
|
||||
|
||||
def shop_note(shop)
|
||||
move_down line_move
|
||||
stroke_horizontal_rule
|
||||
move_down line_move
|
||||
|
||||
move_down line_move
|
||||
y_position = cursor
|
||||
|
||||
text "#{shop.note}", :size => self.item_font_size,:align => :left
|
||||
|
||||
move_down line_move
|
||||
end
|
||||
|
||||
def footer(printed_status)
|
||||
move_down line_move
|
||||
stroke_horizontal_rule
|
||||
|
||||
@@ -510,14 +510,12 @@ $('#foc').click(function() {
|
||||
title: "Information!",
|
||||
text: 'Thank You !',
|
||||
}, function () {
|
||||
// For Server Print - from jade
|
||||
if ($("#server_mode").val() == "cloud") {
|
||||
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
||||
}
|
||||
|
||||
window.location.href = '/origami';
|
||||
|
||||
});
|
||||
// For Server Print - from jade
|
||||
if ($("#server_mode").val() == "cloud") {
|
||||
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
||||
}
|
||||
window.location.href = '/origami';
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
<%= f.input :quick_sale_summary %>
|
||||
<%= f.input :calc_tax_order %>
|
||||
<%= f.input :show_account_info %>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<label>Shop Logo</label>
|
||||
@@ -75,7 +77,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<%= f.file_field :image, :multiple => false, name: "display_images[image][]", accept: 'audio/mp3', :class => "order" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= f.input :note, as: :text, :input_html => { :rows => 5} %>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
|
||||
Reference in New Issue
Block a user