Add option to ignore delivered amounts in order group distribution (#765)

This commit is contained in:
lentschi 2021-02-05 16:19:05 +01:00 committed by GitHub
parent ecda1c1478
commit 45a8911ca6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 69 additions and 4 deletions

View file

@ -54,6 +54,12 @@ class FoodsoftConfig
# Loaded configuration
APP_CONFIG = ActiveSupport::HashWithIndifferentAccess.new
# distribution strategy config values enum
module DistributionStrategy
FIRST_ORDER_FIRST_SERVE = 'first_order_first_serve'
NO_AUTOMATIC_DISTRIBUTION = 'no_automatic_distribution'
end
class << self
# Load and initialize foodcoop configuration file.
@ -260,6 +266,7 @@ class FoodsoftConfig
tasks_period_days: 7,
tasks_upfront_days: 49,
shared_supplier_article_sync_limit: 200,
distribution_strategy: FoodsoftConfig::DistributionStrategy::FIRST_ORDER_FIRST_SERVE,
# The following keys cannot, by default, be set by foodcoops themselves.
protected: {
multi_coop_install: true,