mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Adding feature toggle for receipt printing using qz
This commit is contained in:
@@ -13,8 +13,10 @@ module Spree
|
||||
links << { name: t(:send_invoice), url: "#", icon: 'icon-email', confirm: t(:must_have_valid_business_number, enterprise_name: order.distributor.name) }
|
||||
end
|
||||
links << { name: t(:print_invoice), url: print_admin_order_path(order), icon: 'icon-print', target: "_blank" }
|
||||
links << { name: t(:print_ticket), url: print_ticket_admin_order_path(order), icon: 'icon-print', target: "_blank" }
|
||||
links << { name: t(:select_ticket_printer), url: "#{print_ticket_admin_order_path(order)}#select-printer", icon: 'icon-print', target: "_blank" }
|
||||
if Spree::Config.enable_receipt_printing?
|
||||
links << { name: t(:print_ticket), url: print_ticket_admin_order_path(order), icon: 'icon-print', target: "_blank" }
|
||||
links << { name: t(:select_ticket_printer), url: "#{print_ticket_admin_order_path(order)}#select-printer", icon: 'icon-print', target: "_blank" }
|
||||
end
|
||||
end
|
||||
if @order.ready_to_ship?
|
||||
links << { name: t(:ship_order), url: fire_admin_order_path(@order, :e => 'ship'), method: 'put', icon: 'icon-truck', confirm: t(:are_you_sure) }
|
||||
|
||||
@@ -33,6 +33,7 @@ Spree::AppConfiguration.class_eval do
|
||||
# External services
|
||||
preference :bugherd_api_key, :string, default: nil
|
||||
|
||||
# Invoice layout
|
||||
# Invoices & Receipts
|
||||
preference :invoice_style2?, :boolean, default: false
|
||||
preference :enable_receipt_printing?, :boolean, default: false
|
||||
end
|
||||
|
||||
@@ -10,5 +10,10 @@
|
||||
= check_box_tag 'preferences[invoice_style2?]', '1', Spree::Config[:invoice_style2?]
|
||||
= label_tag nil, t('.invoice_style2?')
|
||||
|
||||
.field.align-center
|
||||
= hidden_field_tag 'preferences[enable_receipt_printing?]', '0'
|
||||
= check_box_tag 'preferences[enable_receipt_printing?]', '1', Spree::Config[:enable_receipt_printing?]
|
||||
= label_tag nil, t('.enable_receipt_printing?')
|
||||
|
||||
.form-buttons{"data-hook" => "buttons"}
|
||||
= button t(:update), 'icon-refresh'
|
||||
|
||||
@@ -515,7 +515,7 @@ en:
|
||||
edit:
|
||||
title: Invoice Settings
|
||||
invoice_style2?: Use the alternative invoice model that includes total tax breakdown per rate and tax rate info per item (not yet suitable for countries displaying prices excluding tax)
|
||||
|
||||
enable_receipt_printing?: Show options for printing receipts using thermal printers in order dropdown?
|
||||
|
||||
home:
|
||||
hubs:
|
||||
|
||||
Reference in New Issue
Block a user