Compare commits

...

68 Commits

Author SHA1 Message Date
Maikel
24fe7e8878 Merge pull request #5280 from openfoodfoundation/transifex
Transifex
2020-04-22 16:08:57 +10:00
Maikel
eb94c5a5bd Merge pull request #5283 from Matt-Yorkley/customer-tags
Fix disappearing tags issue
2020-04-22 16:03:17 +10:00
Matt-Yorkley
4ef61b642e Fix disappearing tags issue 2020-04-22 01:33:38 +02:00
Luis Ramos
23f4faf192 Merge pull request #4841 from luisramos0/kill_rabl
Hide broken product taxons field, remove last rabl template and rabl itself
2020-04-21 18:49:12 +01:00
Transifex-Openfoodnetwork
becd57f7a4 Updating translations for config/locales/fr.yml 2020-04-21 22:52:47 +10:00
Transifex-Openfoodnetwork
2e4b224d48 Updating translations for config/locales/en_FR.yml 2020-04-21 22:42:53 +10:00
Transifex-Openfoodnetwork
2b210bd096 Updating translations for config/locales/fr.yml 2020-04-21 22:42:34 +10:00
Pau Perez
91306d5ce4 Update all locales with the latest Transifex translations 2020-04-21 10:13:00 +02:00
Pau Pérez Fabregat
e20e19f963 Merge pull request #5244 from coopdevs/include-deleted-variants-and-products
Include deleted products in OC mailer
2020-04-20 20:46:21 +02:00
Luis Ramos
15e56b21ae Merge pull request #5229 from chrishil1/missing_translation
Added missing translations to enterprise_relationship page
2020-04-18 18:15:54 +01:00
Luis Ramos
629db3ae4d Merge pull request #5230 from chrishil1/missing_translation_2
Add product translations to admin order creation
2020-04-18 18:15:01 +01:00
Pau Perez
d8e6d98912 Preload line item's option_values
This fixes an N+1 with the query

```sql
SELECT "spree_option_values".* FROM "spree_option_values"
INNER JOIN "spree_option_types"
  ON "spree_option_types"."id" = "spree_option_values"."option_type_id"
INNER JOIN "spree_option_values_line_items"
  ON "spree_option_values"."id" = "spree_option_values_line_items"."option_value_id"
WHERE "spree_option_values_line_items"."line_item_id" = 1679
ORDER BY spree_option_types.position asc
```
2020-04-17 17:34:53 +02:00
Pau Perez
63eb0980eb Memoize result of line items query
No need to fetch twice what we just loaded from DB.
2020-04-17 17:27:21 +02:00
Pau Perez
06ead827d8 Split long method 2020-04-17 17:27:21 +02:00
Pau Perez
6dd4a866e5 Address some Rubocop violations 2020-04-17 17:25:35 +02:00
Pau Perez
04c962432a Skip deleted default_scope in OC notification
This fixes the RuntimeError we get when accessing deleted variants due
to the variant being nil.

https://github.com/rails/rails/issues/11036 is still an open Rails bug,
as some people mention in https://github.com/rails/rails/pull/21550.

The issue is that `includes` doesn't respect `unscoped`. I found
a potential solution for the entire app in
https://github.com/rails/rails/issues/11036#issuecomment-302133116 but
our friend @markets has a gem,
https://github.com/markets/unscoped_associations, that solves that too.
2020-04-17 17:25:34 +02:00
Luis Ramos
ffceff3f0a Update GETTING_STARTED.md
Update link to osx catalina setup guide in wiki
2020-04-17 11:41:02 +01:00
Maikel Linke
4658a53aeb Update translations from Transifex 2020-04-17 15:37:54 +10:00
Maikel
3bc834435d Merge pull request #5152 from Matt-Yorkley/missing-indexes
Add missing indexes to spree_orders and spree_products
2020-04-17 15:16:03 +10:00
Maikel
9111ff1a38 Merge pull request #5211 from openfoodfoundation/transifex
Transifex
2020-04-17 14:24:26 +10:00
Maikel
b0eac1ecaa Merge branch 'master' into missing-indexes 2020-04-17 14:17:32 +10:00
Maikel
2e31f234d6 Merge pull request #5196 from Matt-Yorkley/customers-performance
Admin Customers performance
2020-04-17 13:28:39 +10:00
Maikel
e29a81cacc Merge pull request #5186 from oeoeaio/customer-totals-inventory-sku
Take sku overrides into account in customer totals report
2020-04-17 13:27:43 +10:00
Maikel
a672af1a79 Merge pull request #5237 from luisramos0/master_with_change
Clone of #5176
2020-04-17 13:27:14 +10:00
Maikel
f282ff805d Merge pull request #5172 from kristinalim/feature/5170-increase_locale_chars_in_spree_users
Increase max characters for locale in spree_users
2020-04-16 18:18:45 +10:00
Transifex-Openfoodnetwork
2f7dc9a578 Updating translations for config/locales/es.yml 2020-04-16 17:09:44 +10:00
chrishil1
a9829ba5d9 Update _enterprise_relationship.html.haml 2020-04-15 17:01:22 -05:00
Luis Ramos
8532fa16cd Merge pull request #5202 from luisramos0/improve_checkout_js
Improve Checkout error handling in JS
2020-04-15 22:25:05 +01:00
chrishil1
c3f01be580 Fixed display all required tag 2020-04-15 19:00:35 +01:00
jeffrey s hill md
e23045b19e Add product translations 2020-04-14 14:15:57 -05:00
jeffrey s hill md
5e1dea61a8 added missing translations to enterprise_relationship page 2020-04-14 11:20:56 -05:00
Luis Ramos
cedf1b26f2 If no flash is sent from the server, show the generic error 2020-04-14 14:31:34 +01:00
Luis Ramos
47a93568dc Make code simpler by extracting methods 2020-04-14 13:55:20 +01:00
Luis Ramos
62471bf2ab Clear Loading spinner when exception is caught 2020-04-14 13:50:38 +01:00
Luis Ramos
cdf5bcb7eb Improve unexpected error handling and add test cases for it 2020-04-14 13:44:58 +01:00
Luis Ramos
7414047b92 Switch from old success/error to modern then/catch structure
Catch() will get a few more errors then errors()

Also, add try/catch inside catch to detect any errors parsing the
response error payload
2020-04-14 13:04:28 +01:00
Pau Pérez Fabregat
4ef5dfe430 Merge pull request #5199 from openfoodfoundation/dependabot/bundler/rubocop-rails-2.5.2
Bump rubocop-rails from 2.5.1 to 2.5.2
2020-04-14 10:17:59 +02:00
Pau Pérez Fabregat
e58a1d080f Merge pull request #5205 from openfoodfoundation/dependabot/bundler/ddtrace-0.34.2
Bump ddtrace from 0.34.1 to 0.34.2
2020-04-14 10:17:06 +02:00
Luis Ramos
357a88fa22 Merge pull request #4786 from luisramos0/stripe_sca_extra_subs_fix
Make StripeSCA (with new authorize/purchase workflow) work with Subscriptions again
2020-04-13 17:21:53 +01:00
Rob H
f71045b3f2 Improve naming of variables in VariantOverridesIndexed for readability 2020-04-13 22:24:25 +10:00
Rob H
dcdd3f2444 Modify interface of VariantOverridesIndexed#indexed
Stop using keyword args and accept variant_ids instead of line_items
2020-04-13 22:11:58 +10:00
Rob H
6820919552 Rename VariantOverrides class to VariantOverridesIndexed 2020-04-13 21:56:37 +10:00
Rob H
4a4173bdc0 Move VariantOverrides class to app/services 2020-04-13 21:54:10 +10:00
Rob H
9a7e782102 Only load up variant overrides for relevant hubs 2020-04-13 12:07:17 +10:00
Transifex-Openfoodnetwork
9fa892346e Updating translations for config/locales/es_CR.yml 2020-04-13 10:30:00 +10:00
Transifex-Openfoodnetwork
7341912390 Updating translations for config/locales/pt_BR.yml 2020-04-12 07:14:21 +10:00
Transifex-Openfoodnetwork
d0c797b797 Updating translations for config/locales/es_CR.yml 2020-04-12 07:12:21 +10:00
Transifex-Openfoodnetwork
cb2e17d7dc Updating translations for config/locales/es_CR.yml 2020-04-12 07:09:21 +10:00
Transifex-Openfoodnetwork
147654df41 Updating translations for config/locales/es_CR.yml 2020-04-12 07:05:59 +10:00
Rob H
14cf168e3b Take sku overrides into account in customer totals report 2020-04-11 16:05:15 +10:00
dependabot-preview[bot]
c3ee7b7c64 Bump ddtrace from 0.34.1 to 0.34.2
Bumps [ddtrace](https://github.com/DataDog/dd-trace-rb) from 0.34.1 to 0.34.2.
- [Release notes](https://github.com/DataDog/dd-trace-rb/releases)
- [Changelog](https://github.com/DataDog/dd-trace-rb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/DataDog/dd-trace-rb/compare/v0.34.1...v0.34.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-10 19:19:13 +00:00
Matt-Yorkley
a6414b6dbe Make sure taggable_type is 'Customer' when querying customer tags 2020-04-10 20:14:14 +02:00
Matt-Yorkley
4c41c84cc1 Refactor tag rules loading for customers
Fixes N+1 queries on customer tags
2020-04-10 10:12:32 +02:00
Matt-Yorkley
e53f733966 Eager-load addresses in customer serializer 2020-04-10 08:20:15 +02:00
Matt-Yorkley
2a8809e6e8 Eager-load default card in customer serializer 2020-04-10 08:20:15 +02:00
Matt-Yorkley
31a54e49c5 Allow User#default_card to work with eager-loading 2020-04-10 08:20:13 +02:00
dependabot-preview[bot]
0fabde8849 Bump rubocop-rails from 2.5.1 to 2.5.2
Bumps [rubocop-rails](https://github.com/rubocop-hq/rubocop-rails) from 2.5.1 to 2.5.2.
- [Release notes](https://github.com/rubocop-hq/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop-rails/compare/v2.5.1...v2.5.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-09 19:21:30 +00:00
Matt-Yorkley
cf712e9478 Select only enterprise id 2020-04-09 17:41:13 +02:00
Kristina Lim
e6cd33ee57 Increase max characters for locale in spree_users
There are many locales that have six (6) characters.
2020-04-07 15:08:49 +08:00
Matt-Yorkley
8a544f3ab3 Add missing indexes to spree_orders and spree_products 2020-04-04 10:12:15 +02:00
Luis Ramos
da837ff100 Remove rabl dependency 🎉 2020-03-17 15:51:50 +00:00
Luis Ramos
da2598282b Can be object or {}, it's what the injector is doing, not related to rabl any more 2020-03-17 15:51:26 +00:00
Luis Ramos
0308f1465d Remove taxons/search action and respective rabl view
This is dead code
2020-03-17 15:51:26 +00:00
Luis Ramos
a6e4893287 Remove taxons list field from product edit form.
It is not working and it's not used in any other place in the app, there's the product category already (product.primary_taxon_id)
2020-03-17 15:51:25 +00:00
Luis Ramos
26769b4150 Add StripeSCA payment authorize and use it both subs_confirm job as well as on teh checkout stripe redirect 2020-03-16 20:04:59 +00:00
Luis Ramos
84745e4ccb Add stripe payment setup spec and make minor tweaks to the code itself.
Also, add a missing . to card_set? that eanbles it! If the card was
already set, it would anyway set the default card. Now it will use the
defined card if there is one already.
2020-03-16 20:03:12 +00:00
Luis Ramos
aac7a5e559 Adapt PaymentSetup spec to new version and remove some private method testing (payment) as well as some tests testing order.pending_payments logic 2020-03-16 20:03:12 +00:00
Luis Ramos
0a2941ed96 Extract StripePaymentSetup from PaymentSetup 2020-03-16 20:03:12 +00:00
49 changed files with 4425 additions and 477 deletions

View File

@@ -377,7 +377,6 @@ Metrics/AbcSize:
- app/helpers/spree/admin/base_helper.rb
- app/helpers/spree/admin/zones_helper.rb
- app/helpers/spree/orders_helper.rb
- app/mailers/producer_mailer.rb
- app/models/calculator/flat_percent_per_item.rb
- app/models/column_preference.rb
- app/models/enterprise.rb
@@ -574,7 +573,6 @@ Metrics/MethodLength:
- app/helpers/spree/admin/navigation_helper.rb
- app/helpers/spree/admin/base_helper.rb
- app/jobs/subscription_placement_job.rb
- app/mailers/producer_mailer.rb
- app/models/column_preference.rb
- app/models/enterprise.rb
- app/models/enterprise_relationship.rb
@@ -680,7 +678,6 @@ Metrics/ModuleLength:
- engines/order_management/spec/services/order_management/subscriptions/estimator_spec.rb
- engines/order_management/spec/services/order_management/subscriptions/form_spec.rb
- engines/order_management/spec/services/order_management/subscriptions/proxy_order_syncer_spec.rb
- engines/order_management/spec/services/order_management/subscriptions/payment_setup_spec.rb
- engines/order_management/spec/services/order_management/subscriptions/summarizer_spec.rb
- engines/order_management/spec/services/order_management/subscriptions/validator_spec.rb
- engines/order_management/spec/services/order_management/subscriptions/variants_list_spec.rb

View File

@@ -173,7 +173,6 @@ Naming/MethodParameterName:
Naming/PredicateName:
Exclude:
- 'spec/**/*'
- 'app/mailers/producer_mailer.rb'
- 'app/models/enterprise.rb'
- 'app/models/enterprise_relationship.rb'
- 'app/models/order_cycle.rb'
@@ -630,7 +629,6 @@ Style/FrozenStringLiteralComment:
- 'app/jobs/subscription_placement_job.rb'
- 'app/jobs/welcome_enterprise_job.rb'
- 'app/mailers/enterprise_mailer.rb'
- 'app/mailers/producer_mailer.rb'
- 'app/mailers/spree/base_mailer_decorator.rb'
- 'app/mailers/spree/order_mailer_decorator.rb'
- 'app/mailers/spree/user_mailer.rb'
@@ -855,7 +853,6 @@ Style/FrozenStringLiteralComment:
- 'app/validators/date_time_string_validator.rb'
- 'app/validators/distributors_validator.rb'
- 'app/validators/integer_array_validator.rb'
- 'app/views/spree/admin/taxons/search.rabl'
- 'config.ru'
- 'engines/order_management/app/controllers/order_management/application_controller.rb'
- 'engines/order_management/app/services/order_management/reports/enterprise_fee_summary/authorizer.rb'

View File

@@ -118,7 +118,7 @@ $ createdb open_food_network_test --owner=ofn
If these commands succeed, you should be able to [continue the setup process](#get-it-running).
[developer-wiki]: https://github.com/openfoodfoundation/openfoodnetwork/wiki
[sierra]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Development-Environment-Setup%3A-macOS-%28Sierra%2C-HighSierra-and-Mojave%29
[sierra]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Development-Environment-Setup%3A-macOS-%28Sierra%2C-HighSierra%2C-Mojave-and-Catalina%29
[el-capitan]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Development-Environment-Setup:-OS-X-(El-Capitan)
[ubuntu]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Development-Environment-Setup:-Ubuntu
[wiki]: https://github.com/openfoodfoundation/openfoodnetwork/wiki

View File

@@ -55,7 +55,6 @@ gem 'aws-sdk'
gem 'bugsnag'
gem 'db2fog'
gem 'haml'
gem 'rabl'
gem 'redcarpet'
gem 'sass', "~> 3.3"
gem 'sass-rails', '~> 3.2.3'

View File

@@ -198,7 +198,7 @@ GEM
activerecord (>= 3.2.0, < 5.0)
fog (~> 1.0)
rails (>= 3.2.0, < 5.0)
ddtrace (0.34.1)
ddtrace (0.34.2)
msgpack
debugger-linecache (1.2.0)
deface (1.0.2)
@@ -483,7 +483,7 @@ GEM
parallel (1.19.1)
paranoia (1.3.4)
activerecord (~> 3.1)
parser (2.7.0.5)
parser (2.7.1.0)
ast (~> 2.4.0)
paypal-sdk-core (0.2.10)
multi_json (~> 1.0)
@@ -502,8 +502,6 @@ GEM
byebug (>= 9.0, < 9.1)
pry (~> 0.10)
public_suffix (4.0.3)
rabl (0.8.4)
activesupport (>= 2.3.14)
rack (1.4.7)
rack-cache (1.11.0)
rack (>= 0.4)
@@ -596,7 +594,7 @@ GEM
rexml
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-rails (2.5.1)
rubocop-rails (2.5.2)
activesupport
rack (>= 1.1)
rubocop (>= 0.72.0)
@@ -754,7 +752,6 @@ DEPENDENCIES
paperclip (~> 3.4.1)
pg (~> 0.21.0)
pry-byebug (>= 3.4.3)
rabl
rack-mini-profiler (< 3.0.0)
rack-rewrite
rack-ssl

View File

@@ -14,15 +14,28 @@ Darkswarm.factory 'Checkout', ($injector, CurrentOrder, ShippingMethods, StripeE
submit: =>
Loading.message = t 'submitting_order'
$http.put('/checkout.json', {order: @preprocess()}).success (data, status)=>
Navigation.go data.path
.error (response, status)=>
if response.path
Navigation.go response.path
else
Loading.clear()
@errors = response.errors
RailsFlashLoader.loadFlash(response.flash)
$http.put('/checkout.json', {order: @preprocess()})
.then (response) =>
Navigation.go response.data.path
.catch (response) =>
try
@handle_checkout_error_response(response)
catch error
@loadFlash(error: t("checkout.failed")) # inform the user about the unexpected error
throw error # generate a BugsnagJS alert
handle_checkout_error_response: (response) =>
if response.data.path
Navigation.go response.data.path
else
throw response unless response.data.flash
@errors = response.data.errors
@loadFlash(response.data.flash)
loadFlash: (flash) =>
Loading.clear()
RailsFlashLoader.loadFlash(flash)
# Rails wants our Spree::Address data to be provided with _attributes
preprocess: ->

View File

@@ -1,6 +1,6 @@
Darkswarm.factory 'OrderCycle', ($resource, orderCycleData) ->
class OrderCycle
@order_cycle = orderCycleData # Object or {} due to RABL
@order_cycle = orderCycleData # Object or {}
@push_order_cycle: (callback) ->
new $resource("/shop/order_cycle").save {order_cycle_id: @order_cycle.order_cycle_id}, (order_data)->
OrderCycle.order_cycle.orders_close_at = order_data.orders_close_at

View File

@@ -17,8 +17,9 @@ module Admin
respond_to do |format|
format.html
format.json do
tag_rule_mapping = TagRule.mapping_for(Enterprise.where(id: params[:enterprise_id]))
render_as_json @collection, tag_rule_mapping: tag_rule_mapping
render_as_json @collection,
tag_rule_mapping: tag_rule_mapping,
customer_tags: customer_tags_by_id
end
end
end
@@ -64,8 +65,13 @@ module Admin
def collection
return Customer.where("1=0") unless json_request? && params[:enterprise_id].present?
enterprise = Enterprise.managed_by(spree_current_user).find_by_id(params[:enterprise_id])
Customer.of(enterprise)
Customer.of(managed_enterprise_id).
includes(:bill_address, :ship_address, user: :credit_cards)
end
def managed_enterprise_id
@managed_enterprise_id ||= Enterprise.managed_by(spree_current_user).
select('enterprises.id').find_by_id(params[:enterprise_id])
end
def load_managed_shops
@@ -80,5 +86,28 @@ module Admin
def ams_prefix_whitelist
[:subscription]
end
def tag_rule_mapping
TagRule.mapping_for(Enterprise.where(id: managed_enterprise_id))
end
# Fetches tags for all customers of the enterprise and returns a hash indexed by customer_id
def customer_tags_by_id
customer_tags = ::ActsAsTaggableOn::Tag.
joins(:taggings).
includes(:taggings).
where(taggings:
{ taggable_type: 'Customer',
taggable_id: Customer.of(managed_enterprise_id),
context: 'tags' })
customer_tags.each_with_object({}) do |tag, indexed_hash|
tag.taggings.each do |tagging|
customer_id = tagging.taggable_id
indexed_hash[customer_id] ||= []
indexed_hash[customer_id] << tag.name
end
end
end
end
end

View File

@@ -3,14 +3,6 @@ module Spree
class TaxonsController < Spree::Admin::BaseController
respond_to :html, :json, :js
def search
@taxons = if params[:ids]
Spree::Taxon.where(id: params[:ids].split(','))
else
Spree::Taxon.limit(20).search(name_cont: params[:q]).result
end
end
def create
@taxonomy = Taxonomy.find(params[:taxonomy_id])
@taxon = @taxonomy.taxons.build(params[:taxon])

View File

@@ -57,16 +57,28 @@ class SubscriptionConfirmJob
return true unless order.payment_required?
setup_payment!(order)
return false if order.errors.present?
return false if order.errors.any?
authorize_payment!(order)
return false if order.errors.any?
order.process_payments!
return false if order.errors.present?
return false if order.errors.any?
true
end
def setup_payment!(order)
OrderManagement::Subscriptions::PaymentSetup.new(order).call!
return if order.errors.any?
OrderManagement::Subscriptions::StripePaymentSetup.new(order).call!
end
def authorize_payment!(order)
return if order.subscription.payment_method.class != Spree::Gateway::StripeSCA
OrderManagement::Subscriptions::StripeScaPaymentAuthorize.new(order).call!
end
def send_confirmation_email(order)

View File

@@ -1,41 +1,58 @@
# frozen_string_literal: true
class ProducerMailer < Spree::BaseMailer
include I18nHelper
def order_cycle_report(producer, order_cycle)
@producer = producer
@coordinator = order_cycle.coordinator
@order_cycle = order_cycle
line_items = line_items_from(@order_cycle, @producer)
@grouped_line_items = line_items.group_by(&:product_and_full_name)
@receival_instructions = @order_cycle.receival_instructions_for @producer
@total = total_from_line_items(line_items)
@tax_total = tax_total_from_line_items(line_items)
I18n.with_locale valid_locale(@producer.owner) do
order_cycle_subject = I18n.t('producer_mailer.order_cycle.subject', producer: producer.name)
subject = "[#{Spree::Config.site_name}] #{order_cycle_subject}"
with_unscoped_products_and_variants do
load_data
return unless has_orders?(order_cycle, producer)
I18n.with_locale(owner_locale) do
return unless orders?(order_cycle, producer)
mail(
to: @producer.contact.email,
from: from_address,
subject: subject,
reply_to: @coordinator.contact.email,
cc: @coordinator.contact.email
)
mail(
to: @producer.contact.email,
from: from_address,
subject: subject,
reply_to: @coordinator.contact.email,
cc: @coordinator.contact.email
)
end
end
end
private
def has_orders?(order_cycle, producer)
def owner_locale
valid_locale(@producer.owner)
end
def load_data
@coordinator = @order_cycle.coordinator
line_items = line_items_from(@order_cycle, @producer)
@grouped_line_items = line_items.group_by(&:product_and_full_name)
@receival_instructions = @order_cycle.receival_instructions_for(@producer)
@total = total_from_line_items(line_items)
@tax_total = tax_total_from_line_items(line_items)
end
def subject
order_cycle_subject = I18n.t('producer_mailer.order_cycle.subject', producer: @producer.name)
"[#{Spree::Config.site_name}] #{order_cycle_subject}"
end
def orders?(order_cycle, producer)
line_items_from(order_cycle, producer).any?
end
def line_items_from(order_cycle, producer)
Spree::LineItem.
includes(variant: { option_values: :option_type }).
@line_items ||= Spree::LineItem.
includes(:option_values, variant: [:product, { option_values: :option_type }]).
from_order_cycle(order_cycle).
sorted_by_name_and_unit_value.
merge(Spree::Product.in_supplier(producer)).
@@ -49,4 +66,22 @@ class ProducerMailer < Spree::BaseMailer
def tax_total_from_line_items(line_items)
Spree::Money.new line_items.sum(&:included_tax)
end
# This hack makes ActiveRecord skip the default_scope (deleted_at IS NULL)
# when eager loading associations. Further details:
# https://github.com/rails/rails/issues/11036
def with_unscoped_products_and_variants
variant_default_scopes = Spree::Variant.default_scopes
product_default_scopes = Spree::Product.default_scopes
Spree::Variant.default_scopes = []
Spree::Product.default_scopes = []
return_value = yield
Spree::Variant.default_scopes = variant_default_scopes
Spree::Product.default_scopes = product_default_scopes
return_value
end
end

View File

@@ -125,7 +125,12 @@ module Spree
end
def default_card
credit_cards.where(is_default: true).first
# Don't re-fetch associated cards from the DB if they're already eager-loaded
if credit_cards.loaded?
credit_cards.to_a.find(&:is_default)
else
credit_cards.where(is_default: true).first
end
end
# Checks whether the specified user is a superadmin, with full control of the

View File

@@ -6,7 +6,7 @@ class Api::Admin::CustomerSerializer < ActiveModel::Serializer
has_one :bill_address, serializer: Api::AddressSerializer
def tag_list
object.tag_list.join(",")
customer_tag_list.join(",")
end
def name
@@ -14,7 +14,7 @@ class Api::Admin::CustomerSerializer < ActiveModel::Serializer
end
def tags
object.tag_list.map do |tag|
customer_tag_list.map do |tag|
tag_rule_map = options[:tag_rule_mapping].andand[tag]
tag_rule_map || { text: tag, rules: nil }
end
@@ -25,4 +25,12 @@ class Api::Admin::CustomerSerializer < ActiveModel::Serializer
object.user.default_card.present?
end
private
def customer_tag_list
return object.tag_list unless options[:customer_tags]
options[:customer_tags].andand[object.id] || []
end
end

View File

@@ -12,11 +12,8 @@ module Checkout
def path
return unless stripe_payment_method?
payment = @order.pending_payments.last
return unless payment&.checkout?
payment.authorize!
raise unless payment.pending?
payment = OrderManagement::Subscriptions::StripeScaPaymentAuthorize.new(@order).call!
raise if @order.errors.any?
field_with_url(payment) if url?(field_with_url(payment))
end

View File

@@ -0,0 +1,36 @@
# frozen_string_literal: true
# Produces mappings of variant overrides by distributor id and variant id
# The primary use case for data structured in this way is for injection into
# the initializer of the OpenFoodNetwork::ScopeVariantToHub class
class VariantOverridesIndexed
def initialize(variant_ids, distributor_ids)
@variant_ids = variant_ids
@distributor_ids = distributor_ids
end
def indexed
scoped_variant_overrides.each_with_object(hash_of_hashes) do |variant_override, indexed|
indexed[variant_override.hub_id][variant_override.variant] = variant_override
end
end
private
attr_reader :variant_ids, :distributor_ids
def scoped_variant_overrides
VariantOverride
.joins(:variant)
.preload(:variant)
.where(
hub_id: distributor_ids,
variant_id: variant_ids,
)
end
def hash_of_hashes
Hash.new { |hash, key| hash[key] = {} }
end
end

View File

@@ -6,6 +6,7 @@
%td
%ul
%li{"ng-repeat" => "permission in enterprise_relationship.permissions"}
to {{ EnterpriseRelationships.permission_presentation(permission.name) }}
= t 'admin_enterprise_relationships_to'
{{ EnterpriseRelationships.permission_presentation(permission.name) }}
%td.actions
%a.delete-enterprise-relationship.icon-trash.no-text{'ng-click' => 'delete(enterprise_relationship)'}

View File

@@ -13,7 +13,8 @@
%div{"ng-repeat" => "permission in EnterpriseRelationships.all_permissions"}
%label
%input{type: "checkbox", "ng-model" => "permissions[permission]"}
to {{ EnterpriseRelationships.permission_presentation(permission) }}
= t 'admin_enterprise_relationships_to'
{{ EnterpriseRelationships.permission_presentation(permission) }}
%td.actions
%input{type: "button", value: t(:admin_enterprise_relationships_button_create), "ng-click" => "create()"}
.errors {{ EnterpriseRelationships.create_errors }}

View File

@@ -1,4 +1,5 @@
.three.columns.omega{ "ng-if" => "product.variant_unit_with_scale != 'items'" }
= f.field_container :display_as do
= f.label :product_display_as, t('.display_as')
%span.required *
%input#product_display_as.fullwidth{name: "product[display_as]", placeholder: "{{ placeholder_text }}", type: "text"}

View File

@@ -16,11 +16,6 @@
= sanitize(@product.description)
= f.error_message_on :description
= f.field_container :taxons do
= f.label :taxon_ids, t(:taxons)
%br
= f.hidden_field :taxon_ids, :value => @product.taxon_ids.join(',')
.right.four.columns.omega
.variant_units_form{ 'ng-app' => 'admin.products', 'ng-controller' => 'editUnitsCtrl' }

View File

@@ -38,6 +38,7 @@
.three.columns.omega{ 'ng-show' => "product.variant_unit_with_scale == 'items'" }
= f.field_container :unit_name do
= f.label :product_variant_unit_name, t(".unit_name")
%span.required *
%input.fullwidth{ id: 'product_variant_unit_name','ng-model' => 'product.variant_unit_name', :name => 'product[variant_unit_name]', :placeholder => t('admin.products.unit_name_placeholder'), :type => 'text' }
.twelve.columns.alpha
.six.columns.alpha

View File

@@ -1,4 +0,0 @@
object false
child(@taxons => :taxons) do
attributes :name, :pretty_name, :id
end

View File

@@ -1456,13 +1456,13 @@ ca:
email_payment_summary: Resum del pagament
email_payment_method: "Pagament a través de:"
email_so_placement_intro_html: "Tens una nova comanda amb <strong> %{distributor} </ strong>"
email_so_placement_details_html: "Aquests són els detalls de la comanda de <strong> %{distributor} </ strong>:"
email_so_placement_details_html: "Aquests són els detalls de la comanda de <strong>%{distributor}</strong> :"
email_so_placement_changes: "Malauradament, no tots els productes que has demanat estaven disponibles. Les quantitats originals que has sol·licitat apareixen ratllades a sota."
email_so_payment_success_intro_html: "S'ha processat un pagament automàtic per a la vostra comanda des de <strong> %{distributor} </ strong>."
email_so_placement_explainer_html: "Aquesta comanda s'ha creat automàticament per tu."
email_so_edit_true_html: "Potd <a href='%{order_url}'> fer canvis </ a> fins que les comandes es tanquin el %{orders_close_at}."
email_so_edit_true_html: "Pots <a href='%{order_url}'>fer canvis</a> fins que les comandes es tanquin el %{orders_close_at}."
email_so_edit_false_html: "Pots <a href='%{order_url}'> veure detalls d'aquesta comanda </a> en qualsevol moment."
email_so_contact_distributor_html: "Si tens alguna pregunta pots contactar amb <strong> %{distributor} </ strong> a través d'%{email}."
email_so_contact_distributor_html: "Si tens alguna pregunta pots contactar amb <strong>%{distributor}</strong> a través d'%{email}."
email_so_contact_distributor_to_change_order_html: "Aquesta comanda s'ha creat automàticament per a vostè. Podeu fer canvis fins que les comandes es tanquin a %{orders_close_at} contactant a <strong> %{distributor} </ strong> a través d'%{email}."
email_so_confirmation_intro_html: "La teva comanda amb <strong> %{distributor} </ strong> ja està confirmada"
email_so_confirmation_explainer_html: "Vas realitzar aquesta comanda automàticament i ara s'ha finalitzat."

View File

@@ -2053,6 +2053,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
admin_enterprise_relationships_permits: "permits"
admin_enterprise_relationships_seach_placeholder: "Search"
admin_enterprise_relationships_button_create: "Create"
admin_enterprise_relationships_to: "to"
admin_enterprise_groups: "Enterprise Groups"
admin_enterprise_groups_name: "Name"
admin_enterprise_groups_owner: "Owner"
@@ -2910,6 +2911,8 @@ See the %{link} to find out more about %{sitename}'s features and to start using
location: "Location"
count_on_hand: "Count On Hand"
quantity: "Quantity"
on_demand: "On Demand"
on_hand: "On Hand"
package_from: "package from"
item_description: "Item Description"
price: "Price"

View File

@@ -1919,6 +1919,7 @@ en_FR:
admin_enterprise_relationships_permits: "permits"
admin_enterprise_relationships_seach_placeholder: "Search"
admin_enterprise_relationships_button_create: "Create"
admin_enterprise_relationships_to: "to"
admin_enterprise_groups: "Enterprise Groups"
admin_enterprise_groups_name: "Name"
admin_enterprise_groups_owner: "Owner"
@@ -2760,6 +2761,8 @@ en_FR:
location: "Location"
count_on_hand: "Count On Hand"
quantity: "Quantity"
on_demand: "On Demand"
on_hand: "On Hand"
package_from: "package from"
item_description: "Item Description"
price: "Price"

View File

@@ -31,6 +31,10 @@ es:
taken: "Ya existe una cuenta con este email. Inicie sesión o restablezca tu contraseña."
spree/order:
no_card: No hay tarjetas de crédito autorizadas disponibles para cargar
spree/credit_card:
attributes:
base:
card_expired: "ha expirado"
order_cycle:
attributes:
orders_close_at:
@@ -52,6 +56,8 @@ es:
shipping_method_ids: "Métodos de envío"
payment_method_ids: "Métodos de Pago"
errors:
messages:
inclusion: "no está incluido en la lista"
models:
order_management/subscriptions/validator:
attributes:
@@ -246,6 +252,8 @@ es:
notes: Notas
error: Error
processing_payment: "Procesando el pago..."
no_pending_payments: "No tiene pagos pendientes"
invalid_payment_state: "Estado de pago no válido"
filter_results: Filtrar resultados
quantity: Cantidad
pick_up: Recogida
@@ -438,9 +446,12 @@ es:
infinity: "infinito"
to_order_tip: "Los artículos hechos según demanda no tienen un nivel de stock, como por ejemplo panes hechos según demanda."
back_to_products_list: "Volver a la lista de productos"
editing_product: "Editando producto"
tabs:
product_details: "Detalles del Producto"
group_buy_options: "Opciones de compra grupales"
images: "Imágenes"
variants: "variaciones"
product_properties: "Propiedades del producto"
product_import:
title: Importación de productos
@@ -699,6 +710,11 @@ es:
enable_subscriptions_false: "Deshabilitado"
enable_subscriptions_true: "Habilitado"
shopfront_message: "Mensaje de la Tienda"
shopfront_message_placeholder: >
Mensaje de bienvenida opcional para compradores, explica como comprar
en el sitio. si el texto se agrega en este campo, va a ser mostrado
en la pestaña de inicio cuando los clientes ingresen por primera vez
a la tienda.
shopfront_message_link_tooltip: "Insertar / editar enlace"
shopfront_message_link_prompt: "Por favor introduzca una URL para insertar"
shopfront_closed_message: "Mensaje de tienda cerrada"
@@ -836,25 +852,38 @@ es:
new:
create: "Crear"
cancel: "Cancelar"
back_to_list: "Regresar a la lista"
edit:
advanced_settings: "Configuración Avanzada"
save: "Guardar"
save_and_next: "Salvar y continuar"
next: "Siguiente"
cancel: "Cancelar"
back_to_list: "Regresar a la lista"
save_and_back_to_list: "Salvar y volver a lista"
choose_products_from: "Escoger Productos desde:"
incoming:
save: "Guardar"
save_and_next: "Salvar y continuar"
next: "Siguiente"
cancel: "Cancelar"
back_to_list: "Regresar a la lista"
outgoing:
outgoing: "Saliente"
distributor: "Distribuidora"
products: "Productos"
tags: "Tags"
delivery_details: "Detalles de entrega"
fees: "Comisiones"
previous: "Anterior"
save: "Guardar"
save_and_back_to_list: "Salvar y volver a lista"
cancel: "Cancelar"
back_to_list: "Regresar a la lista"
wizard_progress:
edit: "1. Configuración general"
incoming: "2. Productos entrantes"
outgoing: "3. Productos salientes"
exchange_form:
pickup_time_tip: Cuando los pedidos de este ciclo de pedido estarán listos para la consumidora
pickup_instructions_placeholder: "Instrucciones de recogida"
@@ -1092,10 +1121,13 @@ es:
destroy_attachment_does_not_exist: "El logotipo no existe"
enterprise_promo_image:
destroy_attachment_does_not_exist: "La imagen promocional no existe"
orders:
failed_to_update: "Error al actualizar pedido"
checkout:
already_ordered:
cart: "carrito"
message_html: "Ya realizó un pedido para este ciclo de pedido. Compruebe el %{cart}para ver los artículos que pidió. También puede cancelar artículos mientras el ciclo de pedido siga abierto."
failed: "La finalización de compra falló, por favor comunicate con nosotros para procesar la orden."
shops:
hubs:
show_closed_shops: "Mostrar tiendas cerradas"
@@ -1266,6 +1298,7 @@ es:
saving_credit_card: Guardando tarjeta de crédito...
card_has_been_removed: "Su tarjeta ha sido eliminada (número: %{number})"
card_could_not_be_removed: Lo sentimos, la tarjeta no se pudo quitar
invalid_credit_card: "Tarjeta de crédito inválida"
ie_warning_headline: "Su navegador está desactualizado :-("
ie_warning_text: "Para la mejor esperiencia de Open Food Network, recomendamos actualizar su navegador:"
ie_warning_chrome: Descargar Chrome
@@ -1467,6 +1500,7 @@ es:
shopping_oc_closed_description: "Por favor espere hasta que el próximo ciclo abra (o contactanos de forma directa para ver si podemos aceptar algunos pedidos tardíos)"
shopping_oc_last_closed: "El último ciclo cerró hace %{distance_of_time}"
shopping_oc_next_open: "El próximo ciclo abrirá en %{distance_of_time}"
shopping_oc_select: "Seleccionar"
shopping_tabs_home: "Inicio"
shopping_tabs_shop: "Tienda"
shopping_tabs_about: "Acerca de"
@@ -1840,6 +1874,7 @@ es:
headline: "¡Terminado!"
thanks: "Gracias por llenar los detalles de %{enterprise}."
login: "Puede cambiar o actualizar su negocio en cualquier etapa iniciando sesión en Open Food Network y yendo a Admin."
action: "Ir al Panel de Organización"
back: "Atrás"
continue: "Continuar"
action_or: "Ó"
@@ -1925,6 +1960,7 @@ es:
tax_category: "Categoría del impuesto"
calculator: "Calculadora"
calculator_values: "Calculadora de valores"
calculator_settings_warning: "Si está cambiando el tipo de calculadora, debe de salvar primero antes de editar las configuraciones de la calculadora"
flat_percent_per_item: "Porcentaje fijo (por artículo)"
flat_rate_per_item: "Tarifa plana (por artículo)"
flat_rate_per_order: "Tarifa plana (por pedido)"
@@ -2255,6 +2291,7 @@ es:
enterprise_register_success_notice: "¡Felicidades! ¡Se ha completado el registro de %{enterprise}!"
enterprise_bulk_update_success_notice: "Organizaciones actualizadas con éxito"
enterprise_bulk_update_error: 'Error en la actualización'
enterprise_shop_show_error: "La tienda que busca no existe o esta inactiva en OFN. por favor visita otras tiendas."
order_cycles_create_notice: 'Se ha creado el ciclo de pedido.'
order_cycles_update_notice: 'Se ha actualizado su ciclo de pedido.'
order_cycles_bulk_update_notice: 'Los ciclos de pedido han sido actualizados.'
@@ -2410,6 +2447,12 @@ es:
severity: Gravedad
description: Descripción
resolve: Resolver
exchange_products:
load_more_variants: "Cargar mas variantes"
load_all_variants: "cargar todas las variantes"
select_all_variants: "Seleccionar todo"
variants_loaded: "%{num_of_variants_loaded} de %{total_number_of_variants} variantes cargadas"
loading_variants: "Cargando variantes"
tag_rules:
shipping_method_tagged_top: "Métodos de envío etiquetados"
shipping_method_tagged_bottom: "son:"
@@ -2492,6 +2535,7 @@ es:
customer_placeholder: "customer@example.org"
valid_email_error: "Introduce un email válido"
subscriptions:
error_saving: "Error al salvar suscripción "
new:
please_select_a_shop: "Por favor seleccione una tienda"
insufficient_stock: "Stock insuficiente disponible, solo quedan %{on_hand}"
@@ -2567,6 +2611,79 @@ es:
signup_or_login: "Empieza registrándose (o iniciando sesión)"
have_an_account: "¿Ya tiene una cuenta?"
action_login: "Inicie sesión ahora."
inflections:
each:
one: "each"
other: "cada"
bunch:
one: "manojo"
other: "manojos"
pack:
one: "paquete"
other: "paquetes"
box:
one: "caja"
other: "cajas"
bottle:
one: "botella"
other: "botellas"
jar:
one: "frasco"
other: "frascos"
head:
one: "cabeza"
other: "cabezas"
bag:
one: "bolsa"
other: "bolsas"
loaf:
one: "hogaza"
other: "hogazas"
single:
one: "single"
other: "individuales"
tub:
one: "tub"
other: "recipientes"
punnet:
one: "canastilla"
other: "canastillas"
packet:
one: "paquete"
other: "paquetes"
item:
one: "elemento"
other: "elementos"
dozen:
one: "docena"
other: "docenas"
unit:
one: "unidad"
other: "unidades"
serve:
one: "serve"
other: "porción"
tray:
one: "bandeja"
other: "bandejas"
piece:
one: "pieza"
other: "piezas"
pot:
one: "maceta"
other: "contenedores"
bundle:
one: "haz"
other: "paquetes"
flask:
one: "flask"
other: "frascos"
basket:
one: "canasta"
other: "canastas"
sack:
one: "sacos"
other: "sacos"
producers:
signup:
start_free_profile: "Empieze con un perfil gratuito, y amplíelo cuando esté preparado!"
@@ -2792,6 +2909,12 @@ es:
minimal_amount: "Cantidad mínima"
normal_amount: "Cantidad normal"
discount_amount: "Importe de descuento"
no_images_found: "No se encontraron imágenes "
new_image: "Nueva Imagen"
filename: "Nombre de archivo"
alt_text: "Texto Alternativo"
thumbnail: "Miniatura"
back_to_images_list: "Volver a lista de imágenes "
email: Email
account_updated: "Cuenta actualizada!"
email_updated: "La cuenta se actualizará una vez que se confirme el nuevo correo electrónico."
@@ -2803,6 +2926,9 @@ es:
zipcode: Código Postal
weight: Peso (en kg)
error_user_destroy_with_orders: "Los usuarios con pedidos completados no pueden ser eliminados"
cannot_create_payment_without_payment_methods: "No se puede crear un pago para una orden sin un medio de pago definido"
please_define_payment_methods: "por favor definir métodos de pago"
options: "Opciones"
actions:
update: "Actualizar"
errors:
@@ -2834,27 +2960,53 @@ es:
product_properties:
index:
inherits_properties_checkbox_hint: "¿Heredar propiedades desde %{supplier}? (a menos que sea anulado arriba)"
add_product_properties: "Agregar Propiedades del producto"
select_from_prototype: "seleccionar de prototipo"
properties:
index:
properties: "Propiedades"
new_property: "Nueva propiedad"
name: "Nombre"
presentation: "presentación"
new:
new_property: "Nueva propiedad"
edit:
editing_property: "Editar Propiedad"
back_to_properties_list: "volver a lista de propiedades"
form:
name: "Nombre"
presentation: "presentación"
return_authorizations:
index:
new_return_authorization: "Nueva autorización de devolución"
return_authorizations: "Autorizaciones de devolución"
back_to_orders_list: "Volver a la lista de pedidos"
rma_number: "número RMA"
status: "Estado"
amount: "Cantidad"
cannot_create_returns: "No se pueden crear devoluciones ya que este pedido no tiene unidades enviadas."
continue: "Continuar"
new:
new_return_authorization: "Nueva autorización de devolución"
back_to_return_authorizations_list: "Back To Return Authorization List"
continue: "Continuar"
edit:
receive: "recibir"
are_you_sure: "¿Está seguro?"
return_authorization: "volver a autorización"
form:
product: "Producto"
quantity_shipped: "cantidad enviada"
quantity_returned: "Cantidad devuelta"
return_quantity: "cantidad a devolver"
amount: "Cantidad"
rma_value: "Valor RMA"
reason: "razón"
stock_location: "localización de inventario"
states:
authorized: "autorizado"
received: "recibido"
canceled: "cancelado"
orders:
index:
listing_orders: "Pedidos de listado"
@@ -2862,6 +3014,7 @@ es:
capture: "Captura"
ship: "Envío"
edit: "Editar"
order_not_updated: "El pedido no se pudo actualizar"
note: "Nota"
first: "primero"
last: "Último"
@@ -2884,6 +3037,8 @@ es:
tax_invoice: "FACTURA DE IMPUESTOS"
code: "Código"
from: "De"
to: "Facturar a"
shipping: "envío"
form:
distribution_fields:
title: "Distribución"
@@ -3044,12 +3199,23 @@ es:
index:
sku: "SKU"
price: "Precio"
options: "Opciones"
no_results: "No hay resultados"
to_add_variants_you_must_first_define: "para agregar variantes, se debe primero definir"
option_types: "Tipos de opciones"
option_values: "valores de opción"
and: "y"
new_variant: "Nueva Variante"
show_active: "mostrar activo"
show_deleted: "Mostrar eliminados"
new:
new_variant: "Nueva Variante"
form:
cost_price: "Precio de costo"
sku: "SKU"
price: "Precio"
display_as: "Mostrar como"
display_name: "Nombre para mostrar"
autocomplete:
producer_name: "Productora"
unit: "Unidad"
@@ -3195,3 +3361,19 @@ es:
allow_charges?: "¿Permitir cargos?"
localized_number:
invalid_format: tiene un formato invalido. Por favor introduzca un numero.
api:
invalid_api_key: "La llave de API especificada (%{key}) es inválida."
unauthorized: "No tiene autorización para realizar esta acción."
invalid_resource: "Recurso inválido. Por favor corrija los errores e intente nuevamente."
resource_not_found: "El recurso que buscaba no puede ser encontrado."
access: "acceso al API"
key: "Llave"
clear_key: "valor vacío"
regenerate_key: "Regenerar llave"
no_key: "sin valor"
generate_key: "Generar llave de API"
key_generated: "Llave generada"
key_cleared: "valor borrado"
shipment:
cannot_ready: "No se puede completar envío"
invalid_taxonomy_id: "El identificador de taxonomía es inválido."

3379
config/locales/es_CR.yml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -596,7 +596,7 @@ fr:
max_fulfilled_units: "Nombre max d'unités commandées"
order_error: "Des erreurs doivent être résolues avant de pouvoir mettre à jour les commandes.\nLes champs entourés en rouge contiennent des erreurs."
variants_without_unit_value: "ATTENTION: certaines variantes n'ont pas de nombre d'unités"
select_variant: "Choisir une variante"
select_variant: "Rechercher un produit et sélectionner une variante"
enterprise:
select_outgoing_oc_products_from: Sélectionner les produits sortants pour le cycle de vente parmi
enterprises:
@@ -1543,7 +1543,7 @@ fr:
products_loading: "Produits en cours de chargement..."
products_updating_cart: "Actualisation du panier..."
products_cart_empty: "Panier vide"
products_edit_cart: "Valider votre panier"
products_edit_cart: "Poursuivre"
products_from: de
products_change: "Aucun changement à sauvegarder."
products_update_error: "Échec de l'enregistrement dû à:"
@@ -1921,6 +1921,7 @@ fr:
admin_enterprise_relationships_permits: "autorise"
admin_enterprise_relationships_seach_placeholder: "Rechercher"
admin_enterprise_relationships_button_create: "Créer"
admin_enterprise_relationships_to: "à"
admin_enterprise_groups: "Groupes d'entreprises"
admin_enterprise_groups_name: "Produit/Variante"
admin_enterprise_groups_owner: "Gestionnaire principal"
@@ -2790,6 +2791,8 @@ fr:
location: "Localisation"
count_on_hand: "Quantité en stock"
quantity: "Quantité"
on_demand: "A volonté"
on_hand: "En stock"
package_from: "conditionnement par"
item_description: "Description de la pièce"
price: "Prix"

View File

@@ -31,6 +31,10 @@ fr_BE:
taken: "Un compte existe déjà pour cette adresse électronique. Connectez-vous ou demandez un nouveau mot de passe."
spree/order:
no_card: Aucune carte de paiement autorisée disponible
spree/credit_card:
attributes:
base:
card_expired: "a expiré"
order_cycle:
attributes:
orders_close_at:
@@ -248,6 +252,8 @@ fr_BE:
notes: Commentaires
error: Erreur
processing_payment: "Paiement en cours..."
no_pending_payments: "Aucun paiement en attente"
invalid_payment_state: "État de paiement invalide"
filter_results: Filtrer les résultats
quantity: Quantité
pick_up: Retrait
@@ -867,6 +873,7 @@ fr_BE:
distributor: "Distributeur·trice"
products: "Produits"
tags: "Tags"
delivery_details: "Détails de la livraison"
fees: "Commission"
previous: "Précédent"
save: "Sauvergarder"
@@ -1129,11 +1136,11 @@ fr_BE:
shared:
menu:
cart:
cart: "Cart"
cart: "Panier"
signed_in:
profile: "Profil"
mobile_menu:
cart: "Carte"
cart: "Panier"
joyride:
checkout: "Passer la commande"
already_ordered_products: "Déjà commandé dans ce cycle de vente"
@@ -1291,6 +1298,7 @@ fr_BE:
saving_credit_card: Enregistrement de la carte de crédit...
card_has_been_removed: "Votre carte a été supprimée (numéro : %{number})"
card_could_not_be_removed: Désolée, la carte n'a pas pu être supprimée :-(
invalid_credit_card: "Carte de crédit non valable"
ie_warning_headline: "Votre navigateur n'est pas à jour :-("
ie_warning_text: "Pour une expérience optimale sur Open Food Network, nous vous recommandons fortement de mettre à jour votre navigateur:"
ie_warning_chrome: Télécharger Chrome
@@ -1492,6 +1500,7 @@ fr_BE:
shopping_oc_closed_description: "Veuillez attendre l'ouverture du prochain cycle de vente (ou contactez directement le comptoir pour voir si nous pouvons accepter une commande tardive)."
shopping_oc_last_closed: "Le dernier cycle de vente s'est terminé il y a %{distance_of_time}"
shopping_oc_next_open: "Le prochain cycle de vente ouvrira dans %{distance_of_time}"
shopping_oc_select: "Sélectionnez..."
shopping_tabs_home: "Accueil"
shopping_tabs_shop: "Comptoir"
shopping_tabs_about: "A propos"
@@ -1865,6 +1874,7 @@ fr_BE:
headline: "C'est terminé!"
thanks: "Merci d'avoir complété le profil de %{enterprise}"
login: "Vous pouvez modifier ou mettre à jour les détails de votre entreprise à tout moment en vous connectant sur Open Food Network, rubrique Admin."
action: "Aller au tableau de bord des entreprises"
back: "Retour"
continue: "Suivant"
action_or: "OU"
@@ -2283,6 +2293,7 @@ fr_BE:
enterprise_register_success_notice: "Bravo ! L'entreprise %{enterprise} est maintenant inscrite sur Open Food Network :-)"
enterprise_bulk_update_success_notice: "Entreprises mises à jour avec succès"
enterprise_bulk_update_error: 'Echec dans la mise à jour'
enterprise_shop_show_error: "Le comptoir que vous recherchez n'existe pas ou est inactif sur OFN. Veuillez vérifier les autres comptoirs."
order_cycles_create_notice: 'Votre cycle de vente a été créé.'
order_cycles_update_notice: 'Votre cycle de vente a été mis à jour.'
order_cycles_bulk_update_notice: 'Des cycles de vente ont été mis à jour.'
@@ -2444,6 +2455,12 @@ fr_BE:
severity: Rigueur
description: Description
resolve: Résoudre
exchange_products:
load_more_variants: "Charger plus de variantes"
load_all_variants: "Charger toutes les variantes"
select_all_variants: "Sélectionner toutes %{total_number_of_variants}les variantes"
variants_loaded: " %{num_of_variants_loaded}de %{total_number_of_variants}variantes chargées"
loading_variants: "Chargement des variantes"
tag_rules:
shipping_method_tagged_top: "Méthodes d'expédition étiquetées"
shipping_method_tagged_bottom: "sont:"
@@ -2956,6 +2973,8 @@ fr_BE:
tax_invoice: "FACTURE"
code: "Code"
from: "De"
to: "Facture à"
shipping: "Expédition"
form:
distribution_fields:
title: "Distribution"

View File

@@ -3030,6 +3030,7 @@ it:
tax_invoice: "FATTURA DELLE TASSE"
code: "Codice"
from: "Da"
shipping: "Spedizione"
form:
distribution_fields:
title: "Distribuzione"

View File

@@ -16,9 +16,11 @@ pt_BR:
spree/product:
primary_taxon: "Categoria de Produto"
supplier: "Fornecedor"
shipping_category_id: "Tipos de Envio"
shipping_category_id: "Tipos de Frete"
variant_unit: "Unidade variante"
variant_unit_name: "Nome da unidade variante"
spree/credit_card:
base: "Cartão de Crédito"
order_cycle:
orders_close_at: Dia de fechamento
errors:
@@ -29,6 +31,10 @@ pt_BR:
taken: "Já existe uma conta para este e-mail. Por favor, faça login ou redefina sua senha."
spree/order:
no_card: Não há cartões de crédito válidos disponíveis
spree/credit_card:
attributes:
base:
card_expired: "expirou"
order_cycle:
attributes:
orders_close_at:
@@ -204,7 +210,7 @@ pt_BR:
remove: Remover
or: ou
collapse_all: Recolher todos
expand_all: Aumentar tudo
expand_all: Expandir tudo
loading: Carregando...
show_more: Mostrar mais
show_all: Mostrar tudo
@@ -583,13 +589,13 @@ pt_BR:
actions_delete: "Deletar selecionado"
loading: "Carregando pedidos"
no_results: "Nenhum pedido encontrado. "
group_buy_unit_size: "Tamanho da Unidade para Grupo de Compras"
group_buy_unit_size: "Unidade de Medida para Grupo de Compras"
total_qtt_ordered: "Quantidade total do pedido"
max_qtt_ordered: "Quantidade máxima do pedido"
current_fulfilled_units: "Unidades completadas no momento"
max_fulfilled_units: "Máximo de unidades completadas "
order_error: "Alguns erros devem ser corrigidos antes de atualizar os pedidos.\nOs campos com bordas vermelhas contém erros."
variants_without_unit_value: "AVISO: Algumas variantes não possuem unidade de valor"
variants_without_unit_value: "AVISO: Algumas variantes não possuem unidade de medida"
select_variant: "Selecione uma variante"
enterprise:
select_outgoing_oc_products_from: 'Selecione a saída do ciclo de pedidos '
@@ -966,7 +972,7 @@ pt_BR:
not_visible: "%{enterprise} não está visível e, portanto, não pode ser encontrado no mapa ou em pesquisas"
reports:
hidden: ESCONDIDO
unitsize: TAMANHO DA UNIDADE
unitsize: Unidade de Medida
total: TOTAL
total_items: TOTAL DE ITEMS
supplier_totals: Total do fornecedor do ciclo de pedidos
@@ -1199,7 +1205,7 @@ pt_BR:
menu_4_title: "Grupos"
menu_4_url: "/groups"
menu_5_title: "Sobre"
menu_5_url: "https://about.openfoodnetwork.org.au/"
menu_5_url: "https://about.openfoodbrasil.com.br/"
menu_6_title: "Conectar"
menu_6_url: "https://openfoodnetwork.org/au/connect/"
menu_7_title: "Aprender"
@@ -1536,11 +1542,11 @@ pt_BR:
products_cart_empty: "Carrinho vazio"
products_edit_cart: "Edite seu carrinho"
products_from: de
products_change: "Nenhuma modificação a ser salva."
products_change: "Nenhuma alteração a ser salva."
products_update_error: "Falha ao salvar, com o seguinte erro:"
products_update_error_msg: "Falha ao salvar."
products_update_error_data: "Falha no salvamento devido a dados inválidos:"
products_changes_saved: "Modificações salvas."
products_changes_saved: "Alterações salvas."
search_no_results_html: "Sinto muito, nenhum resultado encontrado para %{query}. Que tal tentar outra busca?"
components_profiles_popover: "Perfis Simples não possuem uma loja virtual na Open Food Brasil, mas podem ter suas próprias lojas físicas ou online em outro endereço"
components_profiles_show: "Mostrar perfis"
@@ -1893,7 +1899,7 @@ pt_BR:
transaction_date: "DataData"
payment_state: "Status do Pagamento"
shipping_state: "Status da entrega"
value: "Valor"
value: "Quantidade"
balance_due: "saldo devedor"
credit: "Crédito"
Paid: "Pago"
@@ -1940,7 +1946,7 @@ pt_BR:
supplier: "Fornecedor"
product_name: "Nome do Produto"
product_description: "Descrição do Produto"
units: "O tamanho da unidade"
units: "Unidade de medida"
coordinator: "Coordenador"
distributor: "Distribuidor"
enterprise_fees: "Taxas da iniciativa"
@@ -2129,7 +2135,7 @@ pt_BR:
report_header_quantity: Quantidade
report_header_max_quantity: Quantidade máxima
report_header_variant: Variante
report_header_variant_value: Valor variante
report_header_variant_value: Valor da variante
report_header_variant_unit: Unidade variante
report_header_total_available: Total disponível
report_header_unallocated: Não atribuído
@@ -2148,14 +2154,14 @@ pt_BR:
report_header_sells: Vende
report_header_visible: Visível
report_header_price: Preço
report_header_unit_size: Tamanho da Unidade
report_header_unit_size: Unidade de Medida
report_header_distributor: Distribuidor
report_header_distributor_address: Endereço do distribuidor
report_header_distributor_city: Cidade do distribuidor
report_header_distributor_postcode: CEP do distribuidor
report_header_delivery_address: Endereço para entrega
report_header_delivery_postcode: CEP para entrega
report_header_bulk_unit_size: Tamanho de unidade para atacado
report_header_bulk_unit_size: Unidade de Medida para atacado
report_header_weight: Peso
report_header_sum_total: Soma total
report_header_date_of_order: Data do pedido
@@ -2301,7 +2307,7 @@ pt_BR:
shipped: Enviado
js:
saving: 'Salvando...'
changes_saved: 'Mudanças salvas.'
changes_saved: 'Alterações salvas.'
save_changes_first: Salve as alterações primeiro.
all_changes_saved: Todas as alterações foram salvas
unsaved_changes: Você possui alterações não salvas
@@ -2567,7 +2573,7 @@ pt_BR:
visible: VISÍVEL
not_visible: NÃO VISÍVEL
services:
unsaved_changes_message: Existem mudanças não salvas, salvar agora ou ignorar?
unsaved_changes_message: Existem alterações não salvas. Salvar agora ou ignorar?
save: SALVAR
ignore: IGNORAR
add_to_order_cycle: "adicionar ao ciclo de pedidos"
@@ -2870,7 +2876,7 @@ pt_BR:
back_to_taxonomies_list: "Voltar à lista de taxonomias"
shipping_methods: "Métodos de envio"
shipping_categories: "Categorias de Remessa"
new_shipping_category: "Nova categoria de remessa"
new_shipping_category: "Nova categoria de frete"
back_to_shipping_categories: "Voltar para categorias de remessa"
analytics_trackers: "Rastreadores de análise"
no_trackers_found: "Nenhum rastreador encontrado"
@@ -3113,8 +3119,8 @@ pt_BR:
new_product: "Novo produto"
supplier: "Fornecedor"
product_name: "Nome do Produto"
units: "Tamanho da Unidade"
value: "Valor"
units: "Unidade de Medida"
value: "Quantidade"
unit_name: "Nome da Unidade"
price: "Preço"
on_hand: "Disponível"
@@ -3195,7 +3201,7 @@ pt_BR:
no_results: "Nenhum Resultado"
to_add_variants_you_must_first_define: "Para adicionar variantes, primeiro você precisa definir"
option_types: "Tipos de Opções"
option_values: "Valores de Opções"
option_values: "Valores das Opções"
and: "e"
new_variant: "Nova Variante"
show_active: "Mostra Ativos"

View File

@@ -9,14 +9,14 @@ tr:
shipment_state: ' Teslimat Durumu'
completed_at: Oluşturulma Tarihi
number: Numara
state: Şehir
state: Durum
email: Müşteri E-postası
spree/payment:
amount: Tutar
spree/product:
primary_taxon: "Ürün Kategorisi"
supplier: "Tedarikçi"
shipping_category_id: "Nakliye Kategorisi"
shipping_category_id: "Teslimat Kategorisi"
variant_unit: "Varyant Birimi"
variant_unit_name: "Varyant Birim Adı"
spree/credit_card:
@@ -31,22 +31,26 @@ tr:
taken: "Bu e-posta adına kayıtlı bir hesap var. Lütfen giriş yapın veya şifrenizi sıfırlayın."
spree/order:
no_card: Ödeme alınabilecek kayıtlı bir kredi kartı bulunmamaktadır.
spree/credit_card:
attributes:
base:
card_expired: "süresi doldu"
order_cycle:
attributes:
orders_close_at:
after_orders_open_at: ılış tarihinden sonra olmalı
variant_override:
count_on_hand:
using_producer_stock_settings_but_count_on_hand_set: "Boş bırakılmalı çünkü üreticinin stokları kullanılıyor"
using_producer_stock_settings_but_count_on_hand_set: "Boş bırakılmalı çünkü üretici stok ayarları kullanılıyor"
on_demand_but_count_on_hand_set: "talep üzerine is boş bırakılmalıdır"
limited_stock_but_no_count_on_hand: "Sınırlı stok durumundan dolayı belirtilmeli"
activemodel:
attributes:
order_management/reports/enterprise_fee_summary/parameters:
start_at: "Başlangıç"
end_at: "Son"
end_at: "Bitiş"
distributor_ids: "Pazarlar"
producer_ids: reticiler"
producer_ids: RETİCİLER"
order_cycle_ids: "Sipariş Dönemleri"
enterprise_fee_ids: "Ücret İsimleri"
shipping_method_ids: "Teslimat Yöntemleri"
@@ -67,12 +71,12 @@ tr:
schedule:
not_coordinated_by_shop: "%{shop} tarafından koordine edilmiyor"
payment_method:
not_available_to_shop: "%{shop} tarafından kullanılamıyor"
not_available_to_shop: "%{shop} için müsait değil"
invalid_type: "Nakit veya online ödeme yöntemi olmalıdır"
charges_not_allowed: "^ Bu müşteri tarafından kredi kartı ile ödeme yöntemi kabul edilmemektedir."
charges_not_allowed: "^ Bu müşteri tarafından kredi kartı ücretlendirme kabul edilmemektedir."
no_default_card: "^ Bu müşteri için kayıtlı kart bulunmuyor"
shipping_method:
not_available_to_shop: "%{shop} tarafından kullanılamıyor"
not_available_to_shop: "%{shop} için kullanıma uygun değil"
devise:
confirmations:
send_instructions: "Birkaç dakika içinde, hesabınızı nasıl doğrulayacağınız ile ilgili talimatları içeren bir e-posta alacaksınız."
@@ -118,7 +122,7 @@ tr:
welcome:
subject: "%{enterprise} şimdi %{sitename} 'de"
email_welcome: "Hoşgeldiniz"
email_registered: "şimdi şunun bir parçası"
email_registered: "şimdi bir parçası"
email_userguide_html: "Tezgah veya Pazar hesapları ayarları ile ilgili ayrıntılı desteğe sahip Kullanıcı Kılavuzu burada: %{link}"
userguide: "Açık Gıda Ağı Kullanıcı Kılavuzu"
email_admin_html: "%{link}'dan oturum açarak veya ana sayfanın sağ üst kısmındaki ayarlar simgesini tıkladıktan sonra Yönetim' butonu üzerinden hesabınızı yönetebilirsiniz."
@@ -137,8 +141,8 @@ tr:
shipment_summary: "Teslimat Özeti"
subject: "Teslimat Bildirimi"
thanks: "İş birliğiniz için teşekkür ederim."
track_information: "Kargo Takip Bilgileri: %{tracking}"
track_link: "Kargo Takip Bağlantısı: %{url}"
track_information: "Takip Bilgileri: %{tracking}"
track_link: "Takip Bağlantısı: %{url}"
subscription_mailer:
placement_summary_email:
subject: Yakın zamanda oluşturulan üye siparişlerinin bir özeti
@@ -149,7 +153,7 @@ tr:
greeting: "Merhaba %{name},"
intro: "Aşağıda, %{shop} için yeni tamamlanmış olan üye siparişlerinin bir özeti bulunmaktadır."
summary_overview:
total: Otomatik işlem için toplam %{count} üye işaretlendi.
total: Otomatik işlem için toplam %{count} üyelik işaretlendi.
success_zero: Bunlardan hiçbiri başarıyla işlenmedi.
success_some: Bunlardan %{count} işlem başarıyla tamamlandı.
success_all: Hepsi başarıyla işlendi.
@@ -176,10 +180,10 @@ tr:
explainer: Bu siparişlerin otomatik olarak işlenmesi bilinmeyen bir nedenden dolayı başarısız oldu. Bu gerçekleşmemesi gereken bir durum, bu hatayı alıyorsanız lütfen bizimle iletişime geçin.
home: "AGA"
title: ık Gıda Ağı
welcome_to: '''na Hoşgeldiniz'
site_meta_description: "Açık Gıda Ağı, farklı ülkelerdeki temiz gıda üreticileri ve yazılımcılar tarafından yeni bir gıda sistemi oluşturmak üzere tasarlandı. Üretici ve türeticilerin bir araya gelerek aracısız bir gıda düzeni ile her açıdan daha sağlıklı bir toplum yaratmaları için çözümler sunar. Toplum yararına çalışır ve tamamen şeffaftır."
welcome_to: 'Hoşgeldiniz'
site_meta_description: "Açık Gıda Ağı, adil ve temiz bir gıda sistemi oluşturmak için tasarlanan bir sosyal girişim projesidir. Üretici ve türeticilerin bir araya gelerek aracısız bir gıda düzeni ile her açıdan daha sağlıklı bir toplum yaratmaları için çözümler sunar. Kar amacı gütmez, toplum yararına çalışır, iletişim, dürüstlük ve dayanışmayı destekler."
search_by_name: İsim veya konuma göre arama yapın...
producers_join: Yerel ve temiz üreticiler şimdi Açık Gıda Ağı'na katılabilirler.
producers_join: Temiz gıda üreticileri!ık Gıda Ağı sizler için kullanıma açıldı.
charges_sales_tax: KDV Uyguluyor mu?
print_invoice: "Faturayı yazdır"
print_ticket: "Etiketi Yazdır"
@@ -188,13 +192,13 @@ tr:
resend_confirmation: "Onayı Tekrar Gönderin"
view_order: "Siparişi Görüntüle"
edit_order: "Siparişi Düzenle"
ship_order: "Siparişi Teslim Et"
ship_order: "Siparişi Gönder"
cancel_order: "Siparişi İptal Et"
confirm_send_invoice: "Bu siparişin faturası müşteriye gönderilecek. Devam etmek istiyor musunuz?"
confirm_resend_order_confirmation: "Sipariş onayı e-postasını tekrar göndermek istediğinizden emin misiniz?"
must_have_valid_business_number: "Faturaların gönderilebilmesi için %{enterprise_name} adına geçerli bir VKN/TCKN olmalı."
invoice: "Fatura"
more: "Daha Fazla?"
more: "Daha Fazla"
say_no: "Hayır"
say_yes: "Evet"
ongoing: Devam eden
@@ -220,7 +224,7 @@ tr:
enterprise_groups: Gruplar
reports: Raporlar
variant_overrides: Stok
import: İçe Aktar
import: Aktar
spree_products: Spree Ürünleri
all: Hepsi
current: Güncel
@@ -237,20 +241,22 @@ tr:
items: Kalemler
summary: Özet
detailed: Detaylı
updated: Güncellenmiş
updated: Güncel
'yes': "Evet"
'no': "Hayır"
y: 'Y'
n: 'N'
powered_by: Tarafından desteklenmektedir
y: 'E'
n: 'H'
powered_by: Destekleyici
blocked_cookies_alert: "Tarayıcınız bu ekranı kullanmak için gereken çerezleri engelliyor olabilir. Çerezlere izin vermek ve sayfayı yeniden yüklemek için aşağıya tıklayın."
allow_cookies: "Çerezlere izin ver"
notes: Notlar
error: Hata
processing_payment: "Ödeme İşlemi Gerçekleştiriliyor.."
no_pending_payments: "Bekleyen ödeme yok"
invalid_payment_state: "Geçersiz ödeme durumu"
filter_results: Sonuçları Filtrele
quantity: Miktar
pick_up: Teslimat Noktası
pick_up: Teslim Alma
copy: Kopyala
change_my_password: "Şifremi Değiştir"
update_password: "Şifreyi Güncelle"
@@ -258,8 +264,8 @@ tr:
reset_password_token: Şifre kodunu sıfırla
expired: Süresi doldu, lütfen yeni bir tane isteyin
back_to_payments_list: "Ödeme Listesine Geri Dön"
maestro_or_solo_cards: "Maestro / Solo kartları"
backordered: "Bekleyen Sipariş"
maestro_or_solo_cards: "Ödeme kartları"
backordered: "Bakiye Sipariş"
on hand: "Mevcut"
ship: "Teslimat"
actions:
@@ -272,13 +278,13 @@ tr:
delete: "Sil"
admin:
begins_at: Başlangıç
begins_on: Başlangıç
begins_on: Başlangıç vakti
customer: Müşteri
date: Tarih
email: E-posta
ends_at: Bitiş
ends_on: 'Bitiş '
name: Ad
ends_on: Bitiş vakti
name: İsim
on_hand: Mevcut
on_demand: Talep Üzerine
on_demand?: Talep Üzerine?
@@ -296,7 +302,7 @@ tr:
shipping_method: Teslimat Yöntemi
shop: Tezgah
sku: Stok Kodu
status_state: Şehir
status_state: Durum
tags: Etiketler
variant: Varyant
weight: ırlık
@@ -342,11 +348,11 @@ tr:
enable_receipt_printing?: "Sipariş listesinde termal yazıcılar kullanarak makbuz yazdırma seçeneklerini göster?"
stripe_connect_settings:
edit:
title: "Şerit Bağlantısı"
title: "Ödeme Bağlantısı"
settings: "Ayarlar"
stripe_connect_enabled: Satıcıların Stripe Connect kullanarak ödeme kabul etmesine izin verilsin mi?
no_api_key_msg: Bu işletme için Stripe hesabı yok.
configuration_explanation_html: Stripe Connect entegrasyonunu yapılandırma hakkında ayrıntılı talimatlar için lütfen <a href='https://github.com/openfoodfoundation/openfoodnetwork/wiki/Setting-up-Stripe-on-an-OFN-instance' target='_blank'>bu kılavuza bakın</a> .
stripe_connect_enabled: Satıcıların online ödeme kullanarak ödeme kabul etmesine izin verilsin mi?
no_api_key_msg: Bu işletme için online ödeme hesabı yok.
configuration_explanation_html: Online ödeme entegrasyonunu yapılandırma hakkında ayrıntılı talimatlar için lütfen <a href='https://github.com/openfoodfoundation/openfoodnetwork/wiki/Setting-up-Stripe-on-an-OFN-instance' target='_blank'>bu kılavuza bakın</a> .
status: Durum
ok: Tamam
instance_secret_key: Örnek Gizli Anahtarı
@@ -355,7 +361,7 @@ tr:
charges_enabled: Ücretlendirmeler Etkin
charges_enabled_warning: "Uyarı: Hesabınız için ücretlendirmeler etkin değil"
auth_fail_error: Girdiğiniz API anahtarı geçersiz
empty_api_key_error_html: Stripe API anahtarı sağlanmadı. API anahtarınızı ayarlamak için lütfen <a href="https://github.com/openfoodfoundation/openfoodnetwork/wiki/Setting-up-Stripe-on-an-OFN-instance" target="_blank">bu talimatları</a> izleyin
empty_api_key_error_html: Ödeme API anahtarı sağlanmadı. API anahtarınızı ayarlamak için lütfen <a href="https://github.com/openfoodfoundation/openfoodnetwork/wiki/Setting-up-Stripe-on-an-OFN-instance" target="_blank">bu talimatları</a> izleyin
matomo_settings:
edit:
title: "Matomo Ayarları"
@@ -390,12 +396,12 @@ tr:
header: Başlık
home_page: Ana Sayfa
producer_signup_page: Üretici kayıt sayfası
hub_signup_page: Pazar Yeri kayıt sayfası
hub_signup_page: Pazar kayıt sayfası
group_signup_page: Grup kayıt sayfası
main_links: Ana Menü Bağlantıları
footer_and_external_links: Altbilgi ve Dış Bağlantılar
your_content: İçeriğiniz
user_guide: Kullanici Rehberi
user_guide: Kullanici Kılavuzu
enterprise_fees:
index:
title: "İşletme Ücretleri"
@@ -470,8 +476,8 @@ tr:
index:
notice: "Dikkat"
beta_notice: "Bu özellik hala beta sürümündedir: kullanırken bazı hatalarla karşılaşabilirsiniz. Lütfen teknik destek için iletişime geçmekten çekinmeyin."
select_file: Yüklemek için bir çizelge seçin
spreadsheet: Çizelge
select_file: Yüklemek için bir dosya seçin
spreadsheet: Dosya
choose_import_type: İçe aktarım türünü seçin
import_into: İçe aktarım türü
product_list: Ürün listesi
@@ -484,7 +490,7 @@ tr:
category_values: Mevcut Kategori Değerleri
product_categories: Ürün Kategorileri
tax_categories: Vergi Kategorileri
shipping_categories: Nakliye Kategorileri
shipping_categories: Teslimat Kategorileri
import:
review: İncele
import: İçe Aktar
@@ -509,7 +515,7 @@ tr:
overwrite_empty: Boşsa üzerine yaz
default_stock: Stok seviyesini ayarla
default_tax_cat: Vergi kategorisini ayarla
default_shipping_cat: Nakliye kategorisi belirle
default_shipping_cat: Teslimat kategorisi belirle
default_available_date: Tarih belirle
validation_overview: İçe aktarım doğrulaması gözden geçirme
entries_found: İçe aktarılan dosyada bulunan girişler
@@ -592,7 +598,7 @@ tr:
variants_without_unit_value: "UYARI: Bazı varyantların birim değeri yok"
select_variant: "Bir varyant seçin"
enterprise:
select_outgoing_oc_products_from: sipariş döneminde dıları gidecek ürünleri şurdan seçin
select_outgoing_oc_products_from: Sipariş dönemi giden ürünleri şurdan seçin
enterprises:
index:
title: İşletmeler
@@ -635,7 +641,7 @@ tr:
promo_image_placeholder: 'Bu görsel ''Hakkımızda'' kısmında görüntülenir'
promo_image_note1: 'DİKKAT:'
promo_image_note2: Kapak resmi 1200 x 260 formatına göre kırpılacaktır.
promo_image_note3: Kapak resmi, bir işletmenin profil sayfasının üstünde görüntülenir.
promo_image_note3: Kapak resmi, işletmenin profil sayfasının üstünde görüntülenir.
inventory_settings:
text1: Stok seviyelerini ve fiyatları şuradan yönetebilirsiniz
inventory: Stok
@@ -644,8 +650,8 @@ tr:
ürünün satış listenize eklenmeden önce Stok listenize eklenip eklenmemesi
gerektiğini seçebilirsiniz. Eğer ürünlerinizi yönetmek için Stok sistemini
kullanmıyorsanız 'tavsiye edilen' seçeneği ile devam etmeniz gerekir.
preferred_product_selection_from_inventory_only_yes: Tezgahınıza yeni ürünler eklenebilir (önerilir)
preferred_product_selection_from_inventory_only_no: Yeni ürünler tezgahınıza eklemeden önce Stok listesine girilmelidir
preferred_product_selection_from_inventory_only_yes: Vitrininize yeni ürünler eklenebilir (önerilir)
preferred_product_selection_from_inventory_only_no: Yeni ürünler vitrininize eklemeden önce Stok listesine girilmelidir
payment_methods:
name: Ad
applies: Uygulanma?
@@ -670,13 +676,13 @@ tr:
visible_in_search: Haritada görünsün mü?
visible_in_search_tip: Sitede arama yapılırken bu işletmenin müşteriler tarafından görünür olup olmayacağını belirler.
visible: Görünür
not_visible: Görünmez
not_visible: Gizli
permalink: Bağlantı Adı (boşluk yok)
permalink_tip: "Bağlantı adı, mağazanızın bağlantı URL'sini oluşturmak için kullanılır: %{link}sectiginiz-ad/tezgah"
link_to_front: Tezgah linkiniz
link_to_front_tip: ık Gıda Ağındaki tezgahınıza doğrudan bağlantı linki
ofn_uid: AGA KN
ofn_uid_tip: ık Gıda Topluluğu'na kayıtlı işletmenize özel tanımlanan kimlik numarası
ofn_uid_tip: ık Gıda ı'na kayıtlı işletmenize özel tanımlanan kimlik numarası
shipping_methods:
name: Ad
applies: Uygulanma?
@@ -702,16 +708,16 @@ tr:
enable_subscriptions_tip: "Üyelik işlevselliği etkinleştirilsin mi?"
enable_subscriptions_false: "Kapalı"
enable_subscriptions_true: "Etkin"
shopfront_message: "Tezgah Mesajınız"
shopfront_message: "Vitrin Mesajınız"
shopfront_message_placeholder: >
Müşterilerinize merhaba diyebilir, tezgahınız ve alışveriş şartlarınız
ile ilgili bilgi verebilirsiniz. Yazdıklarınız, müşteriler tezgahınızı
ile ilgili bilgi verebilirsiniz. Yazdıklarınız, müşteriler vitrininizi
ziyaret ettiğinde görünür olacak.
shopfront_message_link_tooltip: "Bağlantı ekle / düzenle"
shopfront_message_link_prompt: "Lütfen eklemek için bir URL girin"
shopfront_closed_message: "Kapalı Tezgah Mesajı"
shopfront_closed_message: "Kapalı Vitrin Mesajı"
shopfront_closed_message_placeholder: >
Tezgahınızın neden satışa kapalı olduğunu ve ne zaman açılacağını müşterilerinize
Vitrininizin neden satışa kapalı olduğunu ve ne zaman açılacağını müşterilerinize
ıklayan bir mesaj yazın. Bu mesaj, açık sipariş döneminiz olmadığında
sizi ziyaret edenler tarafından görülecek.
shopfront_category_ordering: "Vitrin Kategori Sıralaması"
@@ -723,15 +729,15 @@ tr:
facebook_placeholder: "Örn: www.facebook.com/TurkiyeKoop"
linkedin_placeholder: "Örn: www.linkedin.com/in/adınızsoyadınız"
stripe_connect:
connect_with_stripe: "Stripe ile bağlan"
stripe_connect_intro: "Kredi kartı ile ödeme kabul etmek için, şerit hesabınızıık Gıda Ağına bağlamanız gerekir. Başlamak için sağdaki düğmeyi kullanın."
stripe_account_connected: "Stripe hesabı bağlı."
connect_with_stripe: "Iyzico sistemi ile bağlan"
stripe_connect_intro: "Kredi kartı ile ödeme kabul etmek için, Iyzico hesabınızıık Gıda Ağına bağlamanız gerekir. Başlamak için sağdaki düğmeyi kullanın."
stripe_account_connected: "Iyzico hesabı bağlı."
disconnect: ıkış yap"
confirm_modal:
title: Stripe ile bağlan
part1: Stripe, AGA'ya kayıtlı satıcıların, müşterilerinden kredi kartı ödemelerini kabul etmelerine imkan veren bir hizmet sağlayıcıdır.
part2: Bu özelliği kullanmak için Stripe hesabınızı AGA'ya bağlamanız gerekir. Aşağıdaki 'Kabul Ediyorum' butonunu tıkladığınızda, mevcut bir Stripe hesabını bağlayabileceğiniz Stripe web sitesine yönlendirilir veya hesabınız yoksa yeni bir tane oluşturabilirsiniz.
part3: AGA'nın müşterilerden sizin adınıza kredi kartı ödemelerini kabul etmesini sağlayacaktır. Kendi Stripe hesabınızı korumanız, Stripe ücretlerini ödemeniz ve ters ibrazları ve müşteri hizmetlerini kendiniz ele almanız gerektiğini lütfen unutmayın.
title: Iyzico ile bağlan
part1: Iyzico, AGA'ya kayıtlı satıcıların, müşterilerinden kredi kartı ödemelerini kabul etmelerine imkan veren bir hizmet sağlayıcıdır.
part2: Bu özelliği kullanmak için Iyzico hesabınızı AGA'ya bağlamanız gerekir. Aşağıdaki 'Kabul Ediyorum' butonunu tıkladığınızda, mevcut bir Iyzico hesabını bağlayabileceğiniz Iyzico web sitesine yönlendirilir veya hesabınız yoksa yeni bir tane oluşturabilirsiniz.
part3: AGA'nın müşterilerden sizin adınıza kredi kartı ödemelerini kabul etmesini sağlayacaktır. Kendi Iyzico hesabınızı korumanız, Iyzico ücretlerini ödemeniz ve ters ibrazları ve müşteri hizmetlerini kendiniz ele almanız gerektiğini lütfen unutmayın.
i_agree: Onaylıyorum
cancel: İptal Et
tag_rules:
@@ -782,7 +788,7 @@ tr:
producer_profile: Üretici Profili
connect_ofn: AGA üzerinden bağlan
always_free: HER ZAMAN ÜCRETSİZ
producer_description_text: Ürünlerinizi Açık Gıda Ağı'na yükleyin. Böylece ürünleriniz ortak hesaplar üzerinden satışa sunulabilir.
producer_description_text: Ürünlerinizi Açık Gıda Ağı'na yükleyin. Böylece ürünleriniz pazar hesapları üzerinden satışa sunulabilir.
producer_shop: Üretici Tezgahı
sell_your_produce: Kendi ürününü sat
producer_shop_description_text: ık Gıda Ağı üzerinden açtığınız bireysel tezgahınız ile ürünlerinizi doğrudan müşterilere ulaştırabilirsiniz.
@@ -864,6 +870,7 @@ tr:
distributor: "Dağıtımcı"
products: "Ürünler"
tags: "Etiketler"
delivery_details: "Teslimat Detayları"
fees: "Ücretler"
previous: "Önceki"
save: "Kaydet"
@@ -916,8 +923,8 @@ tr:
schedules: Takvimler
new_schedule: Yeni Takvim
name_and_timing_form:
name: ad
orders_open: 'Siparişler şu zamanda açık:'
name: Ad
orders_open: 'Siparişılma vakti:'
coordinator: Koordinatör
orders_close: Siparişler kapalı
row:
@@ -950,7 +957,7 @@ tr:
could_not_resume_the_order: Sipariş sürdürülemedi
shared:
user_guide_link:
user_guide: Kullanici rehberi
user_guide: Kullanıcı Kılavuzu
enterprises_hubs_tabs:
has_no_payment_methods: "%{enterprise} için bir ödeme yöntemi yok"
has_no_shipping_methods: "%{enterprise} için bir teslimat yöntemi yok"
@@ -1030,7 +1037,7 @@ tr:
enable_subscriptions_step_1_html: 1. %{enterprises_link} sayfasına gidin, tezgahınızı bulun ve Yöneti tıklayın
enable_subscriptions_step_2: '''Tezgah Tercihleri'' altındaki Üyelikler seçeneğini etkinleştirin'
set_up_shipping_and_payment_methods_html: '%{shipping_link} ve %{payment_link} yöntemlerini ayarlayın'
set_up_shipping_and_payment_methods_note_html: Yalnızca Nakit ve Şerit ödeme yöntemlerinin <br />'ü üyeliklerle kullanılabilir
set_up_shipping_and_payment_methods_note_html: Yalnızca Nakit ve Online ödeme yöntemlerinin <br />'ü üyeliklerle kullanılabilir
ensure_at_least_one_customer_html: En az bir %{customer_link} bulunduğundan emin olun
create_at_least_one_schedule: En az bir Takvim oluşturun
create_at_least_one_schedule_step_1_html: 1. %{order_cycles_link} sayfasına gidin
@@ -1055,7 +1062,7 @@ tr:
details:
details: Bilgi
invalid_error: Hata! Lütfen zorunlu alanların tümünü doldurun ...
allowed_payment_method_types_tip: Şu anda yalnızca Nakit ve Stripe ödeme yöntemleri kullanılabilir
allowed_payment_method_types_tip: Şu anda yalnızca belirli ödeme yöntemleri kullanılabilir
credit_card: Kredi kartı
charges_not_allowed: Bu müşteri ücret yansıtılmasına izin vermiyor
no_default_card: Müşterinin tahsilat yapılabilecek bir kartı yok
@@ -1101,11 +1108,11 @@ tr:
associated_subscriptions_error: Bağlantılı üyelikler olduğu için bu takvim silinemiyor
controllers:
enterprises:
stripe_connect_cancelled: "Stripe bağlantısı iptal edildi"
stripe_connect_success: "Stripe hesabı başarıyla bağlandı"
stripe_connect_fail: Maalesef, Stripe hesabınızın bağlantısı başarısız oldu
stripe_connect_cancelled: "Iyzico bağlantısı iptal edildi"
stripe_connect_success: "Iyzico hesabı başarıyla bağlandı"
stripe_connect_fail: Maalesef, Iyzico hesabınızın bağlantısı başarısız oldu
stripe_connect_settings:
resource: Stripe Connect yapılandırması
resource: Iyzico yapılandırması
api:
enterprise_logo:
destroy_attachment_does_not_exist: "Logo mevcut değil"
@@ -1120,8 +1127,8 @@ tr:
failed: "Ödeme başarısız oldu. Siparişinizi işleme koyabilmemiz için lütfen bizimle iletişime geçin."
shops:
hubs:
show_closed_shops: "Kapalı pazarları göster"
hide_closed_shops: "Kapalı pazarları gizle"
show_closed_shops: "Kapalı dükkanları göster"
hide_closed_shops: "Kapalı dükkanları gizle"
show_on_map: "Tümünü haritada göster"
shared:
menu:
@@ -1143,7 +1150,7 @@ tr:
footer_contact_headline: "İrtibatta olalım"
footer_contact_email: "Bize e-posta gönderin"
footer_nav_headline: "Gezin"
footer_join_headline: "Bize katıl"
footer_join_headline: "Bize katılın"
footer_join_body: "Açık Gıda Ağı üzerinden aracısız, adil ve temiz gıdaya ulaşma yolları keşfedin."
footer_join_cta: "Daha fazlasını anlat!"
footer_legal_call: "Okuyun"
@@ -1157,7 +1164,7 @@ tr:
shop:
messages:
login: "oturum aç"
signup: "kaydol"
signup: "Kaydol"
contact: "İletişim"
require_customer_login: "Yalnızca onaylı müşteriler buradan alışveriş yapabilir."
require_login_html: "Zaten onaylanmış bir müşteriyseniz, devam etmek için %{login} veya %{signup}. Buradan alışveriş yapmaya başlamak ister misiniz? Lütfen katılmak için %{contact} %{enterprise} ile iletişime geçin."
@@ -1185,24 +1192,24 @@ tr:
invoice_issued_on: "Fatura Düznleme Tarihi"
order_number: "Fatura numarası:"
date_of_transaction: "İşlem tarihi:"
ticket_column_qty: "miktar"
ticket_column_item: "ürün"
ticket_column_qty: "Miktar"
ticket_column_item: "Ürün"
ticket_column_unit_price: "Birim fiyat"
ticket_column_total_price: "Toplam tutar"
menu_1_title: "Pazarlar"
menu_1_url: "/pazarlar"
menu_2_title: "harita"
menu_2_url: "/harita"
menu_3_title: "üreticiler"
menu_3_url: "/ üreticiler"
menu_1_title: "Pazar Yeri"
menu_1_url: "/shops"
menu_2_title: "HARİTA"
menu_2_url: "/map"
menu_3_title: "ÜRETİCİLER"
menu_3_url: "/producers"
menu_4_title: "Gruplar"
menu_4_url: "/ gruplar"
menu_4_url: "/groups"
menu_5_title: "hakkında"
menu_5_url: "https://about.openfoodnetwork.org.au/"
menu_5_url: "https://acikgida.com"
menu_6_title: "Bağlan"
menu_6_url: "https://openfoodnetwork.org/au/connect/"
menu_6_url: "https://acikgida.com"
menu_7_title: "öğren"
menu_7_url: "https://openfoodnetwork.org/au/learn/"
menu_7_url: "https://acikgida.com"
logo: "Logo (640x130)"
logo_mobile: "Cep telefonu logosu (75x26)"
logo_mobile_svg: "Cep Telefonu logo (SVG)"
@@ -1234,7 +1241,7 @@ tr:
postcode_placeholder: Örn. 16000
suburb: İlçe
state: Şehir
country: ülke
country: Ülke
unauthorized: Yetkisiz
terms_of_service: "Kullanım Şartları"
on_demand: Talep üzerine
@@ -1247,27 +1254,27 @@ tr:
days: günler
authorization_failure: "Yetki Hatası"
label_shop: "Pazar"
label_shops: "Pazarlar"
label_map: "harita"
label_shops: "Pazar Yeri"
label_map: "HARİTA"
label_producer: "Üretici"
label_producers: "üreticiler"
label_producers: "ÜRETİCİLER"
label_groups: "Gruplar"
label_about: "hakkında"
label_connect: "Bağlan"
label_learn: "öğren"
label_learn: "Öğren"
label_blog: "Blog"
label_support: "Destek"
label_shopping: "Alışveriş "
label_login: "Oturum aç"
label_logout: ıkış Yap"
label_signup: "kaydol"
label_administration: "yönetim"
label_admin: "yönetici"
label_account: "hesap"
label_signup: "Kaydol"
label_administration: "Yönetim"
label_admin: "Yönetici"
label_account: "Hesap"
label_more: "Daha fazla göster"
label_less: "Daha az göster"
label_notices: "Uyarılar"
cart_items: "ürünler"
cart_items: "Ürünler"
cart_headline: "Alışveriş sepetiniz"
total: "Toplam"
cart_updating: "Sepet güncelleniyor ..."
@@ -1277,7 +1284,7 @@ tr:
card_securitycode: "Güvenlik Kodu"
card_expiry_date: Son kullanma tarihi
card_masked_digit: "X"
card_expiry_abbreviation: "Tecrübe"
card_expiry_abbreviation: "Son kullanma tarihi"
new_credit_card: "Yeni kredi kartı"
my_credit_cards: Kredi kartlarım
add_new_credit_card: Yeni kredi kartı ekle
@@ -1337,12 +1344,12 @@ tr:
cookies_policy_link_desc: "Daha fazla bilgi edinmek istiyorsanız,"
cookies_policy_link: "çerezler politikası"
cookies_accept_button: "Çerezleri kabul et"
home_shop: Şimdi Alışveriş Yap
home_shop: ŞİMDİ ALIŞVERİŞ YAPIN
brandstory_headline: "Bağımsız, adil ve temiz gıda ..."
brandstory_intro: "Bazen sistemi düzeltmenin en iyi yolu yeni bir sistem yaratmaktır…"
brandstory_part1: "Açık Gıda Ağı, farklı ülkelerdeki temiz gıda üreticileri ve yazılımcılar tarafından yeni bir gıda sistemi oluşturmak üzere tasarlandı. Üretici ve türeticilerin bir araya gelerek aracısız bir gıda düzeni ile her açıdan daha sağlıklı bir toplum yaratmaları için çözümler sunar. Toplum yararına çalışır ve tamamen şeffaftır."
brandstory_part1: "Açık Gıda Ağı, adil ve temiz bir gıda sistemi oluşturmak için tasarlanan bir sosyal girişim projesidir. Üretici ve türeticilerin bir araya gelerek aracısız bir gıda düzeni ile her açıdan daha sağlıklı bir toplum yaratmaları için çözümler sunar. Kar amacı gütmez, toplum yararına çalışır, iletişim, dürüstlük ve dayanışmayı destekler."
brandstory_part2: "AGA, üreticilere ve alıcılara aracısız ticaret faydaları sağlar ve toplumsal iletişimi ve güveni cesaretlendirerek üretici-türetici ilişkisi oluşturmayı hedefler. Gıda yetiştiriciliği ve satışının kendine özgü ihtiyaçlarını karşılamaya ve sorunlarını çözmeye yönelik olarak tasarlanmıştır. Temiz gıdaya ulaşım sürecini ve yönetimini kolaylaştırır."
brandstory_part3: "Platform üzerinden yalnızca temiz gıda üreticileri satış yapabilir. Eğer siz de temiz gıda üreticisi iseniz, ürünlerinizi AGA üzerinden oluşturduğunuz tezgah ile doğrudan alıcılara ulaştırabilirsiniz. Dilerseniz bölgenizdeki diğer üreticiler ile bir araya gelerek kendi ortak 'Üretici Pazarı' nızı oluşturursunuz. Bu şekilde çeşitliliği ve bereketi artırır, dayanışmanın getirdiği diğer faydalardan da yararlanabilirsiniz."
brandstory_part3: "Platform üzerinden yalnızca temiz gıda üreticileri satış yapabilir. Eğer siz de temiz gıda üreticisi iseniz, ürünlerinizi AGA üzerinden oluşturduğunuz tezgah ile doğrudan alıcılara ulaştırabilirsiniz. Dilerseniz bölgenizdeki diğer üreticiler ile bir araya gelerek kendi ortak 'Üretici Pazarı' veya 'Türetici Pazarı' nızı oluşturursunuz. Bu şekilde çeşitliliği ve bereketi artırır, dayanışmanın getirdiği diğer faydalardan da yararlanabilirsiniz."
brandstory_part4: "Her yerde çalışıyor. Her şeyi değiştiriyor."
brandstory_part5_strong: "Biz buna Açık Gıda Ağı diyoruz."
brandstory_part6: "Hepimiz gıdamızı seviyoruz. Artık gıda sistemimizi de sevmeye başlayabiliriz."
@@ -1353,17 +1360,17 @@ tr:
system_headline: "Alışveriş - işte böyle çalışıyor."
system_step1: "1. Ara"
system_step1_text: "Yerel, adil, temiz ve mevsimsel gıda için, bağımsız ve cesur üreticilerimizin pazarlarından alışveriş yapın. Uzaklığa göre, ürün kategorisine veya teslimat tercihlerine göre arama yapabilirsiniz. "
system_step2: "2. Pazar"
system_step2: "2. Alışveriş Yap"
system_step2_text: "Gıdanızı yerel üretici tezgahlarından, üretici ve türetici pazarlarından temin edin. Yaşanabilir bir dünya için alışkanlıklarınızı şimdi değiştirin. Gıdanızın ve onu size getiren insanların hikayelerini öğrenin!"
system_step3: "Teslimat Noktası / Kargo"
system_step3_text: "Teslimat için bekleyin veya gıdanız ile daha kişisel bir bağ kurmak için üreticinizi veya pazarını ziyaret edin. Doğayla ve gıdayla istediğiniz şekilde ama gerçek bir bağ kurun."
system_step3: "3. Teslimat "
system_step3_text: "Gıdanıza ulaşmak için eve teslim edilmesini ya da kargoyu bekleyin veya gıdanız ile daha kişisel bir bağ kurmak için üreticinizi veya pazarını kendiniz ziyaret edin. Doğayla ve gıdayla istediğiniz şekilde ama gerçek bir bağ kurun. "
cta_headline: "Dünyayı daha iyi bir yer yapan alışveriş biçimi."
cta_label: "Hazırım"
stats_headline: "Yeni bir gıda sistemi yaratıyoruz."
stats_producers: "gıda üreticileri"
stats_producers: "GIDA ÜRETİCİLERİ"
stats_shops: "gıda pazarları"
stats_shoppers: "gıda alıcıları"
stats_orders: "gıda siparişleri"
stats_orders: "GIDA SİPARİŞLERİ"
checkout_title: Ödeme Yap
checkout_now: Şimdi ödeme yap
checkout_order_ready: Sipariş şu tarihte hazır
@@ -1490,6 +1497,7 @@ tr:
shopping_oc_closed_description: "Lütfen bir sonraki dönem açılana kadar bekleyin (veya geç siparişleri kabul edip edemeyeceğimizi görmek için doğrudan bizimle iletişime geçin)"
shopping_oc_last_closed: "Son dönem %{distance_of_time} önce kapandı"
shopping_oc_next_open: "Bir sonraki dönem %{distance_of_time}'da açılıyor"
shopping_oc_select: "Seçin..."
shopping_tabs_home: "Ana sayfa"
shopping_tabs_shop: "Alışveriş yap"
shopping_tabs_about: "hakkında"
@@ -1510,11 +1518,11 @@ tr:
hubs_profile_only: "Yalnızca profil"
hubs_delivery_options: "Teslimat seçenekleri"
hubs_pickup: "Teslimat Noktası"
hubs_delivery: "teslimat"
hubs_delivery: "Eve Teslim"
hubs_producers: "Üreticilerimiz"
hubs_filter_by: "filtre"
hubs_filter_type: "yazın"
hubs_filter_delivery: "teslimat"
hubs_filter_by: "Filtrele"
hubs_filter_type: "Ürün Çeşidi"
hubs_filter_delivery: "Eve Teslim"
hubs_filter_property: "Özellik"
hubs_matches: "Bunu mu arıyordunuz?"
hubs_intro: Bulunduğunuz bölgeden alışveriş yapın
@@ -1539,7 +1547,7 @@ tr:
products_update_error_msg: "Kaydetme başarısız oldu."
products_update_error_data: "Geçersiz veriler nedeniyle kaydetme başarısız oldu:"
products_changes_saved: "Değişiklikler kaydedildi."
search_no_results_html: "Üzgünüz, %{query} için sonuç bulunamadı. Başka bir arama yapmak ister misiniz?"
search_no_results_html: "Üzgünüz, %{query} sonuç bulunamadı. Başka bir arama yapmak ister misiniz?"
components_profiles_popover: "Açık Gıda Ağında bir vitrini olmayan ancak başka bir sitede kendi satış siteleri olan hesaplar"
components_profiles_show: "Profilleri göster"
components_filters_nofilters: "Filtresiz"
@@ -1599,7 +1607,7 @@ tr:
producers_contact_phone: Ara
producers_contact_social: Takip et
producers_buy_at_html: "%{enterprise} ürünleri için buradan alışveriş yapın:"
producers_filter: Filtre
producers_filter: Filtrele
producers_filter_type: tür
producers_filter_property: Özellik
producers_title: Üreticiler
@@ -1632,12 +1640,12 @@ tr:
sell_hubs_detail: "AGA üzerinden gıda işletmeniz veya topluluğunuz için bir profil oluşturun. İstediğiniz zaman profilinizi çok üreticili bir pazara yükseltebilirsiniz."
sell_groups_detail: "Bölgenizdeki veya ağınızdaki işletmelerin (üreticilerin, pazarların veya diğer grupların) detaylı rehber listesini oluşturun."
sell_user_guide: "Kullanım kılavuzumuzda daha fazla bilgi edinin."
sell_listing_price: "AGA üzerinde görünür olmak ücretsizdir. OFN&#39;de bir mağaza açmak ve işletmek aylık 500 dolara kadar ücretsizdir. Daha fazla satıyorsanız, satışların% 1&#39;i ile% 3&#39;ü arasında topluluk katkınızı seçebilirsiniz. Fiyatlandırma hakkında daha fazla bilgi için, üst menüdeki Hakkında bağlantısını kullanarak Yazılım Platformu bölümünü ziyaret edin."
sell_listing_price: "AGA üzerinde görünür olmak ücretsizdir. Fiyatlandırma hakkında daha fazla bilgi için, üst menüdeki Hakkında bağlantısını kullanarak Yazılım Platformu bölümünü ziyaret edin."
sell_embed: "Açık Gıda Ağı üzerinden oluşturduğunuz tezgahınızı kendi web siteniz üzerinden de kullanmanıza yardımcı olabiliriz. Müşterileriniz mevcut internet siteniz üzerinden de aynı şekilde sipariş verebilirler. "
sell_ask_services: "Bize AGA hizmetleri hakkında soru sorun."
shops_title: Mağazalar
shops_title: Dükkanlar
shops_headline: Alışveriş biçim değiştiriyor
shops_text: Gıdalar döngüler halinde büyür, çiftçiler döngüler halinde hasat eder ve döngüler halinde yiyecek sipariş ederiz. Sipariş döngüsünün kapalı olduğunu fark ederseniz, kısa süre sonra tekrar kontrol edin.
shops_text: Gıda dönemsel yetiştirilir, dönemsel hasat edilir ve dönemsel sipariş edilir. Aradığınız sipariş dönemi kapalı ise kısa süre sonra tekrar kontrol edin.
shops_signup_title: Pazar olarak kaydolun
shops_signup_headline: Gıda pazarları, sınır yok.
shops_signup_motivation: Her türlü gıda işletmesi/topluluğu modelini destekliyoruz. Bağımsız ve şeffaf bir sosyal girişimiz. İşlerinizi kolaylaştırmaya çalışan yol arkadaşlarıyız.
@@ -1736,9 +1744,9 @@ tr:
email_required: "Bir e-posta adresi sağlamalısınız"
logging_in: "Biraz bekleyin, giriş yapıyoruz"
signup_email: "E-posta adresiniz"
choose_password: "bir şifre Şeçin"
choose_password: "Bir şifre seçin"
confirm_password: "Şifreyi Onayla"
action_signup: "Şimdi üye Ol"
action_signup: "Şimdi Üye Ol"
forgot_password: "Parolanızı mı unuttunuz?"
password_reset_sent: "Şifrenizi sıfırlama talimatlarını içeren bir e-posta gönderildi!"
reset_password: "Şifreyi yenile"
@@ -1863,6 +1871,7 @@ tr:
headline: "Tamamlandı!"
thanks: "%{enterprise} ile ilgili ayrıntıları doldurduğunuz için teşekkür ederiz."
login: "Dilediğiniz zaman Açık Gıda Ağı üzerinden giriş yapıp Yönetici paneline giderek işletmenizin ayarlarını güncelleyebilirsiniz."
action: "İşletme Paneline Git"
back: "Geri"
continue: "Devam et"
action_or: "VEYA"
@@ -2056,7 +2065,7 @@ tr:
report_customers_cycle: "Sipariş Dönemi"
report_customers_type: "Rapor türü"
report_customers_csv: "Csv olarak indir"
report_producers: "üreticiler:"
report_producers: "ÜRECİTİLER:"
report_type: "Rapor türü:"
report_hubs: "Pazarlar:"
report_payment: "Ödeme yöntemleri:"
@@ -2279,6 +2288,7 @@ tr:
enterprise_register_success_notice: "Tebrikler! %{enterprise}için kayıt tamamlandı!"
enterprise_bulk_update_success_notice: "İşletmeler başarıyla güncellendi"
enterprise_bulk_update_error: 'Güncelleştirme başarısız'
enterprise_shop_show_error: "Aradığınız dükkan AGA üzerinde bulunamıyor veya gizli durumda. Lütfen diğerlerini kontrol edin."
order_cycles_create_notice: 'Sipariş döneminiz oluşturuldu.'
order_cycles_update_notice: 'Sipariş döneminiz güncellendi.'
order_cycles_bulk_update_notice: 'Sipariş dönemleri güncellendi.'
@@ -2400,7 +2410,7 @@ tr:
ık Gıda Ağı, mümkün olduğunca çok gıda topluluğu/kooperatifi modelini
desteklemeye çalışır. Sizin de gıda topluluğunuzu veya gıda işletmenizi
en iyi şekilde yönetmeniz için tüm imkanları ve araçları sağlamaya hazırız.
get_listing: Giriş alın
get_listing: Görünür Olun
always_free: HER ZAMAN ÜCRETSİZ
sell_produce_others: Başkalarının ürünlerini sat
sell_own_produce: Kendi ürününü sat
@@ -2409,8 +2419,8 @@ tr:
producer: Üretici
producer_text1: >
Dürüst ve bilinçli üreticiler, insanlara sağlıklı gıdalar sağlar. Siz
de birşeyler yetiştiriyor, büyütüyor, sağıyor, hasat ediyor, pişiriyor
kurutuyor veya hazırlıyorsanız, üreticisiniz demektir.
de birşeyler yetiştiriyor, büyütüyor, sağıyor, hasat ediyor, pişiriyor,
kurutuyor veya hazırlıyorsanız, bir üreticisiniz demektir.
producer_text2: >
Üreticiler sistem üzerinde farklı şekillerde aktif olarak da hem kendilerine
hem de diğer işletmelere daha faydalı olabilirler. Çevrelerindeki üreticilerin
@@ -2421,9 +2431,9 @@ tr:
Üretici olmayan hesaplar kendi ürünleri olmadığı için Açık Gıda Ağı
üzerinden ürün oluşturamazlar.
non_producer_text2: >
Bunun yerine çevrelerindeki üreticiler adına sipariş ve teslimatları
yönetebilir, adil ve temiz gıdayı nihai tüketiciler ile buluşturmaya
yardımcı olabilirler.
Bunun yerine çevrelerindeki bulunan veya tedarikçileri olan üreticiler
adına sipariş ve teslimatları yönetebilir, adil ve temiz gıdayı nihai
tüketiciler ile buluşturmaya yardımcı olabilirler.
producer_desc: Gıda üreticileri
producer_example: 'Örn: ÇİFTÇİLER, FIRINLAR, ÜRETİM KOOPERATİFLERİ vs.'
non_producer_desc: Diğer tüm gıda işletmeleri
@@ -2469,7 +2479,7 @@ tr:
cart: "sepet"
complete: "tamamla"
confirm: "onayla"
delivery: "teslimat"
delivery: "Eve Teslim"
paused: "Durduruldu"
payment: "ödeme"
pending: "Bekliyor"
@@ -2718,7 +2728,7 @@ tr:
shipment_inc_vat: "KDV dahil teslimat"
shipping_tax_rate: "Kargo Vergi Oranı"
category: "Kategori"
delivery: "teslimat"
delivery: "Eve Teslim"
temperature_controlled: "Soğuk Sevkiyat"
new_product: "Yeni ürün"
administration: "yönetim"
@@ -2859,7 +2869,7 @@ tr:
shipping_methods: "Teslimat Yöntemleri"
shipping_categories: "Nakliye Kategorileri"
new_shipping_category: "Yeni Nakliye Kategorisi"
back_to_shipping_categories: "Nakliye Kategorilerine Geri Dön"
back_to_shipping_categories: "Teslimat Kategorilerine Geri Dön"
analytics_trackers: "Analitik İzleyiciler"
no_trackers_found: "İzleyici Bulunamadı"
new_tracker: "Yeni İzleyici"
@@ -2868,7 +2878,7 @@ tr:
back_to_trackers_list: "İzleyiciler Listesine Geri Dön"
name: "ad"
description: "Açıklama"
type: "tür"
type: "Çeşit"
default: "varsayılan"
calculator: "Hesaplama"
zone: "bölge"
@@ -2890,7 +2900,7 @@ tr:
normal_amount: "Normal Tutar"
discount_amount: "İndirim tutarı"
no_images_found: "Resim Bulunamadı"
new_image: "Yeni görüntü"
new_image: "Yeni Görüntü"
filename: "Dosya adı"
alt_text: "alternatif metin"
thumbnail: "Küçük görsel"
@@ -3017,6 +3027,8 @@ tr:
tax_invoice: "VERGİ FATURASI"
code: "Kod"
from: "İtibaren"
to: "Fatura Adresi"
shipping: "Teslimat"
form:
distribution_fields:
title: "Dağıtım"
@@ -3095,8 +3107,8 @@ tr:
products:
image_upload_error: "Ürün resmi tanınamadı. Lütfen PNG veya JPG biçiminde bir resim yükleyin."
new:
title: "Yeni ürün"
new_product: "Yeni ürün"
title: "Yeni Ürün"
new_product: "Yeni Ürün"
supplier: "Tedarikçi"
product_name: "Ürün adı"
units: "Ölçü Birimi"
@@ -3128,7 +3140,7 @@ tr:
import_date: "İçe Aktarım Tarihi"
products_variant:
variant_has_n_overrides: "Bu varyant %{n} geçersiz kılınma özelliğine sahip"
new_variant: "Yeni varyant"
new_variant: "Yeni Varyant"
product_name: Ürün adı
primary_taxon_form:
product_category: Ürün Kategorisi
@@ -3219,7 +3231,7 @@ tr:
enter_new_card: Yeni bir kart için bilgileri girin
used_saved_card: "Kayıtlı bir kart kullanın:"
or_enter_new_card: "Veya yeni bir kart için bilgileri girin:"
remember_this_card: Bu kartı hatırlıyor musunuz?
remember_this_card: Bu kart hatırlansın mı?
date_picker:
format: '% Y-% A-%d'
js_format: 'yy-aa-gg'
@@ -3269,7 +3281,7 @@ tr:
cart: sepet
complete: tamamla
confirm: onayla
delivery: teslimat
delivery: Eve Teslim
paused: durduruldu
payment: ödeme
pending: bekliyor
@@ -3321,7 +3333,7 @@ tr:
until: Şu zamana kadar
past_orders:
order: Sipariş
shop: Dükkan
shop: Tezgah
completed_at: Tamamlanma Tarihi
items: Ürünler
total: Toplam

View File

@@ -154,12 +154,6 @@ Spree::Core::Engine.routes.draw do
resources :taxons
end
resources :taxons, :only => [] do
collection do
get :search
end
end
resources :tax_rates
resource :tax_settings
resources :tax_categories

View File

@@ -0,0 +1,5 @@
class AddUserIdIndexToSpreeOrders < ActiveRecord::Migration
def change
add_index :spree_orders, :user_id
end
end

View File

@@ -0,0 +1,5 @@
class AddSupplierIdIndexToSpreeProducts < ActiveRecord::Migration
def change
add_index :spree_products, :supplier_id
end
end

View File

@@ -0,0 +1,9 @@
class IncreaseCharactersOfLocaleInSpreeUsers < ActiveRecord::Migration
def up
change_column :spree_users, :locale, :string, limit: 6
end
def down
change_column :spree_users, :locale, :string, limit: 5
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20200327105910) do
ActiveRecord::Schema.define(:version => 20200406085833) do
create_table "adjustment_metadata", :force => true do |t|
t.integer "adjustment_id"
@@ -575,6 +575,7 @@ ActiveRecord::Schema.define(:version => 20200327105910) do
add_index "spree_orders", ["distributor_id"], :name => "index_spree_orders_on_distributor_id"
add_index "spree_orders", ["number"], :name => "index_orders_on_number"
add_index "spree_orders", ["order_cycle_id"], :name => "index_spree_orders_on_order_cycle_id"
add_index "spree_orders", ["user_id"], :name => "index_spree_orders_on_user_id"
create_table "spree_payment_methods", :force => true do |t|
t.string "type"
@@ -724,6 +725,7 @@ ActiveRecord::Schema.define(:version => 20200327105910) do
add_index "spree_products", ["permalink"], :name => "index_products_on_permalink"
add_index "spree_products", ["permalink"], :name => "permalink_idx_unique", :unique => true
add_index "spree_products", ["primary_taxon_id"], :name => "index_spree_products_on_primary_taxon_id"
add_index "spree_products", ["supplier_id"], :name => "index_spree_products_on_supplier_id"
create_table "spree_products_promotion_rules", :id => false, :force => true do |t|
t.integer "product_id"
@@ -1045,7 +1047,7 @@ ActiveRecord::Schema.define(:version => 20200327105910) do
t.datetime "reset_password_sent_at"
t.string "api_key", :limit => 40
t.integer "enterprise_limit", :default => 5, :null => false
t.string "locale", :limit => 5
t.string "locale", :limit => 6
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"

View File

@@ -8,62 +8,23 @@ module OrderManagement
end
def call!
create_payment
ensure_payment_source
return if order.errors.any?
payment = create_payment
return if @order.errors.any?
payment.update_attributes(amount: order.outstanding_balance)
payment.update_attributes(amount: @order.outstanding_balance)
payment
end
private
attr_reader :order
def payment
@payment ||= order.pending_payments.last
end
def create_payment
return if payment.present?
payment = @order.pending_payments.last
return payment if payment.present?
@payment = order.payments.create(
payment_method_id: order.subscription.payment_method_id,
amount: order.outstanding_balance
@order.payments.create(
payment_method_id: @order.subscription.payment_method_id
)
end
def card_required?
[Spree::Gateway::StripeConnect,
Spree::Gateway::StripeSCA].include? payment.payment_method.class
end
def card_set?
payment.source is_a? Spree::CreditCard
end
def ensure_payment_source
return unless card_required? && !card_set?
ensure_credit_card || order.errors.add(:base, :no_card)
end
def ensure_credit_card
return false if saved_credit_card.blank? || !allow_charges?
payment.update_attributes(source: saved_credit_card)
end
def allow_charges?
order.customer.allow_charges?
end
def saved_credit_card
order.user.default_card
end
def errors_present?
order.errors.any?
end
end
end
end

View File

@@ -0,0 +1,52 @@
# frozen_string_literal: true
module OrderManagement
module Subscriptions
class StripePaymentSetup
def initialize(order)
@order = order
@payment = @order.pending_payments.last
end
def call!
return if @payment.blank?
ensure_payment_source
@payment
end
private
def ensure_payment_source
return unless stripe_payment_method? && !card_set?
if saved_credit_card.present? && allow_charges?
use_saved_credit_card
else
@order.errors.add(:base, :no_card)
end
end
def stripe_payment_method?
[Spree::Gateway::StripeConnect,
Spree::Gateway::StripeSCA].include? @payment.payment_method.class
end
def card_set?
@payment.source.is_a? Spree::CreditCard
end
def saved_credit_card
@order.user.default_card
end
def allow_charges?
@order.customer.allow_charges?
end
def use_saved_credit_card
@payment.update_attributes(source: saved_credit_card)
end
end
end
end

View File

@@ -0,0 +1,22 @@
# frozen_string_literal: true
module OrderManagement
module Subscriptions
class StripeScaPaymentAuthorize
def initialize(order)
@order = order
@payment = @order.pending_payments.last
end
def call!
return unless @payment&.checkout?
@payment.authorize!
@order.errors.add(:base, I18n.t('authorization_failure')) unless @payment.pending?
@payment
end
end
end
end

View File

@@ -8,44 +8,6 @@ module OrderManagement
let(:order) { create(:order) }
let(:payment_setup) { OrderManagement::Subscriptions::PaymentSetup.new(order) }
describe "#payment" do
context "when only one payment exists on the order" do
let!(:payment) { create(:payment, order: order) }
context "where the payment is pending" do
it { expect(payment_setup.__send__(:payment)).to eq payment }
end
context "where the payment is failed" do
before { payment.update_attribute(:state, 'failed') }
it { expect(payment_setup.__send__(:payment)).to be nil }
end
end
context "when more that one payment exists on the order" do
let!(:payment1) { create(:payment, order: order) }
let!(:payment2) { create(:payment, order: order) }
context "where more than one payment is pending" do
it { expect([payment1, payment2]).to include payment_setup.__send__(:payment) }
end
context "where only one payment is pending" do
before { payment1.update_attribute(:state, 'failed') }
it { expect(payment_setup.__send__(:payment)).to eq payment2 }
end
context "where no payments are pending" do
before do
payment1.update_attribute(:state, 'failed')
payment2.update_attribute(:state, 'failed')
end
it { expect(payment_setup.__send__(:payment)).to be nil }
end
end
end
describe "#call!" do
let!(:payment){ create(:payment, amount: 10) }
@@ -68,161 +30,35 @@ module OrderManagement
context "when a payment is present" do
before { allow(order).to receive(:pending_payments).once { [payment] } }
context "when a credit card is not required" do
before do
allow(payment_setup).to receive(:card_required?) { false }
expect(payment_setup).to_not receive(:card_available?)
expect(payment_setup).to_not receive(:ensure_credit_card)
end
context "when the payment total doesn't match the outstanding balance on the order" do
before { allow(order).to receive(:outstanding_balance) { 5 } }
it "updates the payment total to reflect the outstanding balance" do
expect{ payment_setup.call! }.to change(payment, :amount).from(10).to(5)
end
end
context "when the payment total matches the outstanding balance on the order" do
before { allow(order).to receive(:outstanding_balance) { 10 } }
it "does nothing" do
expect{ payment_setup.call! }.to_not change(payment, :amount).from(10)
end
context "when the payment total doesn't match the outstanding balance on the order" do
before { allow(order).to receive(:outstanding_balance) { 5 } }
it "updates the payment total to reflect the outstanding balance" do
expect{ payment_setup.call! }.to change(payment, :amount).from(10).to(5)
end
end
context "when a credit card is required" do
before do
expect(payment_setup).to receive(:card_required?) { true }
end
context "when the payment total matches the outstanding balance on the order" do
before { allow(order).to receive(:outstanding_balance) { 10 } }
context "and the payment source is not a credit card" do
before { expect(payment_setup).to receive(:card_set?) { false } }
context "and no default credit card has been set by the customer" do
before do
allow(order).to receive(:user) { instance_double(Spree::User, default_card: nil) }
end
it "adds an error to the order and does not update the payment" do
expect(payment).to_not receive(:update_attributes)
expect{ payment_setup.call! }.to change(order.errors[:base], :count).from(0).to(1)
end
end
context "and the customer has not authorised the shop to charge to credit cards" do
before do
allow(order).to receive(:user) {
instance_double(Spree::User, default_card: create(:credit_card))
}
allow(order).to receive(:customer) {
instance_double(Customer, allow_charges?: false)
}
end
it "adds an error to the order and does not update the payment" do
expect(payment).to_not receive(:update_attributes)
expect{ payment_setup.call! }.to change(order.errors[:base], :count).from(0).to(1)
end
end
context "and an authorised default credit card is available to charge" do
before do
allow(order).to receive(:user) {
instance_double(Spree::User, default_card: create(:credit_card))
}
allow(order).to receive(:customer) {
instance_double(Customer, allow_charges?: true)
}
end
context "when the payment total doesn't match the order's outstanding balance" do
before { allow(order).to receive(:outstanding_balance) { 5 } }
it "updates the payment total to reflect the outstanding balance" do
expect{ payment_setup.call! }.to change(payment, :amount).from(10).to(5)
end
end
context "when the payment total matches the outstanding balance on the order" do
before { allow(order).to receive(:outstanding_balance) { 10 } }
it "does nothing" do
expect{ payment_setup.call! }.to_not change(payment, :amount).from(10)
end
end
end
end
context "and the payment source is already a credit card" do
before { expect(payment_setup).to receive(:card_set?) { true } }
context "when the payment total doesn't match the outstanding balance on the order" do
before { allow(order).to receive(:outstanding_balance) { 5 } }
it "updates the payment total to reflect the outstanding balance" do
expect{ payment_setup.call! }.to change(payment, :amount).from(10).to(5)
end
end
context "when the payment total matches the outstanding balance on the order" do
before { allow(order).to receive(:outstanding_balance) { 10 } }
it "does nothing" do
expect{ payment_setup.call! }.to_not change(payment, :amount).from(10)
end
end
it "does nothing" do
expect{ payment_setup.call! }.to_not change(payment, :amount).from(10)
end
end
end
end
describe "#ensure_credit_card" do
let!(:payment) { create(:payment, source: nil) }
before { allow(payment_setup).to receive(:payment) { payment } }
context "when more that one payment exists on the order" do
let!(:payment1) { create(:payment, order: order) }
let!(:payment2) { create(:payment, order: order) }
context "when no default credit card is found" do
before do
allow(order).to receive(:user) { instance_double(Spree::User, default_card: nil) }
allow(order).to receive(:outstanding_balance) { 7 }
allow(order).to receive(:pending_payments).once { [payment1, payment2] }
end
it "returns false and down not update the payment source" do
expect do
expect(payment_setup.__send__(:ensure_credit_card)).to be false
end.to_not change(payment, :source).from(nil)
end
end
context "when a default credit card is found" do
let(:credit_card) { create(:credit_card) }
before do
allow(order).to receive(:user) {
instance_double(Spree::User, default_card: credit_card)
}
end
context "and charge have not been authorised by the customer" do
before do
allow(order).to receive(:customer) {
instance_double(Customer, allow_charges?: false)
}
end
it "returns false and does not update the payment source" do
expect do
expect(payment_setup.__send__(:ensure_credit_card)).to be false
end.to_not change(payment, :source).from(nil)
end
end
context "and charges have been authorised by the customer" do
before do
allow(order).to receive(:customer) { instance_double(Customer, allow_charges?: true) }
end
it "returns true and stores the credit card as the payment source" do
expect do
expect(payment_setup.__send__(:ensure_credit_card)).to be true
end.to change(payment, :source_id).from(nil).to(credit_card.id)
end
it "updates the amount of the last payment to reflect the outstanding balance" do
payment_setup.call!
expect(payment1.amount).to eq 45.75
expect(payment2.amount).to eq 7
end
end
end

View File

@@ -0,0 +1,109 @@
# frozen_string_literal: true
require 'spec_helper'
module OrderManagement
module Subscriptions
describe StripePaymentSetup do
let(:order) { create(:order) }
let(:payment_setup) { OrderManagement::Subscriptions::StripePaymentSetup.new(order) }
describe "#call!" do
context "when no pending payments are present" do
before do
allow(order).to receive(:pending_payments).once { [] }
end
it "does nothing" do
expect(payment_setup.call!).to eq nil
end
end
context "when a payment is present" do
let(:payment) { create(:payment, payment_method: payment_method, amount: 10) }
before { allow(order).to receive(:pending_payments).once { [payment] } }
context "when the payment method is not a stripe payment method" do
let(:payment_method) { create(:payment_method) }
it "returns the pending payment with no change" do
expect(payment).to_not receive(:update_attributes)
expect(payment_setup.call!).to eq payment
end
end
context "when the payment method is a stripe payment method" do
let(:payment_method) { create(:stripe_payment_method) }
context "and the card is already set (the payment source is a credit card)" do
it "returns the pending payment with no change" do
expect(payment).to_not receive(:update_attributes)
expect(payment_setup.call!).to eq payment
end
end
context "and the card is not set (the payment source is not a credit card)" do
before { payment.update_attribute :source, nil }
context "and no default credit card has been saved by the customer" do
before do
allow(order).to receive(:user) { instance_double(Spree::User, default_card: nil) }
end
it "adds an error to the order and does not update the payment" do
payment_setup.call!
expect(payment).to_not receive(:update_attributes)
expect(payment_setup.call!).to eq payment
expect(order.errors[:base].first).to eq "There are no authorised "\
"credit cards available to charge"
end
end
context "and a default credit card has been saved by the customer" do
let(:saved_credit_card) { create(:credit_card) }
before do
allow(order).to receive(:user) {
instance_double(Spree::User, default_card: saved_credit_card)
}
end
context "but the customer has not authorised the shop to charge credit cards" do
before do
allow(order).to receive(:customer) {
instance_double(Customer, allow_charges?: false)
}
end
it "adds an error to the order and does not update the payment" do
payment_setup.call!
expect(payment).to_not receive(:update_attributes)
expect(payment_setup.call!).to eq payment
expect(order.errors[:base].first).to eq "There are no authorised "\
"credit cards available to charge"
end
end
context "and the customer has authorised the shop to charge credit cards" do
before do
allow(order).to receive(:customer) {
instance_double(Customer, allow_charges?: true)
}
end
it "uses the saved credit card as the source for the payment" do
payment_setup.call!
expect(payment.source).to eq saved_credit_card
end
end
end
end
end
end
end
end
end
end

View File

@@ -0,0 +1,65 @@
# frozen_string_literal: true
require 'spec_helper'
module OrderManagement
module Subscriptions
describe StripeScaPaymentAuthorize do
let(:order) { create(:order) }
let(:payment_authorize) {
OrderManagement::Subscriptions::StripeScaPaymentAuthorize.new(order)
}
describe "#call!" do
context "when no pending payments are present" do
before { allow(order).to receive(:pending_payments).once { [] } }
it "does nothing" do
expect(payment_authorize.call!).to eq nil
end
end
context "when a payment is present" do
let(:payment) { create(:payment, amount: 10) }
before { allow(order).to receive(:pending_payments).once { [payment] } }
context "in a state that is not checkout" do
before { payment.state = "processing" }
it "does nothing" do
payment_authorize.call!
expect(payment.state).to eq "processing"
expect(order.errors.size).to eq 0
end
end
context "in the checkout state" do
before { payment.state = "checkout" }
context "and payment authorize moves the payment state to pending" do
before { expect(payment).to receive(:authorize!) { payment.state = "pending" } }
it "does nothing" do
payment_authorize.call!
expect(order.errors.size).to eq 0
end
end
context "and payment authorize does not move the payment state to pending" do
before { allow(payment).to receive(:authorize!) { payment.state = "failed" } }
it "adds an error to the order indicating authorization failure" do
payment_authorize.call!
expect(order.errors[:base].first).to eq "Authorization Failure"
end
end
end
end
end
end
end
end

View File

@@ -18,6 +18,7 @@ module OpenFoodNetwork
@options = options
@report_type = options[:report_type]
@render_table = render_table
@variant_scopers_by_distributor_id = {}
end
def search
@@ -45,6 +46,14 @@ module OpenFoodNetwork
proc { |line_items| line_items.first.variant.product.name }
end
def variant_scoper_for(distributor_id)
@variant_scopers_by_distributor_id[distributor_id] ||=
OpenFoodNetwork::ScopeVariantToHub.new(
distributor_id,
report_variant_overrides[distributor_id] || {},
)
end
private
def report
@@ -89,5 +98,13 @@ module OpenFoodNetwork
def report_line_items
@report_line_items ||= Reports::LineItems.new(order_permissions, options)
end
def report_variant_overrides
@report_variant_overrides ||=
VariantOverridesIndexed.new(
order_permissions.visible_line_items.select('DISTINCT variant_id'),
report_line_items.orders.result.select('DISTINCT distributor_id'),
).indexed
end
end
end

View File

@@ -7,9 +7,11 @@ module OpenFoodNetwork
attr_reader :context
delegate :line_item_name, to: :context
delegate :variant_scoper_for, to: :context
def initialize(context)
@context = context
@scopers_by_distributor_id = {}
end
# rubocop:disable Metrics/AbcSize
@@ -159,7 +161,11 @@ module OpenFoodNetwork
},
proc { |_line_items| "" },
proc { |line_items| line_items.first.variant.sku },
proc do |line_items|
line_item = line_items.first
variant_scoper_for(line_item.order.distributor_id).scope(line_item.variant)
line_item.variant.sku
end,
proc { |line_items| line_items.first.order.order_cycle.andand.name },
proc { |line_items|

View File

@@ -3,10 +3,13 @@ describe 'Checkout service', ->
orderData = null
$httpBackend = null
Navigation = null
navigationSpy = null
flash = null
scope = null
FlashLoaderMock =
loadFlash: (arg)->
loadFlash: (arg) ->
Loading =
clear: (arg)->
paymentMethods = [{
id: 99
test: "foo"
@@ -48,6 +51,7 @@ describe 'Checkout service', ->
module 'Darkswarm'
module ($provide)->
$provide.value "RailsFlashLoader", FlashLoaderMock
$provide.value "Loading", Loading
$provide.value "currentOrder", orderData
$provide.value "shippingMethods", shippingMethods
$provide.value "paymentMethods", paymentMethods
@@ -61,7 +65,7 @@ describe 'Checkout service', ->
scope.Checkout = Checkout
Navigation = $injector.get("Navigation")
flash = $injector.get("flash")
spyOn(Navigation, "go") # Stubbing out writes to window.location
navigationSpy = spyOn(Navigation, "go") # Stubbing out writes to window.location
it "defaults to no shipping method", ->
expect(Checkout.order.shipping_method_id).toEqual null
@@ -116,12 +120,46 @@ describe 'Checkout service', ->
$httpBackend.flush()
expect(FlashLoaderMock.loadFlash).toHaveBeenCalledWith {error: "frogs"}
it "puts errors into the scope", ->
$httpBackend.expectPUT("/checkout.json").respond 400, {errors: {error: "frogs"}}
it "puts errors into the scope when there is a flash messages", ->
$httpBackend.expectPUT("/checkout.json").respond 400, {errors: {error: "frogs"}, flash: {error: "flash frogs"}}
Checkout.submit()
$httpBackend.flush()
expect(Checkout.errors).toEqual {error: "frogs"}
it "throws exception and sends generic flash message when there are errors but no flash message", ->
$httpBackend.expectPUT("/checkout.json").respond 400, {errors: {error: "broken response"}}
try
Checkout.submit()
$httpBackend.flush()
catch error
expect(error.data.errors.error).toBe("broken response")
expect(Checkout.errors).toEqual {}
it "throws an exception and sends a flash message to the flash service when reponse doesnt contain errors nor a flash message", ->
spyOn(FlashLoaderMock, "loadFlash") # Stubbing out writes to window.location
$httpBackend.expectPUT("/checkout.json").respond 400, "broken response"
try
Checkout.submit()
$httpBackend.flush()
catch error
expect(error.data).toBe("broken response")
expect(FlashLoaderMock.loadFlash).toHaveBeenCalledWith({ error: t("checkout.failed") })
it "throws an exception and sends a flash message to the flash service when an exception is thrown while handling the error", ->
spyOn(FlashLoaderMock, "loadFlash") # Stubbing out writes to window.location
navigationSpy.and.callFake(-> throw "unexpected error")
$httpBackend.expectPUT("/checkout.json").respond 400, {path: 'path'}
try
Checkout.submit()
$httpBackend.flush()
catch error
expect(error).toBe("unexpected error")
expect(FlashLoaderMock.loadFlash).toHaveBeenCalledWith({ error: t("checkout.failed") })
describe "when using the Stripe Connect gateway", ->
beforeEach inject ($injector, StripeElements) ->
Checkout.order.payment_method_id = 666

View File

@@ -62,4 +62,26 @@ RSpec.describe OpenFoodNetwork::OrdersAndFulfillmentsReport::CustomerTotalsRepor
expect(shipping_method_name_field).to eq shipping_method2.name
end
end
context 'when a variant override applies' do
let!(:order) do
create(:completed_order_with_totals, line_items_count: 1, user: customer.user,
customer: customer, distributor: distributor)
end
let(:overidden_sku) { 'magical_sku' }
before do
create(
:variant_override,
hub: distributor,
variant: order.line_items.first.variant,
sku: overidden_sku
)
end
it 'uses the sku from the variant override' do
sku_field = report_table.first[23]
expect(sku_field).to eq overidden_sku
end
end
end

View File

@@ -101,6 +101,19 @@ describe ProducerMailer, type: :mailer do
end.to change(ActionMailer::Base.deliveries, :count).by(0)
end
it "shows a deleted variant's full name" do
variant = p1.variants.first
full_name = variant.full_name
variant.delete
expect(mail.body.encoded).to include(full_name)
end
it 'shows deleted products' do
p1.delete
expect(mail.body.encoded).to include(p1.name)
end
private
def body_lines_including(mail, s)

View File

@@ -1,12 +1,16 @@
require 'spec_helper'
describe Api::Admin::CustomerSerializer do
let(:customer) { create(:customer, tag_list: "one, two, three") }
let(:tag_list) { ["one", "two", "three"] }
let(:customer) { create(:customer, tag_list: tag_list) }
let!(:tag_rule) { create(:tag_rule, enterprise: customer.enterprise, preferred_customer_tags: "two") }
it "serializes a customer with tags" do
tag_rule_mapping = TagRule.mapping_for(Enterprise.where(id: customer.enterprise_id))
serializer = Api::Admin::CustomerSerializer.new customer, tag_rule_mapping: tag_rule_mapping
customer_tag_list = { customer.id => tag_list }
serializer = Api::Admin::CustomerSerializer.new customer,
tag_rule_mapping: tag_rule_mapping,
customer_tags: customer_tag_list
result = JSON.parse(serializer.to_json)
expect(result['email']).to eq customer.email
tags = result['tags']
@@ -27,4 +31,11 @@ describe Api::Admin::CustomerSerializer do
expect(tag['rules']).to be nil
end
end
it 'serializes a customer without customer_tags' do
serializer = Api::Admin::CustomerSerializer.new customer
result = JSON.parse(serializer.to_json)
expect(result['tags'].first['text']).to eq tag_list.first
end
end

View File

@@ -0,0 +1,61 @@
require 'spec_helper'
describe VariantOverridesIndexed do
subject(:variant_overrides) { described_class.new([variant.id],[distributor.id]) }
let(:distributor) { create(:distributor_enterprise) }
let(:variant) { create(:variant) }
let!(:variant_override) do
create(
:variant_override,
hub: vo_distributor,
variant: vo_variant,
)
end
describe '#indexed' do
let(:result) { variant_overrides.indexed }
context 'when variant overrides exist for variants of specified variants' do
let(:vo_variant) { variant }
context 'when variant overrides apply to one of the specified distributors' do
let(:vo_distributor) { distributor }
it 'they are included in the mapping' do
expect(result).to eq(
distributor.id => { variant => variant_override }
)
end
end
context 'when variant overrides don\'t apply to one of the specified distributors' do
let(:vo_distributor) { create(:distributor_enterprise) }
it 'they are not included in the mapping' do
expect(result).to eq({})
end
end
end
context 'when variant overrides exist for other variants' do
let(:vo_variant) { create(:variant) }
context 'when variant overrides apply to one of the specified distributors' do
let(:vo_distributor) { distributor }
it 'they are not included in the mapping' do
expect(result).to eq({})
end
end
context 'when variant overrides don\'t apply to one of the specified distributors' do
let(:vo_distributor) { create(:distributor_enterprise) }
it 'they are not included in the mapping' do
expect(result).to eq({})
end
end
end
end
end