enable actions for multi (group) orders and ordergroup invoices
This commit is contained in:
parent
f676497e43
commit
e902aa0d5a
44 changed files with 550 additions and 324 deletions
|
|
@ -1,186 +0,0 @@
|
|||
# Foodsoft configuration
|
||||
|
||||
default: &defaults
|
||||
# If you wanna serve more than one foodcoop with one installation
|
||||
# Don't forget to setup databases for each foodcoop. See also MULTI_COOP_INSTALL
|
||||
multi_coop_install: false
|
||||
|
||||
# If multi_coop_install you have to use a coop name, which you you wanna be selected by default
|
||||
# Please use basic characters for scope names, matching /[-a-zA-Z0-9_]+/
|
||||
default_scope: 'f'
|
||||
|
||||
# name of this foodcoop
|
||||
name: FC Test
|
||||
# foodcoop contact information (used for FAX messages)
|
||||
contact:
|
||||
street: Grüne Straße 103
|
||||
zip_code: "10997"
|
||||
city: Berlin
|
||||
country: Deutschland
|
||||
email: foodsoft@foodcoop.test
|
||||
phone: "030 323 23249"
|
||||
|
||||
# Homepage
|
||||
homepage: http://www.foodcoop.test
|
||||
|
||||
# foodsoft documentation URL
|
||||
help_url: https://github.com/foodcoops/foodsoft/wiki/Doku
|
||||
|
||||
# documentation URL for the apples&pears work system
|
||||
applepear_url: https://github.com/foodcoops/foodsoft/wiki/%C3%84pfel-u.-Birnen
|
||||
|
||||
# custom foodsoft software URL (used in footer)
|
||||
#foodsoft_url: https://github.com/foodcoops/foodsoft
|
||||
|
||||
# URL to redirect to after logging out
|
||||
# logout_redirect_url: https://foodcoop.test
|
||||
|
||||
# Default language
|
||||
#default_locale: en
|
||||
# By default, foodsoft takes the language from the webbrowser/operating system.
|
||||
# In case you really want foodsoft in a certain language by default, set this to true.
|
||||
# When members are logged in, the language from their profile settings is still used.
|
||||
#ignore_browser_locale: false
|
||||
# Default timezone, e.g. UTC, Amsterdam, Berlin, etc.
|
||||
#time_zone: Berlin
|
||||
# Currency symbol, and whether to add a whitespace after the unit.
|
||||
#currency_unit: €
|
||||
#currency_space: true
|
||||
|
||||
# price markup in percent
|
||||
price_markup: 2.0
|
||||
|
||||
# default vat percentage for new articles
|
||||
tax_default: 7.0
|
||||
|
||||
# tolerance order option: If set to false, article tolerance values do not count
|
||||
# for total article price as long as the order is not finished.
|
||||
tolerance_is_costly: false
|
||||
|
||||
# Ordergroups, which have less than 75 apples should not be allowed to make new orders
|
||||
# Comment out this option to activate this restriction
|
||||
#stop_ordering_under: 75
|
||||
|
||||
# Comment out to completely hide apple points (be sure to comment stop_ordering_under)
|
||||
#use_apple_points: false
|
||||
|
||||
# ordergroups can only order when their balance is higher than or equal to this
|
||||
# not fully enforced right now, since the check is only client-side
|
||||
#minimum_balance: 0
|
||||
|
||||
# how many days there are between two periodic tasks
|
||||
#tasks_period_days: 7
|
||||
# how many days upfront periodic tasks are created
|
||||
#tasks_upfront_days: 49
|
||||
|
||||
# default order schedule, used to provide initial dates for new orders
|
||||
# (recurring dates in ical format; no spaces!)
|
||||
#order_schedule:
|
||||
# ends:
|
||||
# recurr: FREQ=WEEKLY;INTERVAL=2;BYDAY=MO
|
||||
# time: '9:00'
|
||||
# # reference point, this is generally the first pickup day; empty is often ok
|
||||
# #initial:
|
||||
|
||||
# When use_nick is enabled, there will be a nickname field in the user form,
|
||||
# and the option to show a nickname instead of full name to foodcoop members.
|
||||
# Members of a user's groups and administrators can still see full names.
|
||||
use_nick: false
|
||||
|
||||
# Most plugins can be enabled/disabled here as well. Messages and wiki are enabled
|
||||
# by default and need to be set to false to disable. Most other plugins needs to
|
||||
# be enabled before they do anything.
|
||||
#use_wiki: true
|
||||
#use_messages: true
|
||||
|
||||
# When enabled only administrators can access the member list.
|
||||
#disable_members_overview: true
|
||||
|
||||
# Base font size for generated PDF documents
|
||||
#pdf_font_size: 12
|
||||
# Page size for generated PDF documents
|
||||
#pdf_page_size: A4
|
||||
# Some documents (like group and article PDFs) can include page breaks
|
||||
# after each sublist.
|
||||
#pdf_add_page_breaks: true
|
||||
# Alternatively, this can be set for each document.
|
||||
#pdf_add_page_breaks:
|
||||
# order_by_groups: true
|
||||
# order_by_articles: true
|
||||
|
||||
# Page footer (html allowed). Default is a Foodsoft footer. Set to `blank` for no footer.
|
||||
#page_footer: <a href="http://www.foodcoop.test/">FC Test</a> is supported by <a href="http://www.hoster.test/">Hoster</a>.
|
||||
|
||||
# Custom CSS to add
|
||||
#custom_css: 'body { background-color: #fcffba; }'
|
||||
|
||||
# Custom fields for invoice, odergroup, supplier and user.
|
||||
# Check out https://github.com/plataformatec/simple_form for details about the supported options.
|
||||
#custom_fields:
|
||||
# user:
|
||||
# - name: address
|
||||
# label: Address
|
||||
# - name: birthday
|
||||
# label: Birthday
|
||||
# as: date_picker
|
||||
|
||||
# Uncomment to add tracking code for web statistics, e.g. for Matomo. (Added to bottom of page)
|
||||
#webstats_tracking_code: |
|
||||
# <!-- Matomo -->
|
||||
# ......
|
||||
|
||||
# email address to be used as sender
|
||||
email_sender: foodsoft@foodcoop.test
|
||||
|
||||
# domain to be used for reply emails
|
||||
#reply_email_domain: reply.foodcoop.test
|
||||
|
||||
# If your foodcoop uses a mailing list instead of internal messaging system
|
||||
#mailing_list: list@example.org
|
||||
#mailing_list_subscribe: list-subscribe@example.org
|
||||
|
||||
# Config for the exception_notification plugin
|
||||
notification:
|
||||
error_recipients:
|
||||
- admin@foodcoop.test
|
||||
feedback_recipients:
|
||||
- support@foodcoop.test
|
||||
sender_address: "\"Foodsoft Error\" <foodsoft@foodcoop.test>"
|
||||
email_prefix: "[Foodsoft]"
|
||||
|
||||
# http config for this host to generate links in emails (uses environment config when not set)
|
||||
#protocol: http
|
||||
#host: localhost
|
||||
#port: 3000
|
||||
#script_name: "/"
|
||||
|
||||
# Access to sharedlists, the external article-database.
|
||||
# This allows a foodcoop to subscribe to a selection of a supplier's full assortment,
|
||||
# and makes it possible to share data with several foodcoops. Using this requires installing
|
||||
# an additional application with a separate database.
|
||||
#shared_lists:
|
||||
# adapter: mysql2
|
||||
# host: localhost
|
||||
# database: sharedlists_development
|
||||
# username: root
|
||||
# password:
|
||||
# encoding: utf8
|
||||
# socket: /opt/lampp/var/mysql/mysql.sock
|
||||
#
|
||||
# Instead of defining all details here, you can also point to an entry in database.yml.
|
||||
#shared_lists: shared_lists
|
||||
|
||||
# default to allow automatically adding new articles on sync only when less than 200 articles in total
|
||||
#shared_supplier_article_sync_limit: 200
|
||||
|
||||
# number of days after which attachment files get deleted
|
||||
#attachment_retention_days: 365
|
||||
|
||||
development:
|
||||
<<: *defaults
|
||||
|
||||
test:
|
||||
<<: *defaults
|
||||
|
||||
production:
|
||||
<<: *defaults
|
||||
|
|
@ -69,8 +69,8 @@ Rails.application.configure do
|
|||
|
||||
# Use an evented file watcher to asynchronously detect changes in source code,
|
||||
# routes, locales, etc. This feature depends on the listen gem.
|
||||
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
||||
|
||||
config.file_watcher = ActiveSupport::FileUpdateChecker
|
||||
|
||||
# Run resque tasks as part of the main app (not recommended for production)
|
||||
Resque.inline = true unless ENV['REDIS_URL']
|
||||
end
|
||||
|
|
|
|||
|
|
@ -107,12 +107,14 @@ de:
|
|||
generate: Rechnung erzeugen
|
||||
generate_with_date: setzen & erzeugen
|
||||
invoice_date: Datum der Bestellgruppenrechnung
|
||||
invoice_number: Rechnungsnummer
|
||||
ordergroup: Bestellgruppe
|
||||
paid: Bezahlt
|
||||
not_paid: Nicht Bezahlt
|
||||
sepa_downloaded: SEPA exportiert
|
||||
sepa_not_downloaded: SEPA nicht exportiert
|
||||
sepa_not_ready: Wichtige Einstellungen für SEPA Export in Administration -> Einstellungen-> Finanzen fehlen
|
||||
sepa_not_ready:
|
||||
SEPA Export nicht verfügbar. Wichtige Einstellungen für SEPA Export in Administration -> Einstellungen-> Finanzen fehlen
|
||||
sepa_select: Für SEPA Export markieren
|
||||
sepa_sequence_type: SEPA Typ
|
||||
open_details_modal: Details ein/ausklappen
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ en:
|
|||
generate: generate invoice
|
||||
generate_with_date: set & generate
|
||||
invoice_date: date of group order invoice
|
||||
invoice_number: invoice number
|
||||
ordergroup: Ordergroup
|
||||
paid: paid
|
||||
not_paid: unpaid
|
||||
|
|
|
|||
|
|
@ -148,13 +148,24 @@ Rails.application.routes.draw do
|
|||
end
|
||||
|
||||
|
||||
post 'finance/ordergroup_invoice', to: 'ordergroup_invoices#create_multiple'
|
||||
post 'finance/group_order_invoice', to: 'group_order_invoices#create_multiple'
|
||||
|
||||
get 'orders/:order_id/group_order_invoices/download_all', to: 'group_order_invoices#download_all', as: 'download_all_group_order_invoices'
|
||||
get 'multi_orders/:multi_order_id/group_order_invoices/download_all', to: 'ordergroup_invoices#download_all', as: 'download_all_ordergroup_invoices'
|
||||
|
||||
resources :ordergroup_invoices do
|
||||
member do
|
||||
get :download_collective
|
||||
patch :select_sepa_sequence_type
|
||||
patch :toggle_paid
|
||||
patch :toggle_sepa_downloaded
|
||||
end
|
||||
collection do
|
||||
get :download_within_date
|
||||
patch :select_all_sepa_sequence_type
|
||||
patch :toggle_all_sepa_downloaded
|
||||
patch :toggle_all_paid
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -172,9 +183,10 @@ Rails.application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
resources :multi_orders, only: [:create, :show] do
|
||||
resources :multi_orders, only: [:create, :show, :destroy] do
|
||||
member do
|
||||
get :generate_ordergroup_invoices
|
||||
get :collective_direct_debit
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue