mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
Merge pull request #3311 from luisramos0/2-0-stable-jan-11th
[Spree Upgrade] Merging master into 2-0-stable (second run in Jan2019)
This commit is contained in:
@@ -47,7 +47,6 @@ Metrics/LineLength:
|
||||
- app/controllers/base_controller.rb
|
||||
- app/controllers/cart_controller.rb
|
||||
- app/controllers/checkout_controller.rb
|
||||
- app/controllers/enterprises_controller.rb
|
||||
- app/controllers/shop_controller.rb
|
||||
- app/controllers/spree/admin/adjustments_controller_decorator.rb
|
||||
- app/controllers/spree/admin/base_controller_decorator.rb
|
||||
@@ -435,7 +434,6 @@ Metrics/AbcSize:
|
||||
- app/controllers/cart_controller.rb
|
||||
- app/controllers/checkout_controller.rb
|
||||
- app/controllers/discourse_sso_controller.rb
|
||||
- app/controllers/enterprises_controller.rb
|
||||
- app/controllers/spree/admin/adjustments_controller_decorator.rb
|
||||
- app/controllers/spree/admin/line_items_controller_decorator.rb
|
||||
- app/controllers/spree/admin/orders_controller_decorator.rb
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config --exclude-limit 1400`
|
||||
# on 2018-10-25 13:57:32 +1100 using RuboCop version 0.57.2.
|
||||
# on 2019-01-02 13:44:41 +0100 using RuboCop version 0.57.2.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
@@ -27,7 +27,7 @@ Layout/AlignArray:
|
||||
- 'spec/lib/open_food_network/order_grouper_spec.rb'
|
||||
- 'spec/services/cart_service_spec.rb'
|
||||
|
||||
# Offense count: 121
|
||||
# Offense count: 122
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
||||
# SupportedHashRocketStyles: key, separator, table
|
||||
@@ -56,8 +56,9 @@ Layout/AlignHash:
|
||||
- 'spec/models/order_cycle_spec.rb'
|
||||
- 'spec/models/spree/shipping_method_spec.rb'
|
||||
- 'spec/models/spree/variant_spec.rb'
|
||||
- 'spec/models/variant_override_spec.rb'
|
||||
|
||||
# Offense count: 60
|
||||
# Offense count: 49
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
||||
# SupportedStyles: with_first_parameter, with_fixed_indentation
|
||||
@@ -68,7 +69,6 @@ Layout/AlignParameters:
|
||||
- 'app/models/enterprise_group.rb'
|
||||
- 'app/models/enterprise_relationship.rb'
|
||||
- 'app/serializers/api/address_serializer.rb'
|
||||
- 'app/serializers/api/enterprise_serializer.rb'
|
||||
- 'app/serializers/api/shipping_method_serializer.rb'
|
||||
- 'lib/spree/product_filters.rb'
|
||||
- 'spec/controllers/enterprises_controller_spec.rb'
|
||||
@@ -94,11 +94,12 @@ Layout/BlockAlignment:
|
||||
- 'spec/models/spree/line_item_spec.rb'
|
||||
- 'spec/models/spree/product_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
Layout/BlockEndNewline:
|
||||
Exclude:
|
||||
- 'spec/features/consumer/shopping/cart_spec.rb'
|
||||
- 'spec/models/variant_override_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
@@ -124,7 +125,7 @@ Layout/ElseAlignment:
|
||||
- 'app/serializers/api/admin/order_cycle_serializer.rb'
|
||||
- 'lib/open_food_network/sales_tax_report.rb'
|
||||
|
||||
# Offense count: 197
|
||||
# Offense count: 187
|
||||
# Cop supports --auto-correct.
|
||||
Layout/EmptyLines:
|
||||
Exclude:
|
||||
@@ -137,7 +138,6 @@ Layout/EmptyLines:
|
||||
- 'app/controllers/spree/admin/adjustments_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/base_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/general_settings_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/orders_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/payments_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/products_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/variants_controller_decorator.rb'
|
||||
@@ -148,10 +148,8 @@ Layout/EmptyLines:
|
||||
- 'app/jobs/finalize_account_invoices.rb'
|
||||
- 'app/jobs/products_cache_integrity_checker_job.rb'
|
||||
- 'app/jobs/refresh_products_cache_job.rb'
|
||||
- 'app/mailers/producer_mailer.rb'
|
||||
- 'app/models/coordinator_fee.rb'
|
||||
- 'app/models/enterprise_fee.rb'
|
||||
- 'app/models/enterprise_relationship.rb'
|
||||
- 'app/models/exchange.rb'
|
||||
- 'app/models/exchange_fee.rb'
|
||||
- 'app/models/inventory_item.rb'
|
||||
@@ -175,7 +173,6 @@ Layout/EmptyLines:
|
||||
- 'app/models/spree/shipping_method_decorator.rb'
|
||||
- 'app/models/spree/tax_rate_decorator.rb'
|
||||
- 'app/models/spree/taxon_decorator.rb'
|
||||
- 'app/serializers/api/enterprise_serializer.rb'
|
||||
- 'lib/open_food_network/cached_products_renderer.rb'
|
||||
- 'lib/open_food_network/enterprise_fee_applicator.rb'
|
||||
- 'lib/open_food_network/enterprise_issue_validator.rb'
|
||||
@@ -187,7 +184,6 @@ Layout/EmptyLines:
|
||||
- 'lib/open_food_network/products_cache.rb'
|
||||
- 'lib/open_food_network/products_cache_integrity_checker.rb'
|
||||
- 'lib/open_food_network/products_renderer.rb'
|
||||
- 'lib/open_food_network/property_merge.rb'
|
||||
- 'lib/open_food_network/reports/bulk_coop_report.rb'
|
||||
- 'lib/open_food_network/sales_tax_report.rb'
|
||||
- 'lib/open_food_network/scope_product_to_hub.rb'
|
||||
@@ -259,15 +255,13 @@ Layout/EmptyLinesAroundArguments:
|
||||
Exclude:
|
||||
- 'spec/archive/features/consumer/checkout_spec.rb'
|
||||
|
||||
# Offense count: 59
|
||||
# Offense count: 51
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: empty_lines, no_empty_lines
|
||||
Layout/EmptyLinesAroundBlockBody:
|
||||
Exclude:
|
||||
- 'app/controllers/spree/admin/orders_controller_decorator.rb'
|
||||
- 'app/controllers/spree/api/orders_controller_decorator.rb'
|
||||
- 'app/controllers/spree/api/products_controller_decorator.rb'
|
||||
- 'app/controllers/spree/checkout_controller_decorator.rb'
|
||||
- 'app/models/spree/calculator/default_tax_decorator.rb'
|
||||
- 'app/models/spree/money_decorator.rb'
|
||||
@@ -276,21 +270,17 @@ Layout/EmptyLinesAroundBlockBody:
|
||||
- 'lib/spree/money_decorator.rb'
|
||||
- 'spec/controllers/admin/order_cycles_controller_spec.rb'
|
||||
- 'spec/controllers/admin/tag_rules_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/orders_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/reports_controller_spec.rb'
|
||||
- 'spec/controllers/spree/api/orders_controller_spec.rb'
|
||||
- 'spec/controllers/spree/orders_controller_spec.rb'
|
||||
- 'spec/controllers/user_confirmations_controller_spec.rb'
|
||||
- 'spec/controllers/user_registrations_controller_spec.rb'
|
||||
- 'spec/features/admin/caching_spec.rb'
|
||||
- 'spec/features/admin/orders_spec.rb'
|
||||
- 'spec/features/admin/reports_spec.rb'
|
||||
- 'spec/features/admin/variant_overrides_spec.rb'
|
||||
- 'spec/features/consumer/cookies_spec.rb'
|
||||
- 'spec/features/consumer/shopping/embedded_groups_spec.rb'
|
||||
- 'spec/features/consumer/shopping/embedded_shopfronts_spec.rb'
|
||||
- 'spec/features/consumer/shopping/shopping_spec.rb'
|
||||
- 'spec/features/consumer/shopping/variant_overrides_spec.rb'
|
||||
- 'spec/helpers/admin/business_model_configuration_helper_spec.rb'
|
||||
- 'spec/helpers/shared_helper_spec.rb'
|
||||
- 'spec/helpers/shop_helper_spec.rb'
|
||||
@@ -314,7 +304,7 @@ Layout/EmptyLinesAroundBlockBody:
|
||||
- 'spec/support/matchers/select2_matchers.rb'
|
||||
- 'spec/support/matchers/table_matchers.rb'
|
||||
|
||||
# Offense count: 24
|
||||
# Offense count: 23
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
|
||||
@@ -328,7 +318,6 @@ Layout/EmptyLinesAroundClassBody:
|
||||
- 'app/controllers/api/enterprises_controller.rb'
|
||||
- 'app/controllers/application_controller.rb'
|
||||
- 'app/controllers/home_controller.rb'
|
||||
- 'app/mailers/producer_mailer.rb'
|
||||
- 'app/models/coordinator_fee.rb'
|
||||
- 'app/models/producer_property.rb'
|
||||
- 'app/models/spree/preferences/file_configuration.rb'
|
||||
@@ -355,7 +344,7 @@ Layout/EndAlignment:
|
||||
- 'app/serializers/api/admin/for_order_cycle/supplied_product_serializer.rb'
|
||||
- 'app/serializers/api/admin/order_cycle_serializer.rb'
|
||||
|
||||
# Offense count: 47
|
||||
# Offense count: 45
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
||||
Layout/ExtraSpacing:
|
||||
@@ -365,7 +354,6 @@ Layout/ExtraSpacing:
|
||||
- 'app/helpers/admin/injection_helper.rb'
|
||||
- 'app/models/enterprise.rb'
|
||||
- 'app/models/spree/classification_decorator.rb'
|
||||
- 'app/serializers/api/enterprise_serializer.rb'
|
||||
- 'config.ru'
|
||||
- 'lib/open_food_network/bulk_coop_report.rb'
|
||||
- 'lib/open_food_network/option_value_namer.rb'
|
||||
@@ -449,7 +437,7 @@ Layout/IndentationWidth:
|
||||
- 'spec/models/enterprise_spec.rb'
|
||||
- 'spec/models/spree/calculator/flexi_rate_spec.rb'
|
||||
|
||||
# Offense count: 44
|
||||
# Offense count: 43
|
||||
# Cop supports --auto-correct.
|
||||
Layout/LeadingCommentSpace:
|
||||
Exclude:
|
||||
@@ -459,7 +447,6 @@ Layout/LeadingCommentSpace:
|
||||
- 'app/models/spree/inventory_unit_decorator.rb'
|
||||
- 'app/models/spree/taxon_decorator.rb'
|
||||
- 'app/serializers/api/address_serializer.rb'
|
||||
- 'app/serializers/api/enterprise_serializer.rb'
|
||||
- 'app/serializers/api/product_serializer.rb'
|
||||
- 'spec/archive/features/consumer/checkout_spec.rb'
|
||||
- 'spec/controllers/spree/api/line_items_controller_spec.rb'
|
||||
@@ -475,7 +462,7 @@ Layout/LeadingCommentSpace:
|
||||
- 'spec/support/matchers/select2_matchers.rb'
|
||||
- 'spec/support/request/authentication_workflow.rb'
|
||||
|
||||
# Offense count: 44
|
||||
# Offense count: 45
|
||||
# Cop supports --auto-correct.
|
||||
Layout/MultilineBlockLayout:
|
||||
Exclude:
|
||||
@@ -495,6 +482,7 @@ Layout/MultilineBlockLayout:
|
||||
- 'spec/models/order_cycle_spec.rb'
|
||||
- 'spec/models/spree/product_spec.rb'
|
||||
- 'spec/models/spree/variant_spec.rb'
|
||||
- 'spec/models/variant_override_spec.rb'
|
||||
- 'spec/serializers/enterprise_serializer_spec.rb'
|
||||
|
||||
# Offense count: 4
|
||||
@@ -640,7 +628,7 @@ Layout/SpaceAroundEqualsInParameterDefault:
|
||||
- 'spec/support/request/distribution_helper.rb'
|
||||
- 'spec/support/request/web_helper.rb'
|
||||
|
||||
# Offense count: 55
|
||||
# Offense count: 50
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AllowForAlignment.
|
||||
Layout/SpaceAroundOperators:
|
||||
@@ -651,7 +639,6 @@ Layout/SpaceAroundOperators:
|
||||
- 'app/overrides/remove_search_bar.rb'
|
||||
- 'app/overrides/remove_side_bar.rb'
|
||||
- 'app/overrides/replace_shipping_address_form_with_distributor_details.rb'
|
||||
- 'app/serializers/api/enterprise_serializer.rb'
|
||||
- 'lib/open_food_network/xero_invoices_report.rb'
|
||||
- 'lib/spree/product_filters.rb'
|
||||
- 'spec/controllers/admin/enterprises_controller_spec.rb'
|
||||
@@ -716,7 +703,7 @@ Layout/SpaceInsideArrayLiteralBrackets:
|
||||
- 'spec/lib/open_food_network/users_and_enterprises_report_spec.rb'
|
||||
- 'spec/models/spree/order_spec.rb'
|
||||
|
||||
# Offense count: 194
|
||||
# Offense count: 192
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
||||
# SupportedStyles: space, no_space
|
||||
@@ -769,7 +756,7 @@ Layout/SpaceInsideBlockBraces:
|
||||
- 'spec/spec_helper.rb'
|
||||
- 'spec/support/cancan_helper.rb'
|
||||
|
||||
# Offense count: 728
|
||||
# Offense count: 702
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
|
||||
# SupportedStyles: space, no_space, compact
|
||||
@@ -916,7 +903,7 @@ Layout/TrailingBlankLines:
|
||||
Exclude:
|
||||
- 'spec/controllers/cart_controller_spec.rb'
|
||||
|
||||
# Offense count: 60
|
||||
# Offense count: 57
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AllowInHeredoc.
|
||||
Layout/TrailingWhitespace:
|
||||
@@ -932,7 +919,6 @@ Layout/TrailingWhitespace:
|
||||
- 'app/views/json/partials/_producer.rabl'
|
||||
- 'spec/controllers/admin/column_preferences_controller_spec.rb'
|
||||
- 'spec/features/admin/customers_spec.rb'
|
||||
- 'spec/features/admin/variant_overrides_spec.rb'
|
||||
- 'spec/features/consumer/cookies_spec.rb'
|
||||
- 'spec/helpers/enterprises_helper_spec.rb'
|
||||
- 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb'
|
||||
@@ -945,9 +931,10 @@ Layout/TrailingWhitespace:
|
||||
- 'spec/serializers/enterprise_serializer_spec.rb'
|
||||
- 'spec/support/request/menu_helper.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Offense count: 2
|
||||
Lint/AmbiguousOperator:
|
||||
Exclude:
|
||||
- 'spec/controllers/api/enterprise_fees_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/payments_controller_spec.rb'
|
||||
|
||||
# Offense count: 4
|
||||
@@ -956,13 +943,12 @@ Lint/DuplicateMethods:
|
||||
- 'lib/discourse/single_sign_on.rb'
|
||||
- 'lib/open_food_network/subscription_summary.rb'
|
||||
|
||||
# Offense count: 16
|
||||
# Offense count: 15
|
||||
Lint/IneffectiveAccessModifier:
|
||||
Exclude:
|
||||
- 'app/models/column_preference.rb'
|
||||
- 'lib/open_food_network/feature_toggle.rb'
|
||||
- 'lib/open_food_network/products_cache.rb'
|
||||
- 'lib/open_food_network/property_merge.rb'
|
||||
- 'spec/lib/open_food_network/reports/report_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
@@ -1062,18 +1048,17 @@ Lint/UnusedMethodArgument:
|
||||
- 'lib/open_food_network/paperclippable.rb'
|
||||
- 'lib/open_food_network/rack_request_blocker.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# Offense count: 5
|
||||
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
|
||||
Lint/UselessAccessModifier:
|
||||
Exclude:
|
||||
- 'app/models/column_preference.rb'
|
||||
- 'lib/open_food_network/feature_toggle.rb'
|
||||
- 'lib/open_food_network/products_cache.rb'
|
||||
- 'lib/open_food_network/property_merge.rb'
|
||||
- 'lib/open_food_network/reports/bulk_coop_report.rb'
|
||||
- 'spec/lib/open_food_network/reports/report_spec.rb'
|
||||
|
||||
# Offense count: 242
|
||||
# Offense count: 240
|
||||
# Configuration parameters: CheckForMethodsWithNoSideEffects.
|
||||
Lint/Void:
|
||||
Exclude:
|
||||
@@ -1084,7 +1069,6 @@ Lint/Void:
|
||||
- 'spec/controllers/enterprises_controller_spec.rb'
|
||||
- 'spec/controllers/shop_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/adjustments_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/orders_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/variants_controller_spec.rb'
|
||||
- 'spec/controllers/spree/api/products_controller_spec.rb'
|
||||
- 'spec/controllers/spree/api/variants_controller_spec.rb'
|
||||
@@ -1127,53 +1111,26 @@ Lint/Void:
|
||||
- 'spec/serializers/enterprise_serializer_spec.rb'
|
||||
- 'spec/support/request/web_helper.rb'
|
||||
|
||||
# Offense count: 192
|
||||
Metrics/AbcSize:
|
||||
Max: 293
|
||||
|
||||
# Offense count: 1039
|
||||
# Offense count: 110
|
||||
# Configuration parameters: CountComments, ExcludedMethods.
|
||||
Metrics/BlockLength:
|
||||
Max: 787
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: CountBlocks.
|
||||
Metrics/BlockNesting:
|
||||
Max: 4
|
||||
|
||||
# Offense count: 23
|
||||
# Configuration parameters: CountComments.
|
||||
Metrics/ClassLength:
|
||||
Max: 331
|
||||
Max: 117
|
||||
|
||||
# Offense count: 36
|
||||
Metrics/CyclomaticComplexity:
|
||||
Max: 23
|
||||
|
||||
# Offense count: 2717
|
||||
# Offense count: 1
|
||||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||
# URISchemes: http, https
|
||||
Metrics/LineLength:
|
||||
Max: 619
|
||||
Max: 141
|
||||
|
||||
# Offense count: 161
|
||||
# Offense count: 1
|
||||
# Configuration parameters: CountComments.
|
||||
Metrics/MethodLength:
|
||||
Max: 95
|
||||
|
||||
# Offense count: 27
|
||||
# Configuration parameters: CountComments.
|
||||
Metrics/ModuleLength:
|
||||
Max: 633
|
||||
|
||||
# Offense count: 6
|
||||
# Configuration parameters: CountKeywordArgs.
|
||||
Metrics/ParameterLists:
|
||||
Max: 8
|
||||
|
||||
# Offense count: 28
|
||||
Metrics/PerceivedComplexity:
|
||||
Max: 21
|
||||
Max: 14
|
||||
|
||||
# Offense count: 7
|
||||
Naming/AccessorMethodName:
|
||||
@@ -1228,7 +1185,7 @@ Naming/PredicateName:
|
||||
- 'lib/open_food_network/packing_report.rb'
|
||||
- 'lib/tasks/data.rake'
|
||||
|
||||
# Offense count: 13
|
||||
# Offense count: 12
|
||||
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
||||
# AllowedNames: io, id, to, by, on, in, at
|
||||
Naming/UncommunicativeMethodParamName:
|
||||
@@ -1238,7 +1195,6 @@ Naming/UncommunicativeMethodParamName:
|
||||
- 'app/helpers/spree/base_helper_decorator.rb'
|
||||
- 'app/models/exchange.rb'
|
||||
- 'app/services/subscription_validator.rb'
|
||||
- 'lib/open_food_network/property_merge.rb'
|
||||
- 'lib/open_food_network/reports/bulk_coop_report.rb'
|
||||
- 'lib/open_food_network/xero_invoices_report.rb'
|
||||
- 'spec/lib/open_food_network/reports/report_spec.rb'
|
||||
@@ -1251,7 +1207,7 @@ Naming/VariableName:
|
||||
Exclude:
|
||||
- 'app/helpers/admin/injection_helper.rb'
|
||||
|
||||
# Offense count: 16
|
||||
# Offense count: 10
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: snake_case, normalcase, non_integer
|
||||
Naming/VariableNumber:
|
||||
@@ -1409,7 +1365,7 @@ Rails/HasManyOrHasOneDependent:
|
||||
- 'app/models/spree/variant_decorator.rb'
|
||||
- 'app/models/subscription.rb'
|
||||
|
||||
# Offense count: 45
|
||||
# Offense count: 46
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: numeric, symbolic
|
||||
@@ -1418,13 +1374,13 @@ Rails/HttpStatus:
|
||||
- 'app/controllers/admin/bulk_line_items_controller.rb'
|
||||
- 'app/controllers/admin/column_preferences_controller.rb'
|
||||
- 'app/controllers/admin/customers_controller.rb'
|
||||
- 'app/controllers/admin/enterprise_fees_controller.rb'
|
||||
- 'app/controllers/admin/enterprise_relationships_controller.rb'
|
||||
- 'app/controllers/admin/enterprise_roles_controller.rb'
|
||||
- 'app/controllers/admin/manager_invitations_controller.rb'
|
||||
- 'app/controllers/admin/tag_rules_controller.rb'
|
||||
- 'app/controllers/admin/variant_overrides_controller.rb'
|
||||
- 'app/controllers/api/customers_controller.rb'
|
||||
- 'app/controllers/api/enterprise_fees_controller.rb'
|
||||
- 'app/controllers/api/enterprises_controller.rb'
|
||||
- 'app/controllers/application_controller.rb'
|
||||
- 'app/controllers/cart_controller.rb'
|
||||
@@ -1464,12 +1420,11 @@ Rails/Presence:
|
||||
Exclude:
|
||||
- 'app/serializers/api/admin/customer_serializer.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: NotNilAndNotEmpty, NotBlank, UnlessBlank.
|
||||
Rails/Present:
|
||||
Exclude:
|
||||
- 'app/controllers/spree/admin/orders_controller_decorator.rb'
|
||||
- 'app/models/producer_property.rb'
|
||||
- 'lib/open_food_network/products_and_inventory_report.rb'
|
||||
|
||||
@@ -1644,7 +1599,7 @@ Style/CaseEquality:
|
||||
- 'app/helpers/angular_form_helper.rb'
|
||||
- 'spec/models/spree/payment_spec.rb'
|
||||
|
||||
# Offense count: 85
|
||||
# Offense count: 82
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
||||
# SupportedStyles: nested, compact
|
||||
@@ -1788,7 +1743,7 @@ Style/EmptyLiteral:
|
||||
- 'app/helpers/checkout_helper.rb'
|
||||
- 'app/models/spree/order_decorator.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# Offense count: 5
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: compact, expanded
|
||||
@@ -1798,7 +1753,6 @@ Style/EmptyMethod:
|
||||
- 'app/controllers/home_controller.rb'
|
||||
- 'app/controllers/map_controller.rb'
|
||||
- 'app/controllers/producers_controller.rb'
|
||||
- 'app/controllers/shops_controller.rb'
|
||||
- 'app/controllers/spree/admin/products_controller_decorator.rb'
|
||||
|
||||
# Offense count: 2
|
||||
@@ -1817,19 +1771,17 @@ Style/FormatStringToken:
|
||||
- 'lib/open_food_network/sales_tax_report.rb'
|
||||
- 'spec/models/enterprise_spec.rb'
|
||||
|
||||
# Offense count: 80
|
||||
# Offense count: 76
|
||||
# Configuration parameters: MinBodyLength.
|
||||
Style/GuardClause:
|
||||
Exclude:
|
||||
- 'app/controllers/admin/accounts_and_billing_settings_controller.rb'
|
||||
- 'app/controllers/admin/enterprise_fees_controller.rb'
|
||||
- 'app/controllers/admin/enterprises_controller.rb'
|
||||
- 'app/controllers/admin/order_cycles_controller.rb'
|
||||
- 'app/controllers/admin/product_import_controller.rb'
|
||||
- 'app/controllers/application_controller.rb'
|
||||
- 'app/controllers/base_controller.rb'
|
||||
- 'app/controllers/checkout_controller.rb'
|
||||
- 'app/controllers/enterprises_controller.rb'
|
||||
- 'app/controllers/home_controller.rb'
|
||||
- 'app/controllers/spree/admin/adjustments_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/base_controller_decorator.rb'
|
||||
@@ -1842,7 +1794,6 @@ Style/GuardClause:
|
||||
- 'app/jobs/products_cache_integrity_checker_job.rb'
|
||||
- 'app/jobs/update_account_invoices.rb'
|
||||
- 'app/jobs/update_billable_periods.rb'
|
||||
- 'app/mailers/producer_mailer.rb'
|
||||
- 'app/models/enterprise.rb'
|
||||
- 'app/models/enterprise_group.rb'
|
||||
- 'app/models/producer_property.rb'
|
||||
@@ -1865,7 +1816,7 @@ Style/GuardClause:
|
||||
- 'spec/support/request/distribution_helper.rb'
|
||||
- 'spec/support/request/shop_workflow.rb'
|
||||
|
||||
# Offense count: 924
|
||||
# Offense count: 872
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
||||
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
||||
@@ -1897,7 +1848,6 @@ Style/HashSyntax:
|
||||
- 'app/helpers/spree/admin/navigation_helper_decorator.rb'
|
||||
- 'app/helpers/spree/admin/orders_helper_decorator.rb'
|
||||
- 'app/mailers/enterprise_mailer.rb'
|
||||
- 'app/mailers/spree/order_mailer_decorator.rb'
|
||||
- 'app/mailers/spree/user_mailer_decorator.rb'
|
||||
- 'app/models/billable_period.rb'
|
||||
- 'app/models/calculator/flat_percent_per_item.rb'
|
||||
@@ -1936,7 +1886,6 @@ Style/HashSyntax:
|
||||
- 'app/overrides/set_auth_token_in_frontend.rb'
|
||||
- 'app/presenters/variant_presenter.rb'
|
||||
- 'app/serializers/api/admin/enterprise_fee_serializer.rb'
|
||||
- 'app/serializers/api/enterprise_serializer.rb'
|
||||
- 'app/views/api/order_cycles/bulk_show.v1.rabl'
|
||||
- 'app/views/json/_order_cycle.rabl'
|
||||
- 'app/views/json/partials/_hub.rabl'
|
||||
@@ -1961,7 +1910,6 @@ Style/HashSyntax:
|
||||
- 'spec/controllers/api/order_cycles_controller_spec.rb'
|
||||
- 'spec/controllers/base_controller_spec.rb'
|
||||
- 'spec/controllers/cart_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/orders_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/payment_methods_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/payments_controller_spec.rb'
|
||||
- 'spec/controllers/spree/api/products_controller_spec.rb'
|
||||
@@ -2148,7 +2096,7 @@ Style/NumericLiteralPrefix:
|
||||
Exclude:
|
||||
- 'spec/features/admin/order_cycles_spec.rb'
|
||||
|
||||
# Offense count: 13
|
||||
# Offense count: 12
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: Strict.
|
||||
Style/NumericLiterals:
|
||||
@@ -2185,14 +2133,13 @@ Style/ParenthesesAroundCondition:
|
||||
Exclude:
|
||||
- 'app/controllers/checkout_controller.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: short, verbose
|
||||
Style/PreferredHashMethods:
|
||||
Exclude:
|
||||
- 'app/controllers/spree/orders_controller_decorator.rb'
|
||||
- 'spec/controllers/spree/admin/orders_controller_spec.rb'
|
||||
|
||||
# Offense count: 18
|
||||
# Cop supports --auto-correct.
|
||||
@@ -2249,7 +2196,7 @@ Style/RedundantReturn:
|
||||
- 'app/models/spree/classification_decorator.rb'
|
||||
- 'app/serializers/api/admin/enterprise_serializer.rb'
|
||||
|
||||
# Offense count: 96
|
||||
# Offense count: 95
|
||||
# Cop supports --auto-correct.
|
||||
Style/RedundantSelf:
|
||||
Exclude:
|
||||
@@ -2295,15 +2242,14 @@ Style/RegexpLiteral:
|
||||
- 'spec/mailers/subscription_mailer_spec.rb'
|
||||
- 'spec/models/content_configuration_spec.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
Style/RescueModifier:
|
||||
Exclude:
|
||||
- 'app/controllers/application_controller.rb'
|
||||
- 'app/controllers/spree/admin/orders_controller_decorator.rb'
|
||||
- 'lib/tasks/data.rake'
|
||||
|
||||
# Offense count: 268
|
||||
# Offense count: 266
|
||||
Style/Send:
|
||||
Exclude:
|
||||
- 'spec/controllers/admin/subscriptions_controller_spec.rb'
|
||||
@@ -2379,7 +2325,7 @@ Style/StructInheritance:
|
||||
Exclude:
|
||||
- 'lib/open_food_network/enterprise_fee_applicator.rb'
|
||||
|
||||
# Offense count: 93
|
||||
# Offense count: 90
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: IgnoredMethods.
|
||||
# IgnoredMethods: respond_to, define_method
|
||||
@@ -2403,7 +2349,6 @@ Style/SymbolProc:
|
||||
- 'lib/open_food_network/reports/bulk_coop_supplier_report.rb'
|
||||
- 'lib/spree/product_filters.rb'
|
||||
- 'spec/controllers/api/order_cycles_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/orders_controller_spec.rb'
|
||||
- 'spec/controllers/spree/api/products_controller_spec.rb'
|
||||
- 'spec/controllers/spree/api/variants_controller_spec.rb'
|
||||
- 'spec/features/admin/bulk_product_update_spec.rb'
|
||||
|
||||
5
Gemfile
5
Gemfile
@@ -92,10 +92,7 @@ group :assets do
|
||||
gem 'compass-rails'
|
||||
gem 'coffee-rails', '~> 3.2.1'
|
||||
|
||||
gem 'mini_racer'
|
||||
# We found that the following version of libv8 breaks the compilation of mini_racer.
|
||||
# Nothing else depends on libv8.
|
||||
gem 'libv8', '!= 6.7.288.46.1'
|
||||
gem 'therubyracer', '=0.12.0'
|
||||
|
||||
gem 'uglifier', '>= 1.0.3'
|
||||
|
||||
|
||||
15
Gemfile.lock
15
Gemfile.lock
@@ -187,7 +187,7 @@ GEM
|
||||
bcrypt (3.1.11)
|
||||
bcrypt-ruby (3.1.5)
|
||||
bcrypt (>= 3.1.3)
|
||||
blockenspiel (0.4.5)
|
||||
blockenspiel (0.5.0)
|
||||
bugsnag (4.1.0)
|
||||
builder (3.0.4)
|
||||
byebug (9.0.6)
|
||||
@@ -503,7 +503,7 @@ GEM
|
||||
addressable (~> 2.3)
|
||||
letter_opener (1.6.0)
|
||||
launchy (~> 2.2)
|
||||
libv8 (6.3.292.48.1)
|
||||
libv8 (3.16.14.19)
|
||||
listen (3.0.8)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
@@ -515,8 +515,6 @@ GEM
|
||||
mime-types (1.25.1)
|
||||
mini_mime (1.0.1)
|
||||
mini_portile2 (2.1.0)
|
||||
mini_racer (0.1.15)
|
||||
libv8 (~> 6.3)
|
||||
momentjs-rails (2.20.1)
|
||||
railties (>= 3.1)
|
||||
money (5.1.1)
|
||||
@@ -621,6 +619,7 @@ GEM
|
||||
rdoc (3.12.2)
|
||||
json (~> 1.4)
|
||||
redcarpet (3.2.3)
|
||||
ref (2.0.0)
|
||||
roadie (3.4.0)
|
||||
css_parser (~> 1.4)
|
||||
nokogiri (~> 1.5)
|
||||
@@ -703,6 +702,9 @@ GEM
|
||||
stringex (1.5.1)
|
||||
stripe (3.3.2)
|
||||
faraday (~> 0.9)
|
||||
therubyracer (0.12.0)
|
||||
libv8 (~> 3.16.14.0)
|
||||
ref
|
||||
thor (0.20.3)
|
||||
tilt (1.4.1)
|
||||
timecop (0.9.1)
|
||||
@@ -800,9 +802,7 @@ DEPENDENCIES
|
||||
jwt (~> 1.5)
|
||||
knapsack
|
||||
letter_opener (>= 1.4.1)
|
||||
libv8 (!= 6.7.288.46.1)
|
||||
listen (= 3.0.8)
|
||||
mini_racer
|
||||
momentjs-rails
|
||||
nokogiri (>= 1.6.7.1)
|
||||
oauth2 (~> 1.2.0)
|
||||
@@ -840,6 +840,7 @@ DEPENDENCIES
|
||||
spring (= 1.1.3)
|
||||
spring-commands-rspec
|
||||
stripe (~> 3.3.2)
|
||||
therubyracer (= 0.12.0)
|
||||
timecop
|
||||
truncate_html
|
||||
turbo-sprockets-rails3
|
||||
@@ -856,4 +857,4 @@ RUBY VERSION
|
||||
ruby 2.1.5p273
|
||||
|
||||
BUNDLED WITH
|
||||
1.16.4
|
||||
1.17.2
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
angular.module("admin.variantOverrides").filter "hubPermissions", ($filter) ->
|
||||
return (products, hubPermissions, hub_id) ->
|
||||
return [] if !hub_id
|
||||
return [] if !hubPermissions[hub_id]
|
||||
return $filter('filter')(products, ((product) -> hubPermissions[hub_id].indexOf(product.producer_id) > -1), true)
|
||||
|
||||
@@ -16,8 +16,7 @@ module Admin
|
||||
@original_filename = params[:file].try(:original_filename)
|
||||
@non_updatable_fields = ProductImport::EntryValidator.non_updatable_fields
|
||||
|
||||
check_file_errors @importer
|
||||
check_spreadsheet_has_data @importer
|
||||
return if contains_errors? @importer
|
||||
|
||||
@ams_data = ams_data
|
||||
end
|
||||
@@ -63,15 +62,19 @@ module Admin
|
||||
true
|
||||
end
|
||||
|
||||
def check_file_errors(importer)
|
||||
def contains_errors?(importer)
|
||||
if importer.errors.present?
|
||||
redirect_to '/admin/product_import', notice: @importer.errors.full_messages.to_sentence
|
||||
return true
|
||||
end
|
||||
|
||||
check_spreadsheet_has_data importer
|
||||
end
|
||||
|
||||
def check_spreadsheet_has_data(importer)
|
||||
unless importer.item_count
|
||||
redirect_to '/admin/product_import', notice: I18n.t(:product_import_no_data_in_spreadsheet_notice)
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -7,13 +7,27 @@ class EnterprisesController < BaseController
|
||||
|
||||
# These prepended filters are in the reverse order of execution
|
||||
prepend_before_filter :set_order_cycles, :require_distributor_chosen, :reset_order, only: :shop
|
||||
before_filter :check_stock_levels, :set_noindex_meta_tag, only: :shop
|
||||
|
||||
before_filter :clean_permalink, only: :check_permalink
|
||||
before_filter :enable_embedded_shopfront
|
||||
|
||||
respond_to :js, only: :permalink_checker
|
||||
|
||||
def shop
|
||||
return redirect_to spree.cart_path unless enough_stock?
|
||||
set_noindex_meta_tag
|
||||
|
||||
enterprises = current_distributor
|
||||
.plus_relatives_and_oc_producers(shop_order_cycles)
|
||||
.activated
|
||||
.includes(address: :state)
|
||||
.all
|
||||
|
||||
enterprises = inject_json_ams('enterprises', enterprises)
|
||||
|
||||
render locals: { enterprises: enterprises }
|
||||
end
|
||||
|
||||
def relatives
|
||||
set_enterprise
|
||||
|
||||
@@ -48,10 +62,8 @@ class EnterprisesController < BaseController
|
||||
params[:permalink] = params[:permalink].parameterize
|
||||
end
|
||||
|
||||
def check_stock_levels
|
||||
if current_order(true).insufficient_stock_lines.present?
|
||||
redirect_to spree.cart_path
|
||||
end
|
||||
def enough_stock?
|
||||
current_order(true).insufficient_stock_lines.blank?
|
||||
end
|
||||
|
||||
def reset_order
|
||||
@@ -85,7 +97,25 @@ class EnterprisesController < BaseController
|
||||
order.order_cycle = order_cycle_options.first if order_cycle_options.count == 1
|
||||
end
|
||||
|
||||
def shop_order_cycles
|
||||
if current_order_cycle
|
||||
[current_order_cycle]
|
||||
else
|
||||
OrderCycle.not_closed.with_distributor(current_distributor)
|
||||
end
|
||||
end
|
||||
|
||||
def set_noindex_meta_tag
|
||||
@noindex_meta_tag = true unless current_distributor.visible?
|
||||
end
|
||||
|
||||
def inject_json_ams(name, object)
|
||||
options = {
|
||||
each_serializer: Api::EnterpriseSerializer,
|
||||
data: OpenFoodNetwork::EnterpriseInjectionData.new
|
||||
}
|
||||
serializer_instance = ActiveModel::ArraySerializer.new(object, options)
|
||||
|
||||
{ name: name, json: serializer_instance.to_json }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -54,7 +54,7 @@ module CheckoutHelper
|
||||
end
|
||||
|
||||
def display_adjustment_tax_rates(adjustment)
|
||||
tax_rates = adjustment.tax_rates
|
||||
tax_rates = TaxRateFinder.tax_rates_of(adjustment)
|
||||
tax_rates.map { |tr| number_to_percentage(tr.amount * 100, :precision => 1) }.join(", ")
|
||||
end
|
||||
|
||||
|
||||
@@ -14,15 +14,6 @@ module InjectionHelper
|
||||
inject_json_ams "enterprises", current_distributor.relatives_including_self.activated.includes(address: :state).all, Api::EnterpriseSerializer, enterprise_injection_data
|
||||
end
|
||||
|
||||
def inject_shop_enterprises
|
||||
ocs = if current_order_cycle
|
||||
[current_order_cycle]
|
||||
else
|
||||
OrderCycle.not_closed.with_distributor(current_distributor)
|
||||
end
|
||||
inject_json_ams "enterprises", current_distributor.plus_relatives_and_oc_producers(ocs).activated.includes(address: :state).all, Api::EnterpriseSerializer, enterprise_injection_data
|
||||
end
|
||||
|
||||
def inject_group_enterprises
|
||||
inject_json_ams "group_enterprises", @group.enterprises.activated.all, Api::EnterpriseSerializer, enterprise_injection_data
|
||||
end
|
||||
|
||||
@@ -12,19 +12,5 @@ module Calculator
|
||||
total_weight = line_items.sum { |li| ((li.variant.andand.weight || 0) * li.quantity) }
|
||||
total_weight * preferred_per_kg
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def line_items_for(object)
|
||||
if object.respond_to? :order
|
||||
object.order.line_items
|
||||
elsif object.respond_to? :line_items
|
||||
object.line_items
|
||||
elsif object.respond_to?(:variant) && object.respond_to?(:quantity)
|
||||
[object]
|
||||
else
|
||||
raise "Unknown object type: #{object.inspect}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -206,7 +206,7 @@ module ProductImport
|
||||
|
||||
def open_spreadsheet
|
||||
if accepted_mimetype
|
||||
Roo::Spreadsheet.open(@file, extension: accepted_mimetype)
|
||||
Roo::Spreadsheet.open(@file, extension: accepted_mimetype, encoding: Encoding::UTF_8)
|
||||
else
|
||||
errors.add(:importer, I18n.t(:product_importer_spreadsheet_error))
|
||||
delete_uploaded_file
|
||||
@@ -227,6 +227,14 @@ module ProductImport
|
||||
(2..@sheet.last_row).map do |i|
|
||||
@sheet.row(i)
|
||||
end
|
||||
rescue ArgumentError => e
|
||||
if e.message.include? 'invalid byte sequence'
|
||||
errors.add(:importer, I18n.t('admin.product_import.model.encoding_error'))
|
||||
else
|
||||
errors.add(:importer, I18n.t('admin.product_import.model.unexpected_error',
|
||||
error_message: e.message))
|
||||
end
|
||||
[]
|
||||
end
|
||||
|
||||
def build_entries_in_range
|
||||
|
||||
@@ -40,33 +40,6 @@ module Spree
|
||||
included_tax > 0
|
||||
end
|
||||
|
||||
# @return [Array<Spree::TaxRate>]
|
||||
def tax_rates
|
||||
case originator
|
||||
when Spree::TaxRate
|
||||
[originator]
|
||||
when EnterpriseFee
|
||||
case source
|
||||
when Spree::LineItem
|
||||
tax_category = originator.inherits_tax_category? ? source.product.tax_category : originator.tax_category
|
||||
return tax_category ? tax_category.tax_rates.match(source.order) : []
|
||||
when Spree::Order
|
||||
return originator.tax_category ? originator.tax_category.tax_rates.match(source) : []
|
||||
end
|
||||
else
|
||||
find_closest_tax_rates_from_included_tax
|
||||
end
|
||||
end
|
||||
|
||||
# shipping fees and adjustments created from the admin panel have
|
||||
# taxes set at creation in the included_tax field without relation
|
||||
# to the corresponding TaxRate, so we look for the closest one
|
||||
def find_closest_tax_rates_from_included_tax
|
||||
approximation = (included_tax / (amount - included_tax))
|
||||
return [] if approximation.infinite? or approximation.zero?
|
||||
[Spree::TaxRate.order("ABS(amount - #{approximation})").first]
|
||||
end
|
||||
|
||||
def self.without_callbacks
|
||||
skip_callback :save, :after, :update_adjustable
|
||||
skip_callback :destroy, :after, :update_adjustable
|
||||
|
||||
@@ -5,9 +5,11 @@ module Spree
|
||||
# Given an object which might be an Order or a LineItem (amongst
|
||||
# others), return a collection of line items.
|
||||
def line_items_for(object)
|
||||
if object.respond_to? :line_items
|
||||
if object.is_a?(Spree::LineItem)
|
||||
[object]
|
||||
elsif object.respond_to? :line_items
|
||||
object.line_items
|
||||
elsif object.respond_to? :order
|
||||
elsif object.order.present?
|
||||
object.order.line_items
|
||||
else
|
||||
[object]
|
||||
|
||||
@@ -289,7 +289,7 @@ Spree::Order.class_eval do
|
||||
|
||||
def tax_adjustment_totals
|
||||
tax_adjustments.each_with_object(Hash.new) do |adjustment, hash|
|
||||
tax_rates = adjustment.tax_rates
|
||||
tax_rates = TaxRateFinder.tax_rates_of(adjustment)
|
||||
tax_rates_hash = Hash[tax_rates.collect do |tax_rate|
|
||||
tax_amount = tax_rates.one? ? adjustment.included_tax : tax_rate.compute_tax(adjustment.amount)
|
||||
[tax_rate, tax_amount]
|
||||
|
||||
81
app/services/tax_rate_finder.rb
Normal file
81
app/services/tax_rate_finder.rb
Normal file
@@ -0,0 +1,81 @@
|
||||
# Finds tax rates on which an adjustment is based on.
|
||||
# For example a packaging fee may contain VAT. This service finds the VAT rate
|
||||
# for the tax included in the packaging fee.
|
||||
class TaxRateFinder
|
||||
# @return [Array<Spree::TaxRate>]
|
||||
def self.tax_rates_of(adjustment)
|
||||
new.tax_rates(
|
||||
adjustment.originator,
|
||||
adjustment.source,
|
||||
adjustment.amount,
|
||||
adjustment.included_tax
|
||||
)
|
||||
end
|
||||
|
||||
# @return [Array<Spree::TaxRate>]
|
||||
def tax_rates(originator, source, amount, included_tax)
|
||||
find_associated_tax_rate(originator, source) ||
|
||||
find_closest_tax_rates_from_included_tax(amount, included_tax)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def find_associated_tax_rate(originator, source)
|
||||
case originator
|
||||
when Spree::TaxRate
|
||||
[originator]
|
||||
when EnterpriseFee
|
||||
enterprise_fee_tax_rates(originator, source)
|
||||
end
|
||||
end
|
||||
|
||||
def enterprise_fee_tax_rates(enterprise_fee, source)
|
||||
case source
|
||||
when Spree::LineItem
|
||||
tax_category = line_item_tax_category(enterprise_fee, source)
|
||||
tax_category ? tax_category.tax_rates.match(source.order) : []
|
||||
when Spree::Order
|
||||
enterprise_fee.tax_category ? enterprise_fee.tax_category.tax_rates.match(source) : []
|
||||
end
|
||||
end
|
||||
|
||||
def line_item_tax_category(enterprise_fee, line_item)
|
||||
if enterprise_fee.inherits_tax_category?
|
||||
line_item.product.tax_category
|
||||
else
|
||||
enterprise_fee.tax_category
|
||||
end
|
||||
end
|
||||
|
||||
# There are two cases in which a line item is not associated to a tax rate.
|
||||
#
|
||||
# 1. Shipping fees and adjustments created from the admin panel have taxes set
|
||||
# at creation in the included_tax field without relation to the
|
||||
# corresponding TaxRate.
|
||||
# 2. Removing line items from an order doesn't always remove the associated
|
||||
# enterprise fees. These orphaned fees don't have a line item any more to
|
||||
# find the item's tax rate.
|
||||
#
|
||||
# In these cases we try to find the used tax rate based on the included tax.
|
||||
# For example, if the included tax is 10% of the adjustment, we look for a tax
|
||||
# rate of 10%. Due to rounding errors, the included tax may be 9.9% of the
|
||||
# adjustment. That's why we call it an approximation of the tax rate and look
|
||||
# for the closest and hopefully find the 10% tax rate.
|
||||
#
|
||||
# This attempt can fail.
|
||||
#
|
||||
# - If an admin created an adjustment with a miscalculated included tax then
|
||||
# we don't know which tax rate the admin intended to use.
|
||||
# - An admin may also enter included tax that doesn't correspond to any tax
|
||||
# rate in the system. They may enter a fee of $1.2 with tax of $0.2, but
|
||||
# that doesn't mean that there is a 20% tax rate in the database.
|
||||
# - The used tax rate may also have been deleted. Maybe the tax law changed.
|
||||
#
|
||||
# In either of these cases, we will find a tax rate that doesn't correspond
|
||||
# to the included tax.
|
||||
def find_closest_tax_rates_from_included_tax(amount, included_tax)
|
||||
approximation = (included_tax / (amount - included_tax))
|
||||
return [] if approximation.infinite? || approximation.zero?
|
||||
[Spree::TaxRate.order("ABS(amount - #{approximation})").first]
|
||||
end
|
||||
end
|
||||
@@ -5,7 +5,7 @@
|
||||
- content_for(:image) do
|
||||
= current_distributor.logo.url
|
||||
|
||||
= inject_shop_enterprises
|
||||
= render partial: 'json/injection_ams', locals: enterprises
|
||||
|
||||
%shop.darkswarm
|
||||
- if @shopfront_layout == 'embedded'
|
||||
|
||||
@@ -20,4 +20,4 @@
|
||||
%td{colspan: @header.count}= t(:none)
|
||||
- else
|
||||
%p.report__message
|
||||
= t(".select_and_search")
|
||||
= t(".select_and_search", option: msg_option.upcase)
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
%br
|
||||
= button t(:search)
|
||||
|
||||
= render "table", id: "listing_orders"
|
||||
= render "table", id: "listing_orders", msg_option: t(:search)
|
||||
|
||||
@@ -27,6 +27,6 @@
|
||||
= check_box_tag :csv
|
||||
= label_tag :csv, t(:report_customers_csv)
|
||||
%br
|
||||
= button t(:search)
|
||||
= button t(:go)
|
||||
|
||||
= render "table", id: "listing_customers"
|
||||
= render "table", id: "listing_customers", msg_option: t(:go)
|
||||
|
||||
@@ -29,4 +29,4 @@
|
||||
.row
|
||||
= button t(:search)
|
||||
|
||||
= render "table", id: "listing_ocm_orders"
|
||||
= render "table", id: "listing_ocm_orders", msg_option: t(:search)
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
%br
|
||||
= button t(:search)
|
||||
|
||||
= render "table", id: "listing_orders"
|
||||
= render "table", id: "listing_orders", msg_option: t(:search)
|
||||
|
||||
@@ -25,4 +25,4 @@
|
||||
.row
|
||||
= button t(:search)
|
||||
|
||||
= render "table", id: "listing_orders"
|
||||
= render "table", id: "listing_orders", msg_option: t(:search)
|
||||
|
||||
@@ -25,4 +25,4 @@
|
||||
.row
|
||||
= button t(:search)
|
||||
|
||||
= render "table", id: "listing_orders"
|
||||
= render "table", id: "listing_orders", msg_option: t(:search)
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
%br
|
||||
= button t(:search)
|
||||
|
||||
= render "table", id: "listing_orders"
|
||||
= render "table", id: "listing_orders", msg_option: t(:search)
|
||||
|
||||
@@ -30,5 +30,5 @@
|
||||
= check_box_tag :csv
|
||||
= label_tag :csv, t(:report_customers_csv)
|
||||
%br
|
||||
= button t(:search)
|
||||
= render "table", id: "listing_products"
|
||||
= button t(:go)
|
||||
= render "table", id: "listing_products", msg_option: t(:go)
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
%br
|
||||
= button t(:search)
|
||||
|
||||
= render "table", id: "listing_orders", column_partials: {0 => "link_order"}
|
||||
= render "table", id: "listing_orders", column_partials: {0 => "link_order"}, msg_option: t(:search)
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
.row
|
||||
= button t(:search)
|
||||
|
||||
= render "table", id: "users_and_enterprises"
|
||||
= render "table", id: "users_and_enterprises", msg_option: t(:search)
|
||||
|
||||
@@ -32,4 +32,4 @@
|
||||
.four.columns.alpha= button t(:search)
|
||||
|
||||
|
||||
= render "table", id: "listing_invoices"
|
||||
= render "table", id: "listing_invoices", msg_option: t(:search)
|
||||
|
||||
@@ -1699,6 +1699,9 @@ de_DE:
|
||||
update_and_recalculate_fees: "Aktualisieren und Gebühren neu berechnen"
|
||||
registration:
|
||||
steps:
|
||||
images:
|
||||
back: "Zurück"
|
||||
headline: "Dankeschön!"
|
||||
type:
|
||||
headline: "Letzter Schritt zum Hinzufügen von %{enterprise}!"
|
||||
question: "Sind Sie ein Produzent?"
|
||||
@@ -1833,8 +1836,6 @@ de_DE:
|
||||
registration_type_error: "Bitte wählen Sie: Sind Sie ein Produzent?"
|
||||
registration_type_producer_help: "Hersteller machen leckere Dinge zu essen und / oder zu trinken. Du bist ein Produzent, wenn du ihn anbaust, erziehst ihn, braue ihn, backe ihn, gähre ihn, melke ihn oder forme ihn."
|
||||
registration_type_no_producer_help: "Wenn Sie kein Produzent sind, sind Sie wahrscheinlich jemand, der Lebensmittel verkauft und verteilt. Sie könnten ein Hub, Coop, Einkaufsgruppe, Einzelhändler, Großhändler oder andere sein."
|
||||
registration_images_headline: "Dankeschön!"
|
||||
registration_images_description: "Lass uns ein paar schöne Bilder hochladen, damit dein Profil gut aussieht! :)"
|
||||
registration_detail_headline: "Lass uns anfangen"
|
||||
registration_detail_enterprise: "Woot! Zuerst müssen wir ein wenig über Ihr Unternehmen wissen:"
|
||||
registration_detail_producer: "Woot! Zuerst müssen wir ein wenig über Ihre Farm wissen:"
|
||||
@@ -2431,7 +2432,13 @@ de_DE:
|
||||
in Ihrem Warenkorb verringert. Das Folgende hat sich geändert:
|
||||
now_out_of_stock: ist jetzt ausverkauft.
|
||||
only_n_remainging: "Jetzt hat nur noch %{num} übrig."
|
||||
variants:
|
||||
on_demand:
|
||||
'yes': "Auf Anfrage"
|
||||
variant_overrides:
|
||||
on_demand:
|
||||
'yes': "Ja"
|
||||
'no': "Nein"
|
||||
inventory_products: "Katalogprodukte"
|
||||
hidden_products: "Ausgeblendete Produkte"
|
||||
new_products: "Neue Produkte"
|
||||
|
||||
@@ -531,6 +531,8 @@ en:
|
||||
inventory_no_permission: you do not have permission to create inventory for this producer
|
||||
none_saved: did not save any products successfully
|
||||
line_number: "Line %{number}:"
|
||||
encoding_error: "Please check the language setting of your source file and ensure it is saved with UTF-8 encoding"
|
||||
unexpected_error: "Product Import encountered an unexpected error whilst opening the file: %{error_message}"
|
||||
index:
|
||||
select_file: Select a spreadsheet to upload
|
||||
spreadsheet: Spreadsheet
|
||||
@@ -2807,7 +2809,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
display_as: Display As
|
||||
reports:
|
||||
table:
|
||||
select_and_search: "Select filters and click on SEARCH to access your data."
|
||||
select_and_search: "Select filters and click on %{option} to access your data."
|
||||
bulk_coop:
|
||||
bulk_coop_supplier_report: 'Bulk Co-op - Totals by Supplier'
|
||||
bulk_coop_allocation: 'Bulk Co-op - Allocation'
|
||||
|
||||
@@ -712,6 +712,7 @@ en_BE:
|
||||
close_date: Close Date
|
||||
social:
|
||||
twitter_placeholder: eg. @the_prof
|
||||
facebook_placeholder: eg. www.facebook.com/PageNameHere
|
||||
stripe_connect:
|
||||
connect_with_stripe: "Connect with Stripe"
|
||||
stripe_connect_intro: "To accept payments using credit card, you will need to connect your stripe account to the Open Food Network. Use the button to the right to get started."
|
||||
@@ -1702,6 +1703,11 @@ en_BE:
|
||||
update_and_recalculate_fees: "Update And Recalculate Fees"
|
||||
registration:
|
||||
steps:
|
||||
images:
|
||||
continue: "Continue"
|
||||
back: "Back"
|
||||
headline: "Thanks!"
|
||||
description: "Let's upload some pretty pictures so your profile looks great! :)"
|
||||
type:
|
||||
headline: "Last step to add %{enterprise}!"
|
||||
question: "Are you a producer?"
|
||||
@@ -1836,8 +1842,6 @@ en_BE:
|
||||
registration_type_error: "Please choose one. Are you are producer?"
|
||||
registration_type_producer_help: "Producers make yummy things to eat and/or drink. You're a producer if you grow it, raise it, brew it, bake it, ferment it, milk it or mould it."
|
||||
registration_type_no_producer_help: "If you’re not a producer, you’re probably someone who sells and distributes food. You might be a hub, coop, buying group, retailer, wholesaler or other."
|
||||
registration_images_headline: "Thanks!"
|
||||
registration_images_description: "Let's upload some pretty pictures so your profile looks great! :)"
|
||||
registration_detail_headline: "Let's Get Started"
|
||||
registration_detail_enterprise: "Woot! First we need to know a little bit about your enterprise:"
|
||||
registration_detail_producer: "Woot! First we need to know a little bit about your farm:"
|
||||
@@ -2434,7 +2438,13 @@ en_BE:
|
||||
in your cart have reduced. Here's what's changed:
|
||||
now_out_of_stock: is now out of stock.
|
||||
only_n_remainging: "now only has %{num} remaining."
|
||||
variants:
|
||||
on_demand:
|
||||
'yes': "On demand"
|
||||
variant_overrides:
|
||||
on_demand:
|
||||
'yes': "Yes"
|
||||
'no': "No"
|
||||
inventory_products: "Inventory Products"
|
||||
hidden_products: "Hidden Products"
|
||||
new_products: "New Products"
|
||||
|
||||
@@ -24,6 +24,11 @@ en_GB:
|
||||
attributes:
|
||||
orders_close_at:
|
||||
after_orders_open_at: must be after open date
|
||||
variant_override:
|
||||
count_on_hand:
|
||||
using_producer_stock_settings_but_count_on_hand_set: "must be blank because using producer stock settings"
|
||||
on_demand_but_count_on_hand_set: "must be blank if on demand"
|
||||
limited_stock_but_no_count_on_hand: "must be specified because forcing limited stock"
|
||||
activemodel:
|
||||
errors:
|
||||
models:
|
||||
@@ -470,6 +475,8 @@ en_GB:
|
||||
inventory_no_permission: you do not have permission to create inventory for this producer
|
||||
none_saved: did not save any products successfully
|
||||
line_number: "Line %{number}:"
|
||||
encoding_error: "Please check the language setting of your source file and ensure it is saved with UTF-8 encoding"
|
||||
unexpected_error: "Product Import encountered an unexpected error whilst opening the file: %{error_message}"
|
||||
index:
|
||||
select_file: Select a spreadsheet to upload
|
||||
spreadsheet: Spreadsheet
|
||||
@@ -715,6 +722,9 @@ en_GB:
|
||||
close_date: Close Date
|
||||
social:
|
||||
twitter_placeholder: eg. @the_prof
|
||||
instagram_placeholder: eg. the_prof
|
||||
facebook_placeholder: eg. www.facebook.com/PageNameHere
|
||||
linkedin_placeholder: eg. www.linkedin.com/in/YourNameHere
|
||||
stripe_connect:
|
||||
connect_with_stripe: "Connect with Stripe"
|
||||
stripe_connect_intro: "To accept payments using credit card, you will need to connect your stripe account to the Open Food Network. Use the button to the right to get started."
|
||||
@@ -1705,6 +1715,11 @@ en_GB:
|
||||
update_and_recalculate_fees: "Update And Recalculate Fees"
|
||||
registration:
|
||||
steps:
|
||||
images:
|
||||
continue: "Continue"
|
||||
back: "Back"
|
||||
headline: "Thanks!"
|
||||
description: "Let's upload some pictures so your profile looks great! :)"
|
||||
type:
|
||||
headline: "Last step to add %{enterprise}!"
|
||||
question: "Are you a producer?"
|
||||
@@ -1839,8 +1854,6 @@ en_GB:
|
||||
registration_type_error: "Please choose one. Are you are producer?"
|
||||
registration_type_producer_help: "Producers make things to eat and/or drink. You're a producer if you might grow it, raise it, brew it, bake it or ferment it."
|
||||
registration_type_no_producer_help: "If you’re not a producer, you’re probably someone who sells and distributes food. You might be a hub, coop, buying group, retailer, wholesaler or other."
|
||||
registration_images_headline: "Thanks!"
|
||||
registration_images_description: "Let's upload some pictures so your profile looks great! :)"
|
||||
registration_detail_headline: "Let's get started"
|
||||
registration_detail_enterprise: "First we need to know a little bit about your enterprise:"
|
||||
registration_detail_producer: "First we need to know a little bit about your farm:"
|
||||
@@ -2444,7 +2457,14 @@ en_GB:
|
||||
in your cart have reduced. Here's what's changed:
|
||||
now_out_of_stock: is now out of stock.
|
||||
only_n_remainging: "now only has %{num} remaining."
|
||||
variants:
|
||||
on_demand:
|
||||
'yes': "Unlimited"
|
||||
variant_overrides:
|
||||
on_demand:
|
||||
use_producer_settings: "Use producer stock settings"
|
||||
'yes': "Yes"
|
||||
'no': "No"
|
||||
inventory_products: "Inventory Products"
|
||||
hidden_products: "Hidden Products"
|
||||
new_products: "New Products"
|
||||
@@ -2548,6 +2568,12 @@ en_GB:
|
||||
other: "You have %{count} active order cycles."
|
||||
manage_order_cycles: "MANAGE ORDER CYCLES"
|
||||
payment_methods:
|
||||
new:
|
||||
new_payment_method: "New Payment Method"
|
||||
back_to_payment_methods_list: "Back To Payment Methods List"
|
||||
edit:
|
||||
editing_payment_method: "Editing Payment Method"
|
||||
back_to_payment_methods_list: "Back To Payment Methods List"
|
||||
stripe_connect:
|
||||
enterprise_select_placeholder: Choose...
|
||||
loading_account_information_msg: Loading account information from stripe, please wait...
|
||||
@@ -2600,7 +2626,7 @@ en_GB:
|
||||
display_as: Display As
|
||||
reports:
|
||||
table:
|
||||
select_and_search: "Select filters and click on SEARCH to access your data."
|
||||
select_and_search: "Select filters and click on %{option} to access your data."
|
||||
bulk_coop:
|
||||
bulk_coop_supplier_report: 'Bulk Co-op - Totals by Supplier'
|
||||
bulk_coop_allocation: 'Bulk Co-op - Allocation'
|
||||
|
||||
@@ -24,6 +24,11 @@ es:
|
||||
attributes:
|
||||
orders_close_at:
|
||||
after_orders_open_at: debe ser después de la fecha de apertura
|
||||
variant_override:
|
||||
count_on_hand:
|
||||
using_producer_stock_settings_but_count_on_hand_set: "debe estar en blanco porque estás usando la configuración de estoc de la productora"
|
||||
on_demand_but_count_on_hand_set: "debe estar en blanco si está bajo demanda"
|
||||
limited_stock_but_no_count_on_hand: "se debe especificar porque se ha definido estoc limitado"
|
||||
activemodel:
|
||||
errors:
|
||||
models:
|
||||
@@ -195,6 +200,7 @@ es:
|
||||
admin_and_handling: Administración y Manejo
|
||||
profile: Perfil
|
||||
supplier_only: Sólo Proveedor
|
||||
has_shopfront: Tiene tienda
|
||||
weight: Peso
|
||||
volume: Volumen
|
||||
items: Elementos
|
||||
@@ -216,6 +222,10 @@ es:
|
||||
quantity: Cantidad
|
||||
pick_up: Recogida
|
||||
copy: Copia
|
||||
password_confirmation: Confirmación de contraseña
|
||||
reset_password_token: token de restablecimiento de contraseña
|
||||
expired: ha expirado, por favor solicite una nueva
|
||||
back_to_payments_list: "Volver a la lista de pagos"
|
||||
actions:
|
||||
create_and_add_another: "Crear y agregar otro"
|
||||
admin:
|
||||
@@ -464,6 +474,7 @@ es:
|
||||
products_no_permission: no tienes permiso para administrar productos para esta organización
|
||||
inventory_no_permission: no tienes permiso para crear inventario para esta productora
|
||||
none_saved: No se guardó ningún producto con éxito
|
||||
line_number: "Línea %{number}:"
|
||||
index:
|
||||
select_file: Selecciona una hoja de cálculo para subir
|
||||
spreadsheet: Hoja de cálculo
|
||||
@@ -497,6 +508,7 @@ es:
|
||||
no_permission: no tienes permiso para administrar esta organización
|
||||
not_found: no se pudo encontrar la organización en la base de datos
|
||||
no_name: Sin nombre
|
||||
blank_enterprise: Algunos productos no tienen una organización definida.
|
||||
reset_absent?: Restablecer productos ausentes
|
||||
reset_absent_tip: Establezca el stock en cero para todos los productos existentes que no estén presentes en el archivo.
|
||||
overwrite_all: Sobrescribir todo
|
||||
@@ -567,6 +579,7 @@ es:
|
||||
tip: "Usa esta página para alterar la cantidad del producto en varios pedidos a la vez. Los productos pueden ser eliminados de los pedidos si es necesario. "
|
||||
shared: "¿Recurso compartido?"
|
||||
order_no: "Pedido Nº"
|
||||
order_date: "Completado en"
|
||||
max: "Max"
|
||||
product_unit: "Producto: Unidad"
|
||||
weight_volume: "Peso/Volumen"
|
||||
@@ -709,6 +722,9 @@ es:
|
||||
close_date: Fecha de Finalización
|
||||
social:
|
||||
twitter_placeholder: 'ej: the_prof'
|
||||
instagram_placeholder: p.ej. @mi_huerta
|
||||
facebook_placeholder: eg. www.facebook.com/NombreDePáginaAquí
|
||||
linkedin_placeholder: p.ej. www.linkedin.com/in/YourNameHere
|
||||
stripe_connect:
|
||||
connect_with_stripe: "Conectar con Stripe"
|
||||
stripe_connect_intro: "Para aceptar pagos con tarjeta de crédito, necesitarás conectar tu cuenta Stripe con Open Food Network. Usa el botón a la derecha para comenzar."
|
||||
@@ -1149,7 +1165,9 @@ es:
|
||||
menu_5_title: "Acerca de"
|
||||
menu_5_url: "http://katuma.org/"
|
||||
menu_6_title: "Conectar"
|
||||
menu_6_url: " "
|
||||
menu_7_title: "Aprender"
|
||||
menu_7_url: " "
|
||||
logo: "Logo (640x130)"
|
||||
logo_mobile: "Logo para móvil (75x26)"
|
||||
logo_mobile_svg: "Logo para móvil (SVG)"
|
||||
@@ -1697,6 +1715,11 @@ es:
|
||||
update_and_recalculate_fees: "Actualizar y recalcular tarifas"
|
||||
registration:
|
||||
steps:
|
||||
images:
|
||||
continue: "Continuar"
|
||||
back: "Atrás"
|
||||
headline: "¡Ya casi lo tenemos!"
|
||||
description: "¡Sube algunas fotografías así el perfil se verá mucho mejor! :)"
|
||||
type:
|
||||
headline: "Último paso para añadir %{enterprise}!"
|
||||
question: "¿Eres una productora?"
|
||||
@@ -1831,8 +1854,6 @@ es:
|
||||
registration_type_error: "Escoja una. ¿Es una productora?"
|
||||
registration_type_producer_help: "Las productoras hacen cosas deliciosas para comer y/o beber. Eres una productora si lo cultivas, lo haces crecer, lo preparas, lo horneas, lo fermentas, lo ordeñas, ..."
|
||||
registration_type_no_producer_help: "Si no eres una productora, probablemente conozcas a alguien que venda o distribuya comida. También podrías convertirte en un grupo de consumo u otro tipo de organización."
|
||||
registration_images_headline: "¡Ya casi lo tenemos!"
|
||||
registration_images_description: "¡Sube algunas fotografías así el perfil se verá mucho mejor! :)"
|
||||
registration_detail_headline: "Empecemos..."
|
||||
registration_detail_enterprise: "¡Bien! Primero necesitamos saber un poco más sobre tu organización:"
|
||||
registration_detail_producer: "¡Bien! Primero necesitamos saber un poco más sobre tu productora:"
|
||||
@@ -2229,6 +2250,7 @@ es:
|
||||
validation_msg_relationship_already_established: "^Esta relación ya existe."
|
||||
validation_msg_at_least_one_hub: "^Al menos se debe seleccionar un grupo de consumo"
|
||||
validation_msg_product_category_cant_be_blank: "^La Categoría del Producto no puede estar en vacía"
|
||||
validation_msg_tax: "^ Se requiere categoría de impuestos"
|
||||
validation_msg_tax_category_cant_be_blank: "^La Categoría del Impuesto no puede estar vacía"
|
||||
validation_msg_is_associated_with_an_exising_customer: "Está asociado con un consumidor existente"
|
||||
content_configuration_pricing_table: "(TODO: tabla de precios)"
|
||||
@@ -2418,6 +2440,9 @@ es:
|
||||
resolve: Resolver
|
||||
new_tag_rule_dialog:
|
||||
select_rule_type: "Selecciona un tipo de regla:"
|
||||
orders:
|
||||
index:
|
||||
per_page: "%{results} por página"
|
||||
resend_user_email_confirmation:
|
||||
resend: "Reenviar"
|
||||
sending: "Reenviar..."
|
||||
@@ -2430,7 +2455,14 @@ es:
|
||||
de tu carrito se han reducido. Aquí está lo que ha cambiado:
|
||||
now_out_of_stock: está ahora fuera de stock.
|
||||
only_n_remainging: "Solo quedan %{num} ."
|
||||
variants:
|
||||
on_demand:
|
||||
'yes': "Bajo demanda"
|
||||
variant_overrides:
|
||||
on_demand:
|
||||
use_producer_settings: "Utilizar la configuración de estoc de la productora."
|
||||
'yes': "Sí"
|
||||
'no': "No"
|
||||
inventory_products: "Productos del Inventario"
|
||||
hidden_products: "Productos ocultos"
|
||||
new_products: "Nuevos productos"
|
||||
@@ -2511,6 +2543,8 @@ es:
|
||||
next: "Siguiente"
|
||||
loading: "Cargando"
|
||||
no_orders_found: "No se encontraron pedidos"
|
||||
results_found: "%{number} Resultados encontrados."
|
||||
viewing: "Viendo de %{start}a %{end}."
|
||||
invoice:
|
||||
issued_on: Emitido el
|
||||
tax_invoice: FACTURA DE IMPUESTOS
|
||||
@@ -2532,6 +2566,12 @@ es:
|
||||
other: "Tienes %{count} ciclos de pedido activos."
|
||||
manage_order_cycles: "GESTIONA LOS CICLOS DE PEDIDO"
|
||||
payment_methods:
|
||||
new:
|
||||
new_payment_method: "Nuevo método de pago"
|
||||
back_to_payment_methods_list: "Volver a la lista de métodos de pago"
|
||||
edit:
|
||||
editing_payment_method: "Edición del método de pago"
|
||||
back_to_payment_methods_list: "Volver a la lista de métodos de pago"
|
||||
stripe_connect:
|
||||
enterprise_select_placeholder: Escoge...
|
||||
loading_account_information_msg: Cargando la información de la cuenta de Stripe, espere un momento ...
|
||||
@@ -2592,14 +2632,21 @@ es:
|
||||
bulk_coop_customer_payments: 'Bulk Co-op - Pagos de las Consumidoras'
|
||||
users:
|
||||
index:
|
||||
listing_users: "Listado de Usuarias"
|
||||
new_user: "Nueva usuaria"
|
||||
user: "Usuaria"
|
||||
enterprise_limit: "Límite de la Organización"
|
||||
search: "Buscar"
|
||||
email: "Email"
|
||||
edit:
|
||||
editing_user: "Editando usuarias"
|
||||
back_to_users_list: "Volver a la lista de usuarias"
|
||||
general_settings: "Configuración general"
|
||||
form:
|
||||
email: "Email"
|
||||
roles: "Roles"
|
||||
enterprise_limit: "Límite de la Organización"
|
||||
confirm_password: "Confirmar contraseña"
|
||||
password: "Contraseña"
|
||||
email_confirmation:
|
||||
confirmation_pending: "La confirmación por correo electrónico está pendiente. Hemos enviado un correo electrónico de confirmación a %{address}."
|
||||
|
||||
@@ -1987,7 +1987,7 @@ fr:
|
||||
spree_admin_overview_enterprises_header: "Mes entreprises"
|
||||
spree_admin_overview_enterprises_footer: "GÉRER MES ENTREPRISES"
|
||||
spree_admin_enterprises_hubs_name: "Nom"
|
||||
spree_admin_enterprises_create_new: "CRÉER NOUVELLE"
|
||||
spree_admin_enterprises_create_new: "CRÉER NOUVEAU"
|
||||
spree_admin_enterprises_shipping_methods: "Méthodes de livraison"
|
||||
spree_admin_enterprises_fees: "Marges et commissions"
|
||||
spree_admin_enterprises_none_create_a_new_enterprise: "CRÉER UNE NOUVELLE ENTREPRISE"
|
||||
@@ -2570,7 +2570,7 @@ fr:
|
||||
zero: "Vous n'avez aucun cycle de vente actif."
|
||||
one: "Vous avez un cycle de vente actif."
|
||||
other: "Vous avez %{count} cycles de vente actifs."
|
||||
manage_order_cycles: "GERER LES CYCLES DE VENTE"
|
||||
manage_order_cycles: "GÉRER LES CYCLES DE VENTE"
|
||||
payment_methods:
|
||||
new:
|
||||
new_payment_method: "Nouvelle méthode de paiement"
|
||||
|
||||
@@ -246,7 +246,7 @@ fr_BE:
|
||||
schedule: Rythme d'abonnement
|
||||
shipping: Expédition
|
||||
shipping_method: Option d'expédition
|
||||
shop: Boutique
|
||||
shop: Comptoir
|
||||
sku: Référence produit
|
||||
status_state: Province
|
||||
tags: Tags
|
||||
@@ -302,8 +302,8 @@ fr_BE:
|
||||
default_payment_method: 'doit être défini si vous souhaitez générer des factures pour les utilisateurs entreprises. '
|
||||
default_shipping_method: doit être défini si vous souhaitez générer des factures pour les utilisateurs entreprises.
|
||||
shopfront_settings:
|
||||
embedded_shopfront_settings: "Paramètres Boutiques Intégrées"
|
||||
enable_embedded_shopfronts: "Autoriser l'intégration des boutiques"
|
||||
embedded_shopfront_settings: "Paramètres comptoir Intégrées"
|
||||
enable_embedded_shopfronts: "Autoriser l'intégration des comptoirs"
|
||||
embedded_shopfronts_whitelist: "Liste blanche des Domaines Externes"
|
||||
number_localization:
|
||||
number_localization_settings: "Gestion localisation des nombres"
|
||||
@@ -396,7 +396,7 @@ fr_BE:
|
||||
search_by_email: "Recherche par email/code..."
|
||||
guest_label: 'Commande en mode invité'
|
||||
destroy:
|
||||
has_associated_orders: 'Suppression impossible: des commandes sont associées à cet acheteur pour cette boutique'
|
||||
has_associated_orders: 'Suppression impossible: des commandes sont associées à cet acheteur pour ce comptoir'
|
||||
contents:
|
||||
edit:
|
||||
title: Contenu
|
||||
@@ -552,7 +552,7 @@ fr_BE:
|
||||
add: Ajouter
|
||||
hide: Masquer
|
||||
import_date: Importé
|
||||
select_a_shop: Choisir un magasin
|
||||
select_a_shop: Choisir un comptoir
|
||||
review_now: Vérifier maintenant
|
||||
new_products_alert_message: Il y a %{new_product_count} nouveaux produits disponibles pouvant être ajoutés à votre catalogue.
|
||||
currently_empty: Votre catalogue est actuellement vide
|
||||
@@ -562,7 +562,7 @@ fr_BE:
|
||||
no_new_products: Pas de nouveaux produits à ajouter à ce catalogue
|
||||
no_matching_new_products: Pas de nouveaux produits répondant à la recherche
|
||||
inventory_powertip: Ceci est votre catalogue produits. Pour ajouter des produits à votre catalogue, sélectionnez "Nouveaux Produits" dans le menu déroulant.
|
||||
hidden_powertip: Ces produits ont été masqués de votre catalogue, vous ne pourrez pas les proposer dans votre boutique. Vous pouvez cliquer sur "Ajouter" pour ajouter un produit à votre catalogue.
|
||||
hidden_powertip: Ces produits ont été masqués de votre catalogue, vous ne pourrez pas les proposer dans votre comptoir. Vous pouvez cliquer sur "Ajouter" pour ajouter un produit à votre catalogue.
|
||||
new_powertip: Ces produits peuvent être ajoutés à votre catalogue. Cliquez sur "Ajouter" pour ajouter un produit à votre catalogue, ou 'Masquer" pour ne plus l'afficher. Vous pourrez changer d'avis plus tard!
|
||||
controls:
|
||||
back_to_my_inventory: Retour à mon catalogue magasin
|
||||
@@ -644,8 +644,8 @@ fr_BE:
|
||||
dans votre catalogue magasin avant qu'ils puissent être mis en vente
|
||||
dans votre magasin Si vous n'utilisez pas cet outil, choisissez l'option
|
||||
indiquant "recommandé" ci-dessous:
|
||||
preferred_product_selection_from_inventory_only_yes: Les nouveaux produits des producteurs peuvent être ajoutés à mon magasin en ligne (recommandé)
|
||||
preferred_product_selection_from_inventory_only_no: Les nouveaux produits des producteurs doivent être ajoutés à mon catalogue magasin avant de pouvoir être ajoutés à mon magasin en ligne
|
||||
preferred_product_selection_from_inventory_only_yes: Les nouveaux produits des producteurs peuvent être ajoutés à mon comptoir en ligne (recommandé)
|
||||
preferred_product_selection_from_inventory_only_no: Les nouveaux produits des producteurs doivent être ajoutés à mon catalogue comptoir avant de pouvoir être ajoutés à mon comptoir en ligne
|
||||
payment_methods:
|
||||
name: Nom
|
||||
applies: Active?
|
||||
@@ -672,9 +672,9 @@ fr_BE:
|
||||
visible: Visible
|
||||
not_visible: Invisible
|
||||
permalink: Nom pour URL (sans espace)
|
||||
permalink_tip: "Ce nom permanent est utilisé pour créer l'url de votre magasin: %{link}ma-boutique/shop"
|
||||
link_to_front: Lien URL du magasin
|
||||
link_to_front_tip: C'est le lien qui permet d'accéder en direct à votre magasin sur Open Food Network.
|
||||
permalink_tip: "Ce nom permanent est utilisé pour créer l'url de votre comptoir: %{link}ma-boutique/shop"
|
||||
link_to_front: Lien URL du comptoir
|
||||
link_to_front_tip: C'est le lien qui permet d'accéder en direct à votre comptoir sur Open Food Network.
|
||||
shipping_methods:
|
||||
name: Nom
|
||||
applies: Active?
|
||||
@@ -683,8 +683,8 @@ fr_BE:
|
||||
create_one_button: En créer une maintenant
|
||||
no_method_yet: Vous n'avez pas encore paramétré de méthode de livraison.
|
||||
shop_preferences:
|
||||
shopfront_requires_login: "Magasin visible par tous?"
|
||||
shopfront_requires_login_tip: "Choisissez si les acheteurs doivent être connectés pour voir le magasin ou si le magasin est visible par tout le monde."
|
||||
shopfront_requires_login: "Comptoir visible par tous?"
|
||||
shopfront_requires_login_tip: "Choisissez si les acheteurs doivent être connectés pour voir le magasin ou si le comptoir est visible par tout le monde."
|
||||
shopfront_requires_login_false: "Visible par tous"
|
||||
shopfront_requires_login_true: "Visible uniquement pour les acheteurs logués"
|
||||
recommend_require_login: "Nous recommandons de demander aux utilisateurs de se connecter si vous souhaitez leur permettre de modifier leur commande."
|
||||
@@ -700,20 +700,22 @@ fr_BE:
|
||||
enable_subscriptions_tip: "Activer la fonction abonnements?"
|
||||
enable_subscriptions_false: "Désactivé"
|
||||
enable_subscriptions_true: "Activé"
|
||||
shopfront_message: Message d'accueil magasin ouvert
|
||||
shopfront_message: Message d'accueil comptoir ouvert
|
||||
shopfront_message_placeholder: >
|
||||
Vous pouvez ici expliquer à vos acheteurs comment votre magasin fonctionne.
|
||||
Ce texte s'affiche dans votre magasin, au-dessus de la liste de produits.
|
||||
shopfront_closed_message: Message d'accueil magasin fermé
|
||||
Vous pouvez ici expliquer à vos acheteurs comment votre comptoir fonctionne.
|
||||
Ce texte s'affiche dans votre comptoir, au-dessus de la liste de produits.
|
||||
shopfront_closed_message: Message d'accueil comptoir fermé
|
||||
shopfront_closed_message_placeholder: >
|
||||
Vous pouvez ici expliquer à vos acheteurs pourquoi votre magasin est
|
||||
Vous pouvez ici expliquer à vos acheteurs pourquoi votre comptoir est
|
||||
fermé et/ou quand il ouvrira. Ce texte s'affiche uniquement quand il
|
||||
n'y a pas de cycle de vente en cours (donc quand votre magasin est fermé).
|
||||
n'y a pas de cycle de vente en cours (donc quand votre comptoir est
|
||||
fermé).
|
||||
shopfront_category_ordering: Ordre d'affichage des catégories
|
||||
open_date: Date d'ouverture
|
||||
close_date: Date de fermeture
|
||||
social:
|
||||
twitter_placeholder: ex. @OpenFoodNet_fr
|
||||
facebook_placeholder: 'ex: www.facebook.com/NomDeLaPage'
|
||||
stripe_connect:
|
||||
connect_with_stripe: "Connecter avec Stripe"
|
||||
stripe_connect_intro: "Pour accepter des paiements utilisant la carte bancaire, vous devez connecter votre compte Stripe à Open Food Network. Cliquez sur le bouton à droite pour commencer."
|
||||
@@ -775,19 +777,19 @@ fr_BE:
|
||||
connect_ofn: Gagnez en visibilité via OFFrance
|
||||
always_free: GRATUIT
|
||||
producer_description_text: Saisissez votre catalogue produits sur Open Food Network, ce qui permettra aux comptoirs utilisant la plateforme de les proposer dans leurs magasins (sur votre autorisation).
|
||||
producer_shop: Magasin Producteur
|
||||
producer_shop: Comptoir Producteur
|
||||
sell_your_produce: Vendez vos propres produits
|
||||
producer_shop_description_text: Vendez vos produits en direct aux consommateurs via votre propre Magasin Producteur sur Open Food Network.
|
||||
producer_shop_description_text: Vendez vos produits en direct aux consommateurs via votre propre Comptoir Producteur sur Open Food Network.
|
||||
producer_shop_description_text2: Un Magasin Producteur vous permet de vendre uniquement vos propres produits. Si vous voulez vendre d'autres produits, sélectionnez "Comptoir Producteur"
|
||||
producer_hub: Comptoir Producteur
|
||||
producer_hub_text: Vendez vos produits et ceux d'autres fournisseurs
|
||||
producer_hub_description_text: Vous vendez non seulement vos produits, mais aussi des produits d'autres producteurs de votre région, artisans, ou distributeurs afin de proposer une offre complète dans votre magasin. Vous soutenez ainsi le développement de votre système alimentaire territorial !
|
||||
producer_hub_description_text: Vous vendez non seulement vos produits, mais aussi des produits d'autres producteurs de votre région, artisans, ou distributeurs afin de proposer une offre complète dans votre comptoir. Vous soutenez ainsi le développement de votre système alimentaire territorial !
|
||||
profile: Profil uniquement
|
||||
get_listing: Référencez votre hub/point de vente
|
||||
profile_description_text: Les visiteurs peuvent vous trouver sur Open Food Network et vous contacter. Votre entreprise sera visible sur la carte.
|
||||
hub_shop: Magasin comptoir
|
||||
hub_shop_text: Vendez des produits de multiples fournisseurs différents
|
||||
hub_shop_description_text: Vous proposez des produits de différents producteurs de votre région, artisans, ou distributeurs afin de proposer une offre complète dans votre magasin. Vous soutenez ainsi le développement de votre système alimentaire territorial !
|
||||
hub_shop_description_text: Vous proposez des produits de différents producteurs de votre région, artisans, ou distributeurs afin de proposer une offre complète dans votre comptoir. Vous soutenez ainsi le développement de votre système alimentaire territorial !
|
||||
choose_option: Veuilliez choisir l'une des options ci-dessus.
|
||||
change_now: Changer
|
||||
enterprise_user_index:
|
||||
@@ -987,7 +989,7 @@ fr_BE:
|
||||
new: Nouvel abonnement
|
||||
create: Créer abonnement
|
||||
index:
|
||||
please_select_a_shop: Veuillez choisir une boutique
|
||||
please_select_a_shop: Veuillez choisir un comptoir
|
||||
edit_subscription: Mettre à jour Abonnement
|
||||
pause_subscription: Mettre en pause Abonnement
|
||||
unpause_subscription: Reprendre Abonnement
|
||||
@@ -995,8 +997,8 @@ fr_BE:
|
||||
setup_explanation:
|
||||
just_a_few_more_steps: 'Encore quelques étapes avant de pouvoir commencer:'
|
||||
enable_subscriptions: "Activez la fonction abonnements pour au moins une de vos comptoirs"
|
||||
enable_subscriptions_step_1_html: 1. Allez à %{enterprises_link}, trouvez votre boutique, et cliquez sur "Gérer"
|
||||
enable_subscriptions_step_2: 2. Sous "Préférences boutiques", activez la fonction Abonnements
|
||||
enable_subscriptions_step_1_html: 1. Allez à %{enterprises_link}, trouvez votre comptoir, et cliquez sur "Gérer"
|
||||
enable_subscriptions_step_2: 2. Sous "Préférences comptoir", activez la fonction Abonnements
|
||||
set_up_shipping_and_payment_methods_html: Paramétrez au moins une méthode d'%{shipping_link} et une méthode de %{payment_link}
|
||||
set_up_shipping_and_payment_methods_note_html: Notez bien que seules des méthodes de paiement de type "cash" ou "Stripe" pourront<br /> être utilisées pour les Abonnements
|
||||
ensure_at_least_one_customer_html: Assurez-vous qu'au moins un %{customer_link} est enregistré dans votre liste d'acheteurs.
|
||||
@@ -1113,7 +1115,7 @@ fr_BE:
|
||||
login: "Se connecter"
|
||||
register: "s'inscrire"
|
||||
contact: "contacter"
|
||||
require_customer_login: "La boutique est réservée aux membres."
|
||||
require_customer_login: "Le comptoir est réservée aux membres."
|
||||
require_login_html: "Déjà inscrit? %{login}. Sinon, %{register} pour pouvoir faire vos achats."
|
||||
require_customer_html: "Veuillez %{contact} %{enterprise} pour devenir membre."
|
||||
card_could_not_be_updated: La carte bancaire n'a pas pu être mise à jour
|
||||
@@ -1143,7 +1145,7 @@ fr_BE:
|
||||
ticket_column_item: "Produit"
|
||||
ticket_column_unit_price: "Prix unitaire"
|
||||
ticket_column_total_price: "Prix total"
|
||||
menu_1_title: "Comptoir"
|
||||
menu_1_title: "Comptoirs"
|
||||
menu_1_url: "/shops"
|
||||
menu_2_title: "Carte"
|
||||
menu_2_url: "/map"
|
||||
@@ -1198,8 +1200,8 @@ fr_BE:
|
||||
no_shipping_or_payment: pas de méthode de livraison ou de paiement
|
||||
unconfirmed: non confirmé
|
||||
days: jours
|
||||
label_shop: "Boutique"
|
||||
label_shops: "Comptoir"
|
||||
label_shop: "Comptoir"
|
||||
label_shops: "Comptoirs"
|
||||
label_map: "Carte"
|
||||
label_producer: "Producteur"
|
||||
label_producers: "Producteurs"
|
||||
@@ -1430,7 +1432,7 @@ fr_BE:
|
||||
email_signup_confirmed_email: "Merci d'avoir confirmé votre email."
|
||||
email_signup_shop_html: "Vous pouvez maintenant vous connecter sur %{link}."
|
||||
email_signup_text: "Merci d'avoir rejoint le réseau. Si vous êtes un client, nous sommes impatients de vous faire découvrir de nombreux agriculteurs fantastiques, de merveilleux comptoirs et des plats délicieux! Si vous êtes un producteur ou autre entreprise alimentaire, nous sommes ravis de vous compter parmi les membres du réseau."
|
||||
email_signup_help_html: "Vos questions et commentaire sont les bienvenus! Cliquez sur le bouton <em>Envoyer un commentaire</em> sur le site ou envoyez-nous un email à %{email}"
|
||||
email_signup_help_html: "Vos questions et commentaires sont les bienvenus! Cliquez sur le bouton <em>Envoyer un commentaire</em> sur le site ou envoyez-nous un email à %{email}"
|
||||
invite_email:
|
||||
greeting: "Bonjour!"
|
||||
invited_to_manage: "Vous avez été invité(e) à gérer %{enterprise} sur %{instance}."
|
||||
@@ -1604,7 +1606,7 @@ fr_BE:
|
||||
orders_edit_title: Panier
|
||||
orders_edit_headline: Votre panier
|
||||
orders_edit_time: Commande prête pour
|
||||
orders_edit_continue: Retour à la boutique
|
||||
orders_edit_continue: Retour au comptoir
|
||||
orders_edit_checkout: Etape suivante (coordonnées)
|
||||
orders_form_empty_cart: "Vider le panier"
|
||||
orders_form_subtotal: Sous-total
|
||||
@@ -1704,6 +1706,11 @@ fr_BE:
|
||||
update_and_recalculate_fees: "Mettre à jour et recalculer les frais"
|
||||
registration:
|
||||
steps:
|
||||
images:
|
||||
continue: "Suivant"
|
||||
back: "Retour"
|
||||
headline: "Merci!"
|
||||
description: "Ajoutez maintenant de jolies photos pour que votre profil soit attractif! :)"
|
||||
type:
|
||||
headline: "Dernière étape pour ajouter %{enterprise} !"
|
||||
question: "Etes-vous un producteur ?"
|
||||
@@ -1838,8 +1845,6 @@ fr_BE:
|
||||
registration_type_error: "Veuillez faire un choix. Etes vous un producteur?"
|
||||
registration_type_producer_help: "Un producteur fabrique de bonnes choses à boire et à manger. Vous êtes un producteur si vous les faites pousser, les élevez, les pétrissez, transformez, fermentez, les réduisez en grains, etc."
|
||||
registration_type_no_producer_help: "Si vous n'êtes pas un producteur, vous êtes probablement un revendeur ou distributeur alimentaire: un comptoir, une coopérative, un groupement d'achat, un revendeur, un grossiste, ou autre."
|
||||
registration_images_headline: "Merci!"
|
||||
registration_images_description: "Ajoutez maintenant de jolies photos pour que votre profil soit attractif! :)"
|
||||
registration_detail_headline: "Commençons"
|
||||
registration_detail_enterprise: "Woohoo! Dites-nous déjà quelques mots à propos de votre entreprise:"
|
||||
registration_detail_producer: "Woohoo! Dites-nous déjà quelques mots à propos de votre ferme:"
|
||||
@@ -1870,8 +1875,8 @@ fr_BE:
|
||||
shop_variant_quantity_min: "min"
|
||||
shop_variant_quantity_max: "max"
|
||||
follow: "Suivre"
|
||||
shop_for_products_html: "Acheter les produits de <span class=\"turquoise\">%{enterprise}</span> dans les boutiques suivantes:"
|
||||
change_shop: "Changer de boutique pour:"
|
||||
shop_for_products_html: "Acheter les produits de <span class=\"turquoise\">%{enterprise}</span> dans les comptoirs suivants:"
|
||||
change_shop: "Changer de comptoir pour:"
|
||||
shop_at: "Acheter maintenant :"
|
||||
price_breakdown: "Détail du prix:"
|
||||
admin_fee: "Frais de gestion admin"
|
||||
@@ -1979,7 +1984,7 @@ fr_BE:
|
||||
spree_admin_enterprises_fees: "Marges et commissions"
|
||||
spree_admin_enterprises_none_create_a_new_enterprise: "CRÉER UNE NOUVELLE ENTREPRISE"
|
||||
spree_admin_enterprises_none_text: "Vous n'avez pas encore d'entreprise"
|
||||
spree_admin_enterprises_tabs_hubs: "COMPTOIR"
|
||||
spree_admin_enterprises_tabs_hubs: "COMPTOIRS"
|
||||
spree_admin_enterprises_producers_manage_products: "GÉRER LES PRODUITS"
|
||||
spree_admin_enterprises_any_active_products_text: "Vous n'avez aucun produit actif."
|
||||
spree_admin_enterprises_create_new_product: "CRÉER UN NOUVEAU PRODUIT"
|
||||
@@ -2034,7 +2039,7 @@ fr_BE:
|
||||
admin_share_zipcode: "Code postal"
|
||||
admin_share_country: "Pays"
|
||||
admin_share_state: "Département"
|
||||
hub_sidebar_hubs: "Comptoir"
|
||||
hub_sidebar_hubs: "Comptoirs"
|
||||
hub_sidebar_none_available: "Aucun disponible"
|
||||
hub_sidebar_manage: "Gérer"
|
||||
hub_sidebar_at_least: "Sélectionnez un/des comptoir/s"
|
||||
@@ -2230,7 +2235,7 @@ fr_BE:
|
||||
payment_method_fee: "Frais de transaction"
|
||||
inventory_settings: "Catalogue boutique"
|
||||
tag_rules: "Règles de tag"
|
||||
shop_preferences: "Préférences boutique"
|
||||
shop_preferences: "Préférences comptoir"
|
||||
enterprise_fee_whole_order: Commande totale
|
||||
enterprise_fee_by: "%{type}marges/frais par %{role} %{enterprise_name}"
|
||||
validation_msg_relationship_already_established: "^Un lien est déjà établi entre ces entreprises."
|
||||
@@ -2300,7 +2305,7 @@ fr_BE:
|
||||
unavailable: Non disponible
|
||||
profile: Profil
|
||||
hub: Comptoir
|
||||
shop: Boutique
|
||||
shop: Comptoir
|
||||
choose: Choisir
|
||||
resolve_errors: Veuillez corriger les erreurs suivantes
|
||||
more_items: "+ %{count} en plus"
|
||||
@@ -2346,7 +2351,7 @@ fr_BE:
|
||||
hub_shop_text1: >
|
||||
Vous proposez des produits de différents producteurs de votre région,
|
||||
artisans, ou distributeurs afin de proposer une offre complète dans
|
||||
votre boutique. Vous soutenez ainsi le développement de votre système
|
||||
votre comptoir. Vous soutenez ainsi le développement de votre système
|
||||
alimentaire territorial !
|
||||
hub_shop_text2: >
|
||||
Un comptoir n'a pas de modèle figé, il peut s'agir d'un groupement d'achat,
|
||||
@@ -2371,24 +2376,24 @@ fr_BE:
|
||||
profile_only_text2: >
|
||||
Si vous souhaitez vous concentrer sur votre activité de production,
|
||||
et laisser à d'autre le soin de distribuer vos produits, vous n'avez
|
||||
pas besoin d'une boutique sur Open Food Network.
|
||||
pas besoin d'un comptoir sur Open Food Network.
|
||||
profile_only_text3: >
|
||||
Saisissez votre catalogue produits sur Open Food Network, ce qui permettra
|
||||
aux comptoirs utilisant la plateforme de les proposer dans leurs boutiques
|
||||
(sur votre autorisation).
|
||||
producer_shop: Boutique Producteur
|
||||
producer_shop: Comptoir Producteur
|
||||
producer_shop_text1: >
|
||||
Vendez vos produits en direct aux mangeurs/restaurateurs/etc. via votre
|
||||
propre Boutique Producteur sur Open Food Network.
|
||||
producer_shop_text2: >
|
||||
Une Boutique Producteur vous permet de vendre uniquement vos propres
|
||||
Une Comptoir Producteur vous permet de vendre uniquement vos propres
|
||||
produits. Si vous voulez vendre d'autres produits, sélectionnez "Comptoir
|
||||
Producteur"
|
||||
producer_hub: Comptoir Producteur
|
||||
producer_hub_text1: >
|
||||
Vous vendez non seulement vos produits, mais aussi des produits d'autres
|
||||
producteurs de votre région, artisans, ou distributeurs afin de proposer
|
||||
une offre complète dans votre boutique. Vous soutenez ainsi le développement
|
||||
une offre complète dans votre comptoir. Vous soutenez ainsi le développement
|
||||
de votre système alimentaire territorial !
|
||||
producer_hub_text2: >
|
||||
Un comptoir producteur peut prendre différentes formes, une boutique
|
||||
@@ -2413,7 +2418,7 @@ fr_BE:
|
||||
transformez, fermentez, les réduisez en grains, etc.
|
||||
producer_text2: >
|
||||
Un producteur peut aussi avoir d'autres rôles, comme par exemple stocker
|
||||
et distribuer des produits d'autres producteurs à travers une boutique
|
||||
et distribuer des produits d'autres producteurs à travers une comptoir
|
||||
sur Open Food Network.
|
||||
non_producer: Non-producteur
|
||||
non_producer_text1: >
|
||||
@@ -2450,7 +2455,13 @@ fr_BE:
|
||||
à votre demande. Voilà les modifications opérées:
|
||||
now_out_of_stock: est maintenant en rupture de stock.
|
||||
only_n_remainging: "plus que %{num} en stock."
|
||||
variants:
|
||||
on_demand:
|
||||
'yes': "A volonté"
|
||||
variant_overrides:
|
||||
on_demand:
|
||||
'yes': "Oui"
|
||||
'no': "Non"
|
||||
inventory_products: "Produits du Catalogue Boutique"
|
||||
hidden_products: "Produits Masqués"
|
||||
new_products: "Nouveaux Produits"
|
||||
@@ -2465,10 +2476,10 @@ fr_BE:
|
||||
changing_on_hand_stock: Modification des niveaux de stock en cours...
|
||||
stock_reset: Les niveaux de stock ont été réinitiatlisés (valeurs par défaut)
|
||||
tag_rules:
|
||||
show_hide_variants: 'Afficher ou Masquer les variantes dans ma boutique'
|
||||
show_hide_variants: 'Afficher ou Masquer les variantes dans mon comptoir'
|
||||
show_hide_shipping: 'Afficher ou Montrer les méthodes de livraison lors de la finalisation de commande'
|
||||
show_hide_payment: 'Afficher ou Montrer les méthodes de paiement lors de la finalisation de commande'
|
||||
show_hide_order_cycles: 'Afficher ou Masquer les cycles de vente de ma boutique'
|
||||
show_hide_order_cycles: 'Afficher ou Masquer les cycles de vente de mon comptoir'
|
||||
visible: VISIBLE
|
||||
not_visible: INVISIBLE
|
||||
services:
|
||||
@@ -2494,7 +2505,7 @@ fr_BE:
|
||||
producer: "Producteur"
|
||||
non_producer: "Non-producteur"
|
||||
customers:
|
||||
select_shop: 'Veuillez d''abord choisir une boutique'
|
||||
select_shop: 'Veuillez d''abord choisir un comptoir'
|
||||
could_not_create: Oups ! Création impossible...
|
||||
subscriptions:
|
||||
closes: fermer
|
||||
@@ -2745,7 +2756,7 @@ fr_BE:
|
||||
until: Jusqu'à
|
||||
past_orders:
|
||||
order: Commandes à venir
|
||||
shop: Boutique
|
||||
shop: Comptoir
|
||||
completed_at: Date
|
||||
items: Produits
|
||||
total: Total
|
||||
@@ -2759,7 +2770,7 @@ fr_BE:
|
||||
authorised_shops_popover: Voilà la liste des comptoirs que vous avez autorisées à débiter votre carte de paiement par défaut dans le cadre de vos abonnements en cours (commandes récurrentes). Les informations concernant votre carte de paiement sont sécurisées et ne sont pas accessibles par le gérant de la boutique. Vous recevrez systématiquement une notification avant tout débit sur votre carte.
|
||||
saved_cards_popover: Voilà la liste des cartes de paiement que vous avez enregistrées. Votre carte par défaut sera automatiquement sélectionnée au moment de la finalisation d'une commande, et pourra être débitée par les comptoirs auxquels vous avez donné cette autorisation (voir à droite).
|
||||
authorised_shops:
|
||||
shop_name: "Nom de la boutique"
|
||||
shop_name: "Nom du comptoir"
|
||||
allow_charges?: "Autoriser les prélèvements ?"
|
||||
localized_number:
|
||||
invalid_format: n'est pas un format valide. Veuillez entrer un nombre.
|
||||
|
||||
@@ -702,6 +702,7 @@ fr_CA:
|
||||
close_date: Date de fermeture
|
||||
social:
|
||||
twitter_placeholder: ex. @OpenFoodNet_fr
|
||||
facebook_placeholder: 'ex: www.facebook.com/NomDeLaPage'
|
||||
stripe_connect:
|
||||
connect_with_stripe: "Connecter avec Stripe"
|
||||
stripe_connect_intro: "Pour accepter des paiements utilisant la carte bancaire, vous devez connecter votre compte Stripe à Open Food Network. Cliquez sur le bouton à droite pour commencer."
|
||||
@@ -1689,6 +1690,11 @@ fr_CA:
|
||||
update_and_recalculate_fees: "Mettre à jour et recalculer les frais"
|
||||
registration:
|
||||
steps:
|
||||
images:
|
||||
continue: "Suivant"
|
||||
back: "Retour"
|
||||
headline: "Merci!"
|
||||
description: "Ajoutez maintenant de jolies photos pour que votre profil soit attractif! :)"
|
||||
type:
|
||||
headline: "Dernière étape pour ajouter %{enterprise} !"
|
||||
question: "Etes-vous un producteur?"
|
||||
@@ -1823,8 +1829,6 @@ fr_CA:
|
||||
registration_type_error: "Veuillez faire un choix. Etes vous un producteur?"
|
||||
registration_type_producer_help: "Un producteur fabrique de bonnes choses à boire et à manger. Vous êtes un producteur si vous les faites pousser, les élevez, les pétrissez, transformez, fermentez, les réduisez en grains, etc."
|
||||
registration_type_no_producer_help: "Si vous n'êtes pas un producteur, vous êtes probablement un revendeur ou distributeur alimentaire: un \"hub\", une coopérative, un groupement d'achat, un revendeur, un grossiste, ou autre."
|
||||
registration_images_headline: "Merci!"
|
||||
registration_images_description: "Ajoutez maintenant de jolies photos pour que votre profil soit attractif! :)"
|
||||
registration_detail_headline: "Commençons"
|
||||
registration_detail_enterprise: "Woohoo! Dites-nous déjà quelques mots à propos de votre entreprise:"
|
||||
registration_detail_producer: "Woohoo! Dites-nous déjà quelques mots à propos de votre ferme:"
|
||||
@@ -2429,7 +2433,13 @@ fr_CA:
|
||||
à votre demande. Voilà les modifications opérées:
|
||||
now_out_of_stock: est maintenant en rupture de stock.
|
||||
only_n_remainging: "plus que %{num} en stock."
|
||||
variants:
|
||||
on_demand:
|
||||
'yes': "A volonté"
|
||||
variant_overrides:
|
||||
on_demand:
|
||||
'yes': "Oui"
|
||||
'no': "Non"
|
||||
inventory_products: "Produits du Catalogue Boutique"
|
||||
hidden_products: "Produits Masqués"
|
||||
new_products: "Nouveaux Produits"
|
||||
|
||||
@@ -577,6 +577,8 @@ it:
|
||||
shopfront_category_ordering: Categorie disponibili in Vetrina
|
||||
open_date: Data apertura
|
||||
close_date: Data chiusura
|
||||
social:
|
||||
facebook_placeholder: p.es. www.facebook.com/PageNameHere
|
||||
stripe_connect:
|
||||
confirm_modal:
|
||||
cancel: Annulla
|
||||
@@ -1373,6 +1375,11 @@ it:
|
||||
update_and_recalculate_fees: "Aggiorna e ricalcola tariffe"
|
||||
registration:
|
||||
steps:
|
||||
images:
|
||||
continue: "Continua"
|
||||
back: "Indietro"
|
||||
headline: "Grazie!"
|
||||
description: "Carichiamo qualche immagine per rendere più bello il tuo profilo! :)"
|
||||
type:
|
||||
headline: "Ultimo passo per aggiungere %{enterprise}!"
|
||||
question: "Sei un produttore?"
|
||||
@@ -1498,8 +1505,6 @@ it:
|
||||
registration_type_error: "Per favore scegline uno. Sei un produttore?"
|
||||
registration_type_producer_help: "I produttori fanno cose buone da mangiare e/o bere. Sei un produttore se le coltivi, le allevi, le infondi, le cucini, le fai fermentare, le mungi o le modelli."
|
||||
registration_type_no_producer_help: "Se non sei un produttore, probabilmente sei qualcuno che vende e distribuisce cibo. potresti essere un hub, una cooperativa, un gruppo d'acquisto, un rivenditore al dettaglio o all'ingrosso, o altro."
|
||||
registration_images_headline: "Grazie!"
|
||||
registration_images_description: "Carichiamo qualche immagine per rendere più bello il tuo profilo! :)"
|
||||
registration_detail_headline: "Cominciamo"
|
||||
registration_detail_enterprise: "Wow! Prima abbiamo bisogno di saperne un po' di più della tua impresa:"
|
||||
registration_detail_producer: "Wow! Prima abbiamo bisogno di saperne un po' di più della tua azienda agricola:"
|
||||
@@ -1966,7 +1971,13 @@ it:
|
||||
nel tuo carrello sono diminuite. Ecco cosa è cambiato:
|
||||
now_out_of_stock: non è al momento disponibile
|
||||
only_n_remainging: "attualmente solo %{num} rimasto."
|
||||
variants:
|
||||
on_demand:
|
||||
'yes': "A richiesta"
|
||||
variant_overrides:
|
||||
on_demand:
|
||||
'yes': "Sì"
|
||||
'no': "No"
|
||||
inventory_products: "Inventario Prodotti"
|
||||
hidden_products: "Prodotti Nascosti"
|
||||
new_products: "Nuovi Prodotti"
|
||||
|
||||
@@ -24,6 +24,11 @@ nb:
|
||||
attributes:
|
||||
orders_close_at:
|
||||
after_orders_open_at: må være etter åpningsdato
|
||||
variant_override:
|
||||
count_on_hand:
|
||||
using_producer_stock_settings_but_count_on_hand_set: "må være tomt fordi du bruker produsentens lagerinnstillinger"
|
||||
on_demand_but_count_on_hand_set: "må være tom hvis på forespørsel"
|
||||
limited_stock_but_no_count_on_hand: "må spesifiseres fordi det tvinger begrenset lager"
|
||||
activemodel:
|
||||
errors:
|
||||
models:
|
||||
@@ -715,6 +720,9 @@ nb:
|
||||
close_date: Stengedato
|
||||
social:
|
||||
twitter_placeholder: f.eks. @the_prof
|
||||
instagram_placeholder: f.eks. the_prof
|
||||
facebook_placeholder: f.eks. www.facebook.com/FirmaNavnHer
|
||||
linkedin_placeholder: f.eks. www.linkedin.com/in/YourNameHere
|
||||
stripe_connect:
|
||||
connect_with_stripe: "Koble til Stripe"
|
||||
stripe_connect_intro: "For å akseptere betaling med kredittkort må du koble din Stripe konto til Open Food Network. Bruk knappen til høyre for å komme i gang."
|
||||
@@ -1264,7 +1272,7 @@ nb:
|
||||
cookie_stripe_desc: "Data samlet inn av betalingsprosessoren vår Stripe for svindeloppdagelse https://stripe.com/cookies-policy/legal. Ikke alle butikker bruker Stripe som betalingsmetode, men det er en god praksis å forhindre at svindel gjelder for alle sider. Stripe bygger sannsynligvis et bilde av hvilke av våre sider som til vanlig samhandler med API-en og deretter flagge alt uvanlig. Så å sette Stripe-cookien har en bredere funksjon enn bare å levere en betalingsmetode til en bruker. Fjerning av det kan påvirke sikkerheten til selve tjenesten. Du kan lære mer om Stripe og lese retningslinjene for personvern på https://stripe.com/privacy."
|
||||
statistics_cookies: "Statistikkkapsler"
|
||||
statistics_cookies_desc: "Følgende er ikke strengt nødvendige, men hjelper deg med å gi deg den beste brukeropplevelsen ved å tillate oss å analysere brukeradferd, identifisere hvilke funksjoner du bruker mest, eller ikke bruker, forstå brukeropplevelsesproblemer osv."
|
||||
statistics_cookies_analytics_desc_html: "For å samle og analysere plattformbruksdata bruker vi Google Analytics, da det var standardtjenesten som var koblet til Spree (ehandel open source programvare som vi bygde på), men visjonen vår er å bytte til <a href = 'https: / /matomo.org/ 'target =' _ blank '> Matomo </a> (ex Piwik, open source analyseverktøy som er GDPR-kompatibelt og beskytter ditt privatliv) så snart vi kan."
|
||||
statistics_cookies_analytics_desc_html: "For å samle og analysere plattformbruksdata bruker vi Google Analytics, da det var standardtjenesten som var koblet til Spree (ehandel open source programvare som vi bygde på), men visjonen vår er å bytte til <a href='https://matomo.org/' target='_blank'>Matomo</a> (ex Piwik, open source analyseverktøy som er GDPR-kompatibelt og beskytter ditt privatliv) så snart vi kan."
|
||||
statistics_cookies_matomo_desc_html: "For å samle og analysere plattformbruksdata bruker vi <a href='https://matomo.org/' target='_blank'> Matomo </a> (ex Piwik), et åpen kildekodeanalyseverktøy som er kompatibelt med GDPR og beskytter personvernet ditt."
|
||||
statistics_cookies_matomo_optout: "Ønsker du å melde deg av Matomo analytics? Vi samler ikke inn personlige data, og Matomo hjelper oss med å forbedre vår tjeneste, men vi respekterer ditt valg :-)"
|
||||
cookie_analytics_utma_desc: "Brukes til å skille mellom brukere og økter. Kapselen er opprettet når javascriptbiblioteket utføres, og ingen eksisterende __utma-informasjonskapsler eksisterer. Cookien oppdateres hver gang data sendes til Google Analytics."
|
||||
@@ -1705,6 +1713,11 @@ nb:
|
||||
update_and_recalculate_fees: "Oppdater og regn avgifter på nytt"
|
||||
registration:
|
||||
steps:
|
||||
images:
|
||||
continue: "Fortsett"
|
||||
back: "Tilbake"
|
||||
headline: "Takk!"
|
||||
description: "La oss laste opp noen fine bilder så profilen din ser flott ut! :)"
|
||||
type:
|
||||
headline: "Siste skritt for å legge til %{enterprise}!"
|
||||
question: "Er du en produsent?"
|
||||
@@ -1839,8 +1852,6 @@ nb:
|
||||
registration_type_error: "Vennligst velg en. Er du produsent?"
|
||||
registration_type_producer_help: "Produsenter lager deilige ting å spise og/eller drikke. Du er en produsent hvis du dyrker det, driver med det, brygger det, baker det, fermenterer det, melker det eller former det."
|
||||
registration_type_no_producer_help: "Hvis du ikke er en produsent, er du sannsynligvis noen som selger og distribuerer mat. Du kan være en hub, samvirke, kjøpegruppe, forhandler, grossist eller annet."
|
||||
registration_images_headline: "Takk!"
|
||||
registration_images_description: "La oss laste opp noen fine bilder så profilen din ser flott ut! :)"
|
||||
registration_detail_headline: "La oss komme i gang"
|
||||
registration_detail_enterprise: "Kult! Først må vi vite litt om bedriften:"
|
||||
registration_detail_producer: "Kult! Først må vi vite litt om gården din:"
|
||||
@@ -2438,7 +2449,14 @@ nb:
|
||||
i din handlekurv gått ned. Her er hva som er endret.
|
||||
now_out_of_stock: er nå ikke på lager.
|
||||
only_n_remainging: "har nå kun %{num} igjen."
|
||||
variants:
|
||||
on_demand:
|
||||
'yes': "Ved forespørsel"
|
||||
variant_overrides:
|
||||
on_demand:
|
||||
use_producer_settings: "Bruk produsentens lagerinnstillinger"
|
||||
'yes': "Ja"
|
||||
'no': "Nei"
|
||||
inventory_products: "Produkter i Varelager"
|
||||
hidden_products: "Skjulte Produkter"
|
||||
new_products: "Nye Produkter"
|
||||
@@ -2541,6 +2559,12 @@ nb:
|
||||
other: "Du har %{count} aktive bestillingssykluser."
|
||||
manage_order_cycles: "BEHANDLE BESTILLINGSRUNDER"
|
||||
payment_methods:
|
||||
new:
|
||||
new_payment_method: "Ny Betalingsmetode"
|
||||
back_to_payment_methods_list: "Tilbake til listen over betalingsmetoder"
|
||||
edit:
|
||||
editing_payment_method: "Redigerer betalingsmetode"
|
||||
back_to_payment_methods_list: "Tilbake til listen over betalingsmetoder"
|
||||
stripe_connect:
|
||||
enterprise_select_placeholder: Velg...
|
||||
loading_account_information_msg: Laster inn kontoinformasjon fra Stripe, vennligst vent ...
|
||||
|
||||
@@ -73,7 +73,7 @@ pt:
|
||||
order_mailer:
|
||||
cancel_email:
|
||||
dear_customer: "Caro Consumidor,"
|
||||
instructions: "A sua encomenda foi cancelada. Por favor guarde está informação para seu registo."
|
||||
instructions: "A sua encomenda foi cancelada. Por favor guarde esta informação para seu registo."
|
||||
order_summary_canceled: "Sumário de Encomenda [CANCELADA]"
|
||||
subject: "Cancelamento de Encomenda"
|
||||
subtotal: "Subtotal: %{subtotal}"
|
||||
@@ -692,6 +692,7 @@ pt:
|
||||
close_date: Data de fecho
|
||||
social:
|
||||
twitter_placeholder: 'ex: @o_prof'
|
||||
facebook_placeholder: ex. www.facebook.com/asuapagina
|
||||
stripe_connect:
|
||||
connect_with_stripe: "Conectar com o Stripe"
|
||||
stripe_connect_intro: "Para aceitar pagamentos com cartão de crédito, vai ser necessário ligar a sua conta Stripe à Open Food Network. Use o botão à direita para começar."
|
||||
@@ -1607,6 +1608,11 @@ pt:
|
||||
update_and_recalculate_fees: "Actualizar e Recalcular Taxas"
|
||||
registration:
|
||||
steps:
|
||||
images:
|
||||
continue: "Continuar"
|
||||
back: "Voltar"
|
||||
headline: "Obrigado!"
|
||||
description: "Vamos adicionar umas boas imagens para o seu perfil ficar impecável!"
|
||||
type:
|
||||
headline: "Último passo para adicionar %{enterprise}!"
|
||||
question: "É produtor/a?"
|
||||
@@ -1740,8 +1746,6 @@ pt:
|
||||
registration_type_error: "Por favor escolha uma opção. É produtor/a?"
|
||||
registration_type_producer_help: "Produtores/as são quem faz coisas deliciosas para comer e/ou beber. É produtor/a se planta, cria, fermenta, amassa, munge ou molda algo."
|
||||
registration_type_no_producer_help: "Se não é produtor/a, é provavelmente alguém que vende e distribui alimentos. Pode ser uma cooperativa, um grupo de consumo, um distribuidor, um retalhista, ou outro."
|
||||
registration_images_headline: "Obrigado!"
|
||||
registration_images_description: "Vamos adicionar umas boas imagens para o seu perfil ficar impecável!"
|
||||
registration_detail_headline: "Vamos Começar"
|
||||
registration_detail_enterprise: "Primeiro precisamos saber mais sobre a sua organização:"
|
||||
registration_detail_producer: "Primeiro precisamos saber mais sobre sua produção:"
|
||||
@@ -2334,7 +2338,13 @@ pt:
|
||||
carrinho baixou. Aqui está o que mudou:
|
||||
now_out_of_stock: está agora sem stock.
|
||||
only_n_remainging: "agora só tem %{num}restantes."
|
||||
variants:
|
||||
on_demand:
|
||||
'yes': "Sob encomenda"
|
||||
variant_overrides:
|
||||
on_demand:
|
||||
'yes': "Sim"
|
||||
'no': "Não"
|
||||
inventory_products: "Produtos de Inventário"
|
||||
hidden_products: "Produtos Escondidos"
|
||||
new_products: "Novos Produtos"
|
||||
|
||||
@@ -441,6 +441,7 @@ sv:
|
||||
close_date: Stängningsdatum
|
||||
social:
|
||||
twitter_placeholder: t.ex. @the_prof
|
||||
facebook_placeholder: eg. www.facebook.com/PageNameHere
|
||||
tag_rules:
|
||||
default_rules:
|
||||
by_default: Som standard
|
||||
@@ -1172,6 +1173,11 @@ sv:
|
||||
who_is_managing_enterprise: "Vem är ansvarig hos %{enterprise}?"
|
||||
registration:
|
||||
steps:
|
||||
images:
|
||||
continue: "Fortsätt"
|
||||
back: "Backa"
|
||||
headline: "Tack!"
|
||||
description: "Låt oss ladda några säljande bilder så att din profil ser lockande ut! :)"
|
||||
type:
|
||||
headline: "Sista steget för att lägga till %{enterprise}!"
|
||||
question: "Är du en producent?"
|
||||
@@ -1257,8 +1263,6 @@ sv:
|
||||
registration_type_error: "Var vänlig välj en. Är du en producent?"
|
||||
registration_type_producer_help: "Producenter gör smakfulla rätter att äta och/eller dricka. Du är en producent om du odlar det, föder upp det, brygger det, bakar det behandlar det, förädlar det eller formar det."
|
||||
registration_type_no_producer_help: "Om du inte ät en producent är du antagligen någon som säljer och distribuerar mat. Du borde bli ett matställe, kooperation, inköpsgrupp, detaljhandlare,grossist eller annat. "
|
||||
registration_images_headline: "Tack!"
|
||||
registration_images_description: "Låt oss ladda några säljande bilder så att din profil ser lockande ut! :)"
|
||||
registration_detail_headline: "Låt oss börja"
|
||||
registration_detail_enterprise: "Hej! Först bejöver vi veta lite om ditt företag:"
|
||||
registration_detail_producer: "Hej! Först behöver vi veta lite om din gård:"
|
||||
@@ -1814,7 +1818,13 @@ sv:
|
||||
kundvagn minskat. Detta har ändrats:
|
||||
now_out_of_stock: Är nu slut
|
||||
only_n_remainging: "nu återstår endast %{num}"
|
||||
variants:
|
||||
on_demand:
|
||||
'yes': "På begäran "
|
||||
variant_overrides:
|
||||
on_demand:
|
||||
'yes': "Ja"
|
||||
'no': "Nej"
|
||||
inventory_products: "Lagerstatus produkter"
|
||||
hidden_products: "Dolda produkter"
|
||||
new_products: "Nya produkter"
|
||||
|
||||
@@ -41,7 +41,7 @@ module OpenFoodNetwork
|
||||
end
|
||||
|
||||
def adjustment_tax(adjustment)
|
||||
tax_rates = adjustment.tax_rates
|
||||
tax_rates = TaxRateFinder.tax_rates_of(adjustment)
|
||||
|
||||
tax_rates.select(&:included_in_price).sum do |rate|
|
||||
rate.compute_tax adjustment.amount
|
||||
|
||||
@@ -40,8 +40,8 @@ xfeature %q{
|
||||
scenario "customers report" do
|
||||
click_link "Mailing List"
|
||||
expect(page).to have_select('report_type', selected: 'Mailing List')
|
||||
expect(page).to have_content "click on SEARCH"
|
||||
click_button "Search"
|
||||
expect(page).to have_content "click on GO"
|
||||
click_button "Go"
|
||||
|
||||
rows = find("table#listing_customers").all("thead tr")
|
||||
table = rows.map { |r| r.all("th").map { |c| c.text.strip } }
|
||||
@@ -54,7 +54,7 @@ xfeature %q{
|
||||
click_link "Addresses"
|
||||
expect(page).to have_select('report_type', selected: 'Addresses')
|
||||
|
||||
click_button "Search"
|
||||
click_button "Go"
|
||||
rows = find("table#listing_customers").all("thead tr")
|
||||
table = rows.map { |r| r.all("th").map { |c| c.text.strip } }
|
||||
expect(table.sort).to eq([
|
||||
@@ -324,7 +324,7 @@ xfeature %q{
|
||||
expect(page).to have_content "All products"
|
||||
expect(page).to have_content "Inventory (on hand)"
|
||||
click_link 'Products & Inventory'
|
||||
click_button "Search"
|
||||
click_button "Go"
|
||||
expect(page).to have_content "Supplier"
|
||||
expect(page).to have_table_row ["Supplier", "Producer Suburb", "Product", "Product Properties", "Taxons", "Variant Value", "Price", "Group Buy Unit Quantity", "Amount", "SKU"].map(&:upcase)
|
||||
expect(page).to have_table_row [product1.supplier.name, product1.supplier.address.city, "Product Name", product1.properties.map(&:presentation).join(", "), product1.primary_taxon.name, "Test", "100.0", product1.group_buy_unit_size.to_s, "", "sku1"]
|
||||
@@ -336,7 +336,7 @@ xfeature %q{
|
||||
quick_login_as_admin
|
||||
visit spree.admin_reports_path
|
||||
click_link 'LettuceShare'
|
||||
click_button "Search"
|
||||
click_button "Go"
|
||||
|
||||
expect(page).to have_table_row ['PRODUCT', 'Description', 'Qty', 'Pack Size', 'Unit', 'Unit Price', 'Total', 'GST incl.', 'Grower and growing method', 'Taxon'].map(&:upcase)
|
||||
expect(page).to have_table_row ['Product 2', '100g', '', '100', 'g', '99.0', '', '0', 'Supplier Name (Organic - NASAA 12345)', 'Taxon Name']
|
||||
|
||||
@@ -10,10 +10,10 @@ feature "full-page cart", js: true do
|
||||
let!(:zone) { create(:zone_with_member) }
|
||||
let(:distributor) { create(:distributor_enterprise, with_payment_and_shipping: true, charges_sales_tax: true) }
|
||||
let(:supplier) { create(:supplier_enterprise) }
|
||||
let!(:order_cycle) { create(:simple_order_cycle, suppliers: [supplier], distributors: [distributor], coordinator: create(:distributor_enterprise), variants: [product_tax.variants.first, product_fee.variants.first]) }
|
||||
let(:enterprise_fee) { create(:enterprise_fee, amount: 11.00, tax_category: product_tax.tax_category) }
|
||||
let(:product_tax) { create(:taxed_product, supplier: supplier, zone: zone, price: 110.00, tax_rate_amount: 0.1) }
|
||||
let(:product_fee) { create(:simple_product, supplier: supplier, price: 0.86, on_hand: 100) }
|
||||
let!(:order_cycle) { create(:simple_order_cycle, suppliers: [supplier], distributors: [distributor], coordinator: create(:distributor_enterprise), variants: [product_with_tax.variants.first, product_with_fee.variants.first]) }
|
||||
let(:enterprise_fee) { create(:enterprise_fee, amount: 11.00, tax_category: product_with_tax.tax_category) }
|
||||
let(:product_with_tax) { create(:taxed_product, supplier: supplier, zone: zone, price: 110.00, tax_rate_amount: 0.1) }
|
||||
let(:product_with_fee) { create(:simple_product, supplier: supplier, price: 0.86, on_hand: 100) }
|
||||
let(:order) { create(:order, order_cycle: order_cycle, distributor: distributor) }
|
||||
|
||||
before do
|
||||
@@ -22,7 +22,7 @@ feature "full-page cart", js: true do
|
||||
|
||||
describe "product description" do
|
||||
it "does not link to the product page" do
|
||||
add_product_to_cart order, product_fee, quantity: 2
|
||||
add_product_to_cart order, product_with_fee, quantity: 2
|
||||
visit spree.cart_path
|
||||
expect(page).to have_no_selector '.item-thumb-image a'
|
||||
end
|
||||
@@ -33,7 +33,7 @@ feature "full-page cart", js: true do
|
||||
|
||||
before do
|
||||
add_enterprise_fee percentage_fee
|
||||
add_product_to_cart order, product_fee, quantity: 8
|
||||
add_product_to_cart order, product_with_fee, quantity: 8
|
||||
visit spree.cart_path
|
||||
end
|
||||
|
||||
@@ -48,17 +48,17 @@ feature "full-page cart", js: true do
|
||||
end
|
||||
|
||||
describe "admin and handling flat fees" do
|
||||
context 'when there are fees' do
|
||||
context "when there are fees" do
|
||||
let(:handling_fee) { create(:enterprise_fee, calculator: Spree::Calculator::FlatRate.new(preferred_amount: 1),
|
||||
enterprise: order_cycle.coordinator, fee_type: 'admin') }
|
||||
|
||||
before do
|
||||
add_enterprise_fee handling_fee
|
||||
add_product_to_cart order, product_fee, quantity: 3
|
||||
add_product_to_cart order, product_with_fee, quantity: 3
|
||||
visit spree.cart_path
|
||||
end
|
||||
|
||||
it 'shows admin and handlings row' do
|
||||
it "shows admin and handlings row" do
|
||||
expect(page).to have_selector('#cart-detail')
|
||||
expect(page).to have_content('Admin & Handling')
|
||||
expect(page).to have_selector '.cart-item-price', text: with_currency(0.86)
|
||||
@@ -68,13 +68,13 @@ feature "full-page cart", js: true do
|
||||
end
|
||||
end
|
||||
|
||||
context 'when there are no admin and handling fees' do
|
||||
context "when there are no admin and handling fees" do
|
||||
before do
|
||||
add_product_to_cart order, product_fee, quantity: 2
|
||||
add_product_to_cart order, product_with_fee, quantity: 2
|
||||
visit spree.cart_path
|
||||
end
|
||||
|
||||
it 'hides admin and handlings row' do
|
||||
it "hides admin and handlings row" do
|
||||
expect(page).to have_selector('#cart-detail')
|
||||
expect(page).to have_no_content('Admin & Handling')
|
||||
expect(page).to have_selector '.cart-item-price', text: with_currency(0.86)
|
||||
@@ -83,10 +83,37 @@ feature "full-page cart", js: true do
|
||||
end
|
||||
end
|
||||
|
||||
describe "admin weight calculated fees" do
|
||||
context "order with 2 line items" do
|
||||
let(:admin_fee) { create(:enterprise_fee, calculator: Calculator::Weight.new(preferred_per_kg: 1),
|
||||
enterprise: order_cycle.coordinator, fee_type: 'admin') }
|
||||
|
||||
before do
|
||||
product_with_fee.variants.first.update_attributes(unit_value: '2000.0')
|
||||
product_with_tax.variants.first.update_attributes(unit_value: '5000.0')
|
||||
|
||||
add_enterprise_fee admin_fee
|
||||
|
||||
cart_service = CartService.new(order)
|
||||
cart_service.populate(variants: { product_with_fee.variants.first.id => 3, product_with_tax.variants.first.id => 3 })
|
||||
order.update_distribution_charge!
|
||||
|
||||
visit spree.cart_path
|
||||
end
|
||||
|
||||
it "shows the correct weight calculations" do
|
||||
expect(page).to have_selector('#cart-detail')
|
||||
expect(page).to have_selector '.cart-item-price', text: with_currency(2.86) # price + (1eur * 2kg)
|
||||
expect(page).to have_selector '.cart-item-price', text: with_currency(115.0) # price + (1eur * 5kg)
|
||||
expect(page).to have_selector '.order-total.grand-total', text: with_currency(353.58) # above * 3 items
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "tax" do
|
||||
before do
|
||||
add_enterprise_fee enterprise_fee
|
||||
add_product_to_cart order, product_tax
|
||||
add_product_to_cart order, product_with_tax
|
||||
visit spree.cart_path
|
||||
end
|
||||
|
||||
@@ -97,10 +124,10 @@ feature "full-page cart", js: true do
|
||||
|
||||
describe "updating quantities with insufficient stock available" do
|
||||
let(:li) { order.line_items(true).last }
|
||||
let(:variant) { product_tax.variants.first }
|
||||
let(:variant) { product_with_tax.variants.first }
|
||||
|
||||
before do
|
||||
add_product_to_cart order, product_tax
|
||||
add_product_to_cart order, product_with_tax
|
||||
end
|
||||
|
||||
it "prevents me from entering an invalid value" do
|
||||
@@ -140,7 +167,7 @@ feature "full-page cart", js: true do
|
||||
order.save
|
||||
order.distributor.allow_order_changes = true
|
||||
order.distributor.save
|
||||
add_product_to_cart order, product_tax
|
||||
add_product_to_cart order, product_with_tax
|
||||
quick_login_as user
|
||||
visit spree.cart_path
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
require 'spec_helper'
|
||||
require 'open_food_network/enterprise_fee_calculator'
|
||||
|
||||
module OpenFoodNetwork
|
||||
|
||||
@@ -2,13 +2,13 @@ require 'spec_helper'
|
||||
|
||||
describe Calculator::Weight do
|
||||
it "computes shipping cost for an order by total weight" do
|
||||
variant1 = double(:variant, weight: 10)
|
||||
variant2 = double(:variant, weight: 20)
|
||||
variant3 = double(:variant, weight: nil)
|
||||
variant1 = build(:variant, weight: 10)
|
||||
variant2 = build(:variant, weight: 20)
|
||||
variant3 = build(:variant, weight: nil)
|
||||
|
||||
line_item1 = double(:line_item, variant: variant1, quantity: 1)
|
||||
line_item2 = double(:line_item, variant: variant2, quantity: 3)
|
||||
line_item3 = double(:line_item, variant: variant3, quantity: 5)
|
||||
line_item1 = build(:line_item, variant: variant1, quantity: 1)
|
||||
line_item2 = build(:line_item, variant: variant2, quantity: 3)
|
||||
line_item3 = build(:line_item, variant: variant3, quantity: 5)
|
||||
|
||||
order = double(:order, line_items: [line_item1, line_item2, line_item3])
|
||||
|
||||
@@ -17,20 +17,20 @@ describe Calculator::Weight do
|
||||
end
|
||||
|
||||
it "computes shipping cost for a line item" do
|
||||
variant = double(:variant, weight: 10)
|
||||
variant = build(:variant, weight: 10)
|
||||
|
||||
line_item = double(:line_item, variant: variant, quantity: 2)
|
||||
line_item = build(:line_item, variant: variant, quantity: 2)
|
||||
|
||||
subject.set_preference(:per_kg, 10)
|
||||
expect(subject.compute(line_item)).to eq(10 * 2 * 10)
|
||||
end
|
||||
|
||||
it "computes shipping cost for an object with an order" do
|
||||
variant1 = double(:variant, weight: 10)
|
||||
variant2 = double(:variant, weight: 5)
|
||||
variant1 = build(:variant, weight: 10)
|
||||
variant2 = build(:variant, weight: 5)
|
||||
|
||||
line_item1 = double(:line_item, variant: variant1, quantity: 1)
|
||||
line_item2 = double(:line_item, variant: variant2, quantity: 2)
|
||||
line_item1 = build(:line_item, variant: variant1, quantity: 1)
|
||||
line_item2 = build(:line_item, variant: variant2, quantity: 2)
|
||||
|
||||
order = double(:order, line_items: [line_item1, line_item2])
|
||||
object_with_order = double(:object_with_order, order: order)
|
||||
|
||||
@@ -281,21 +281,6 @@ module Spree
|
||||
adjustment.included_tax.should == 10.00
|
||||
end
|
||||
end
|
||||
|
||||
describe "getting the corresponding tax rate" do
|
||||
let!(:adjustment_with_tax) { create(:adjustment, amount: 50, included_tax: 10) }
|
||||
let!(:adjustment_without_tax) { create(:adjustment, amount: 50, included_tax: 0) }
|
||||
let!(:tax_rate) { create(:tax_rate, calculator: Spree::Calculator::DefaultTax.new, amount: 0.25) }
|
||||
let!(:other_tax_rate) { create(:tax_rate, calculator: Spree::Calculator::DefaultTax.new, amount: 0.3) }
|
||||
|
||||
it "returns [] if there is no included tax" do
|
||||
adjustment_without_tax.find_closest_tax_rates_from_included_tax.should == []
|
||||
end
|
||||
|
||||
it "returns the most accurate tax rate" do
|
||||
adjustment_with_tax.find_closest_tax_rates_from_included_tax.should == [tax_rate]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "extends LocalizedNumber" do
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
describe Spree::Calculator::FlatPercentItemTotal do
|
||||
let(:calculator) { Spree::Calculator::FlatPercentItemTotal.new }
|
||||
let(:line_item) { instance_double(Spree::LineItem, amount: 10) }
|
||||
let(:line_item) { build(:line_item, price: 10, quantity: 1) }
|
||||
|
||||
before { calculator.stub preferred_flat_percent: 10 }
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Spree::Calculator::FlexiRate do
|
||||
let(:line_item) { instance_double(Spree::LineItem, amount: 10, quantity: quantity) }
|
||||
let(:line_item) { build(:line_item, quantity: quantity) }
|
||||
let(:calculator) do
|
||||
Spree::Calculator::FlexiRate.new(
|
||||
preferred_first_item: 2,
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'spec_helper'
|
||||
describe Spree::Calculator::PerItem do
|
||||
let(:calculator) { Spree::Calculator::PerItem.new(preferred_amount: 10) }
|
||||
let(:shipping_calculable) { double(:calculable) }
|
||||
let(:line_item) { double(:line_item, quantity: 5, product: double(:product)) }
|
||||
let(:line_item) { build(:line_item, quantity: 5) }
|
||||
|
||||
it "correctly calculates on a single line item object" do
|
||||
calculator.stub(calculable: shipping_calculable)
|
||||
|
||||
74
spec/services/tax_rate_finder_spec.rb
Normal file
74
spec/services/tax_rate_finder_spec.rb
Normal file
@@ -0,0 +1,74 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe TaxRateFinder do
|
||||
describe "getting the corresponding tax rate" do
|
||||
let(:amount) { BigDecimal(120) }
|
||||
let(:included_tax) { BigDecimal(20) }
|
||||
let(:tax_rate) { create_rate(0.2) }
|
||||
let(:tax_category) { create(:tax_category, tax_rates: [tax_rate]) }
|
||||
# This zone is used by :order_with_taxes and needs to match it
|
||||
let(:zone) { create(:zone, name: "GlobalZone") }
|
||||
let(:shipment) { create(:shipment) }
|
||||
let(:enterprise_fee) { create(:enterprise_fee, tax_category: tax_category) }
|
||||
let(:order) { create(:order_with_taxes) }
|
||||
|
||||
it "finds the tax rate of a shipping fee" do
|
||||
rates = TaxRateFinder.new.tax_rates(
|
||||
tax_rate,
|
||||
shipment,
|
||||
amount,
|
||||
included_tax
|
||||
)
|
||||
expect(rates).to eq [tax_rate]
|
||||
end
|
||||
|
||||
it "finds a close match" do
|
||||
tax_rate.destroy
|
||||
close_tax_rate = create_rate(tax_rate.amount + 0.05)
|
||||
# other tax rates, not as close to the real one
|
||||
create_rate(tax_rate.amount + 0.06)
|
||||
create_rate(tax_rate.amount - 0.06)
|
||||
|
||||
rates = TaxRateFinder.new.tax_rates(
|
||||
nil,
|
||||
shipment,
|
||||
amount,
|
||||
included_tax
|
||||
)
|
||||
|
||||
expect(rates).to eq [close_tax_rate]
|
||||
end
|
||||
|
||||
it "finds the tax rate of an enterprise fee" do
|
||||
rates = TaxRateFinder.new.tax_rates(
|
||||
enterprise_fee,
|
||||
order,
|
||||
amount,
|
||||
included_tax
|
||||
)
|
||||
expect(rates).to eq [tax_rate]
|
||||
end
|
||||
|
||||
# There is a bug that leaves orphan adjustments on an order after
|
||||
# associated line items have been removed.
|
||||
# https://github.com/openfoodfoundation/openfoodnetwork/issues/3127
|
||||
it "deals with a missing line item" do
|
||||
rates = TaxRateFinder.new.tax_rates(
|
||||
enterprise_fee,
|
||||
nil,
|
||||
amount,
|
||||
included_tax
|
||||
)
|
||||
expect(rates).to eq [tax_rate]
|
||||
end
|
||||
|
||||
def create_rate(amount)
|
||||
create(
|
||||
:tax_rate,
|
||||
amount: amount,
|
||||
calculator: Spree::Calculator::DefaultTax.new,
|
||||
zone: zone
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user