mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-13 23:37:47 +00:00
95 lines
3.3 KiB
Plaintext
95 lines
3.3 KiB
Plaintext
= render :partial => 'spree/admin/shared/configuration_menu'
|
|
|
|
- content_for :page_title do
|
|
= t('.accounts_and_billing')
|
|
|
|
= render 'spree/shared/error_messages', target: @settings
|
|
|
|
-# - month_options = (0...12).map { |i| Time.zone.now.beginning_of_month - i.months }.map{ |t| [t.strftime("%b %Y"), t.strftime("%b %Y %z")]}
|
|
|
|
%fieldset.no-border-bottom
|
|
%legend
|
|
= t('.admin_settings')
|
|
= form_for @settings, as: :settings, url: main_app.admin_accounts_and_billing_settings_path, :method => :put do |f|
|
|
.row{ ng: { app: 'admin.accounts_and_billing_settings' } }
|
|
.twelve.columns.alpha.omega
|
|
.field
|
|
= f.label :accounts_distributor_id, t('.accounts_administration_distributor')
|
|
= f.collection_select(:accounts_distributor_id, @distributors, :id, :name, { include_blank: true }, { class: "select2 fullwidth", 'watch-value-as' => "enterprise_id"})
|
|
|
|
= f.hidden_field :default_accounts_payment_method_id, value: ''
|
|
= f.hidden_field :default_accounts_shipping_method_id, value: ''
|
|
%div{ 'method-settings-for' => 'enterprise_id' }
|
|
|
|
.row
|
|
.six.columns.alpha
|
|
%fieldset.no-border-bottom
|
|
%legend
|
|
= t('.update_invoice')
|
|
= f.check_box :auto_update_invoices
|
|
= f.label :auto_update_invoices, t('.auto_update_invoices')
|
|
|
|
.six.columns.omega
|
|
%fieldset.no-border-bottom
|
|
%legend
|
|
= t('.finalise_invoice')
|
|
= f.check_box :auto_finalize_invoices
|
|
= f.label :auto_finalize_invoices, t('.auto_finalise_invoices')
|
|
|
|
.row
|
|
.twelve.columns.alpha.omega.form-buttons{"data-hook" => "buttons"}
|
|
= button t(:update), 'icon-refresh', value: "update"
|
|
|
|
%fieldset.no-border-bottom
|
|
%legend
|
|
=t('.manually_run_task')
|
|
.row
|
|
.six.columns.alpha.step.text-center
|
|
.form-buttons{"data-hook" => "buttons"}
|
|
= link_to_with_icon "icon-undo", t('.update_user_invoices'),
|
|
main_app.start_job_admin_accounts_and_billing_settings_path(job: { name: "update_account_invoices" }),
|
|
class: "button fullwidth"
|
|
|
|
%br
|
|
|
|
- if @update_account_invoices_job
|
|
%p.text-center
|
|
- if @update_account_invoices_job.run_at < Time.zone.now
|
|
= t(:in_progress)
|
|
%br
|
|
= t(:started_at)
|
|
- else
|
|
%strong
|
|
= t(:queued)
|
|
%br
|
|
= t(:scheduled_for)
|
|
= @update_account_invoices_job.run_at
|
|
- else
|
|
%p.explanation
|
|
= t('.update_user_invoice_explained')
|
|
|
|
.six.columns.omega.step.text-center
|
|
.form-buttons{"data-hook" => "buttons"}
|
|
=link_to_with_icon "icon-ok-sign", t('.finalise_user_invoices'),
|
|
main_app.start_job_admin_accounts_and_billing_settings_path(job: { name: "finalize_account_invoices" }),
|
|
class: "button fullwidth"
|
|
|
|
%br
|
|
|
|
- if @finalize_account_invoices_job
|
|
%p.text-center
|
|
- if @finalize_account_invoices_job.run_at < Time.zone.now
|
|
%strong
|
|
= t(:in_progress)
|
|
%br
|
|
= t(:started_at)
|
|
- else
|
|
%strong
|
|
= t(:queued)
|
|
%br
|
|
= t(:scheduled_for)
|
|
= @finalize_account_invoices_job.run_at
|
|
- else
|
|
%p.explanation
|
|
= t('.finalise_user_invoice_explained')
|