Add new preference to invoice settings: enable invoices

This commit is contained in:
luisramos0
2019-06-19 13:29:30 +01:00
parent ab1ed53507
commit bcc02f35e7
3 changed files with 10 additions and 3 deletions

View File

@@ -29,6 +29,7 @@ Spree::AppConfiguration.class_eval do
preference :matomo_site_id, :string, default: nil
# Invoices & Receipts
preference :enable_invoices?, :boolean, default: true
preference :invoice_style2?, :boolean, default: false
preference :enable_receipt_printing?, :boolean, default: false

View File

@@ -5,6 +5,11 @@
= form_tag main_app.admin_invoice_settings_path, :method => :put do
.field.align-center
= hidden_field_tag 'preferences[enable_invoices?]', '0'
= check_box_tag 'preferences[enable_invoices?]', '1', Spree::Config[:enable_invoices?]
= label_tag nil, t('.enable_invoices?')
.field.align-center
= hidden_field_tag 'preferences[invoice_style2?]', '0'
= check_box_tag 'preferences[invoice_style2?]', '1', Spree::Config[:invoice_style2?]

View File

@@ -359,9 +359,10 @@ en:
invoice_settings:
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?
title: "Invoice Settings"
enable_invoices?: "Enable Invoices?"
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?"
stripe_connect_settings:
edit: