diff --git a/app/helpers/reports_helper.rb b/app/helpers/reports_helper.rb index 1f9bf91ed78..e8c38f0b739 100644 --- a/app/helpers/reports_helper.rb +++ b/app/helpers/reports_helper.rb @@ -58,4 +58,9 @@ def enterprise_fee_ids(orders) .where(order_id: orders.map(&:id)) .pluck(:originator_id) end + + def datepicker_time(datetime) + datetime = Time.zone.parse(datetime) if datetime.is_a? String + datetime.strftime('%Y-%m-%d %H:%M') + end end diff --git a/app/jobs/backorder_job.rb b/app/jobs/backorder_job.rb index 174fe125ff5..c8ce3f64a17 100644 --- a/app/jobs/backorder_job.rb +++ b/app/jobs/backorder_job.rb @@ -40,6 +40,8 @@ def place_backorder(order) user = order.distributor.owner items = backorderable_items(order) + return if items.empty? + # We are assuming that all variants are linked to the same wholesale # shop and its catalog: reference_link = items[0].variant.semantic_links[0].semantic_id diff --git a/app/models/spree/payment.rb b/app/models/spree/payment.rb index e10920d4b84..6479694df9c 100644 --- a/app/models/spree/payment.rb +++ b/app/models/spree/payment.rb @@ -155,7 +155,6 @@ def ensure_correct_adjustment if adjustment adjustment.originator = payment_method adjustment.label = adjustment_label - adjustment.amount = payment_method.compute_amount(self) adjustment.save elsif !processing_refund? && payment_method.present? payment_method.create_adjustment(adjustment_label, self, true) diff --git a/app/views/admin/reports/_date_range_form.html.haml b/app/views/admin/reports/_date_range_form.html.haml index 040344e6224..c8ffae0a4d3 100644 --- a/app/views/admin/reports/_date_range_form.html.haml +++ b/app/views/admin/reports/_date_range_form.html.haml @@ -1,14 +1,17 @@ -# Field used for ransack search. This date range is mostly used for Spree::Order -# so default field is 'completed_at' - field ||= 'completed_at' -- start_date ||= params[:q].try(:[], :completed_at_gt) -- end_date ||= params[:q].try(:[], :completed_at_lt) +- start_field = "#{field}_gt" +- end_field = "#{field}_lt" +- query = params[:q].to_h +- start_date = datepicker_time(query[start_field].presence || 3.months.ago.beginning_of_day) +- end_date = datepicker_time(query[end_field].presence || Time.zone.tomorrow.beginning_of_day) .row.date-range-filter .alpha.two.columns= label_tag nil, t(:date_range) .omega.fourteen.columns .field-block.omega.four.columns - .date-range-fields{ data: { controller: "flatpickr", "flatpickr-mode-value": "range", "flatpickr-enable-time-value": true , "flatpickr-default-hour": 0 } } + .date-range-fields{ data: { controller: "flatpickr", "flatpickr-mode-value": "range", "flatpickr-enable-time-value": true , "flatpickr-default-hour": 0, "flatpickr-default-date": [start_date, end_date] } } = text_field_tag nil, nil, class: "datepicker fullwidth", data: { "flatpickr-target": "instance", action: "flatpickr_clear@window->flatpickr#clear" } - = text_field_tag "q[#{field}_gt]", nil, data: { "flatpickr-target": "start" }, style: "display: none", value: start_date - = text_field_tag "q[#{field}_lt]", nil, data: { "flatpickr-target": "end" }, style: "display: none", value: end_date + = text_field_tag "q[#{start_field}]", nil, data: { "flatpickr-target": "start" }, style: "display: none", value: start_date + = text_field_tag "q[#{end_field}]", nil, data: { "flatpickr-target": "end" }, style: "display: none", value: end_date diff --git a/app/views/admin/reports/filters/_packing.html.haml b/app/views/admin/reports/filters/_packing.html.haml index a23fcd6a9bc..d7075126410 100755 --- a/app/views/admin/reports/filters/_packing.html.haml +++ b/app/views/admin/reports/filters/_packing.html.haml @@ -1,5 +1,5 @@ = render partial: 'admin/reports/date_range_form', - locals: { f: f, field: 'order_completed_at', start_date: params[:q].try(:[], :order_completed_at_gt), end_date: params[:q].try(:[], :order_completed_at_lt) } + locals: { f: f, field: 'order_completed_at' } .row .alpha.two.columns= label_tag nil, t(:report_hubs) @@ -14,4 +14,4 @@ .row .alpha.two.columns= label_tag nil, t(:report_customers_cycle) .omega.fourteen.columns - = select_tag("q[order_cycle_id_in]", options_for_select(report_order_cycle_options(@data.order_cycles), params.dig(:q, :order_cycle_id_in)), {class: "select2 fullwidth", multiple: true}) \ No newline at end of file + = select_tag("q[order_cycle_id_in]", options_for_select(report_order_cycle_options(@data.order_cycles), params.dig(:q, :order_cycle_id_in)), {class: "select2 fullwidth", multiple: true}) diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 5c3c0ca5859..d3348dc9a44 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -155,7 +155,7 @@ config.omniauth :openid_connect, { name: :openid_connect, issuer: "https://login.lescommuns.org/auth/realms/data-food-consortium", - scope: [:openid, :profile, :email], + scope: [:openid, :profile, :email, :offline_access], response_type: :code, uid_field: "email", discovery: true, diff --git a/config/locales/ar.yml b/config/locales/ar.yml index f1f1c34056e..e73bcf31379 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -46,12 +46,12 @@ ar: price: "السعر" primary_taxon_id: "نوع المنتج " shipping_category_id: "نوع الشحن" - variant_unit_name: "اسم وحدة النوع" - unit_value: "قيمةالوحدة" spree/variant: primary_taxon: "نوع المنتج " shipping_category_id: "نوع الشحن" supplier: "المورد" + variant_unit_name: "اسم وحدة النوع" + unit_value: "قيمةالوحدة" spree/credit_card: base: "بطاقة ائتمان" number: "رقم " @@ -1146,6 +1146,8 @@ ar: Visit Discover Regenerative
+ vine: + enable: "الاتصال" actions: edit_profile: الإعدادات properties: الخصائص @@ -4190,12 +4192,15 @@ ar: new_variant: "نوع جديد" form: sku: "SKU" - price: "السعر" unit_price: "سعر الوحدة" display_as: "عرض ب" display_name: "اسم العرض" display_as_placeholder: 'على سبيل المثال 2 كجم' display_name_placeholder: 'على سبيل المثال طماطم' + unit: وحدة + price: السعر + unit_value: قيمةالوحدة + variant_category: الفئة autocomplete: out_of_stock: "غير متوفر" producer_name: "المنتج" diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 60c89def8a4..1f3b64a2e05 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -46,12 +46,12 @@ ca: price: "Preu" primary_taxon_id: "Categoria del producte" shipping_category_id: "Categoria d'enviament" - variant_unit_name: "Nom de la unitat de la variant" - unit_value: "Valor de la unitat" spree/variant: primary_taxon: "Categoria del producte" shipping_category_id: "Categoria d'enviament" supplier: "Proveïdora" + variant_unit_name: "Nom de la unitat de la variant" + unit_value: "Valor de la unitat" spree/credit_card: base: "Targeta de crèdit" number: "Número" @@ -1200,6 +1200,8 @@ ca: loading: "S'està carregant" discover_regen: loading: "S'està carregant" + vine: + enable: "Connecta" actions: edit_profile: Configuració properties: Propietats @@ -4068,12 +4070,15 @@ ca: new_variant: "Nova variant" form: sku: "Número de referència (SKU)" - price: "Preu" unit_price: "Preu unitari" display_as: "Mostra com" display_name: "Nom de visualització" display_as_placeholder: 'per exemple. 2 kg' display_name_placeholder: 'per exemple. Tomàquets' + unit: Unitat + price: Preu + unit_value: Valor de la unitat + variant_category: Categoria autocomplete: out_of_stock: "Fora d'existència" producer_name: "Productor" diff --git a/config/locales/cy.yml b/config/locales/cy.yml index 785410d1e67..b74eaa5e258 100644 --- a/config/locales/cy.yml +++ b/config/locales/cy.yml @@ -49,12 +49,12 @@ cy: price: "Pris" primary_taxon_id: "Categori Cynnyrch" shipping_category_id: "Categori dosbarthu." - variant_unit_name: "Enw Uned Amrywiol" - unit_value: "Gwerth yr uned" spree/variant: primary_taxon: "Categori Cynnyrch" shipping_category_id: "Categori Anfon" supplier: "Cyflenwr" + variant_unit_name: "Enw Uned Amrywiolyn" + unit_value: "Gwerth yr uned" spree/credit_card: base: "Cerdyn credyd" number: "Rhif" @@ -1260,6 +1260,8 @@ cy: disable: "Rhoi’r gorau i rannu" loading: "Yn llwytho" link_label: "Rheoli’r rhestru" + vine: + enable: "Adnoddau" actions: edit_profile: Gosodiadau properties: Manylion @@ -4320,12 +4322,15 @@ cy: new_variant: "Amrywiolyn newydd" form: sku: "Cod y Cynnyrch" - price: "Pris" unit_price: "Pris Uned" display_as: "Arddangos fel" display_name: "Enw Arddangos" display_as_placeholder: 'e.e. 2 kg' display_name_placeholder: 'e.e. Tomatos' + unit: Uned + price: Pris + unit_value: Gwerth yr uned + variant_category: Categori autocomplete: out_of_stock: "Allan o stoc" producer_name: "Cynhyrchydd" diff --git a/config/locales/de_CH.yml b/config/locales/de_CH.yml index b79e46a5212..2f19c4fc43f 100644 --- a/config/locales/de_CH.yml +++ b/config/locales/de_CH.yml @@ -35,11 +35,11 @@ de_CH: price: "Preis" primary_taxon_id: "Produktkategorie" shipping_category_id: "Lieferkategorie" - variant_unit_name: "Name der Varianteneinheit" spree/variant: primary_taxon: "Produktkategorie" shipping_category_id: "Lieferkategorie" supplier: "Lieferant" + variant_unit_name: "Name der Varianteneinheit" spree/credit_card: base: "Kreditkarte" number: "Kreditkartennummer" @@ -1112,6 +1112,8 @@ de_CH: loading: "Wird geladen ..." discover_regen: loading: "Wird geladen ..." + vine: + enable: "Über OFN" actions: edit_profile: Einstellungen properties: Eigenschaften @@ -3974,12 +3976,14 @@ de_CH: new_variant: "Neue Produktvariante" form: sku: "Artikelnummer" - price: "Preis" unit_price: "Grundpreis" display_as: "Anzeigen als" display_name: "Variantenname" display_as_placeholder: 'z. B. 2 kg' display_name_placeholder: 'z. B. Tomaten' + unit: Einheit + price: Preis + variant_category: Kategorie autocomplete: out_of_stock: "nicht vorrätig" producer_name: "Produzent" diff --git a/config/locales/de_DE.yml b/config/locales/de_DE.yml index 9a3baf10213..a73378322c5 100644 --- a/config/locales/de_DE.yml +++ b/config/locales/de_DE.yml @@ -49,12 +49,12 @@ de_DE: price: "Preis" primary_taxon_id: "Produktkategorie" shipping_category_id: "Lieferkategorie" - variant_unit_name: "Name der Varianteneinheit" - unit_value: "Menge" spree/variant: primary_taxon: "Produktkategorie" shipping_category_id: "Lieferkategorie" supplier: "Lieferant" + variant_unit_name: "Name der Varianteneinheit" + unit_value: "Menge" spree/credit_card: base: "Kreditkarte" number: "Kreditkartennummer" @@ -1240,6 +1240,8 @@ de_DE: loading: "Wird geladen ..." discover_regen: loading: "Wird geladen ..." + vine: + enable: "Über OFN" actions: edit_profile: Einstellungen properties: Eigenschaften @@ -4250,12 +4252,15 @@ de_DE: new_variant: "Neue Produktvariante" form: sku: "Artikelnummer" - price: "Preis" unit_price: "Grundpreis" display_as: "Anzeigen als" display_name: "Variantenname" display_as_placeholder: 'z. B. 2 kg' display_name_placeholder: 'z. B. Tomaten' + unit: Einheit + price: Preis + unit_value: Menge + variant_category: Kategorie autocomplete: out_of_stock: "nicht vorrätig" producer_name: "Produzent" diff --git a/config/locales/el.yml b/config/locales/el.yml index 6a869a85517..73380856fcd 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -46,12 +46,12 @@ el: price: "Τιμή" primary_taxon_id: "Κατηγορία προϊόντος" shipping_category_id: "Κατηγορία μεταφορικών" - variant_unit_name: "Όνομα μεταβλητής" - unit_value: "Τιμή μεταβλητής" spree/variant: primary_taxon: "Κατηγορία προϊόντος" shipping_category_id: "Κατηγορία μεταφοράς" supplier: "Προμηθευτής" + variant_unit_name: "Όνομα μεταβλητής" + unit_value: "Τιμή μεταβλητής" spree/credit_card: base: "Κάρτα πιστωτική/χρεωστική" number: "Αριθμός" @@ -1314,6 +1314,10 @@ el: target="_blank">Μάθετε περισσότερα για το Discover Regenerative + vine: + enable: "Σύνδεση" + disable: "Αποσύνδεση." + need_to_be_manager: "Μόνο οι διαχειριστές μπορούν να συνδέουν εφαρμογές." actions: edit_profile: Ρυθμήσεις properties: Ιδιότητες @@ -4326,12 +4330,16 @@ el: new_variant: "Νέα παραλλαγή" form: sku: "SKU" - price: "Τιμή" unit_price: "Τιμή Μονάδας" display_as: "Εμφάνιση Ως" display_name: "Εμφανιζόμενο όνομα" display_as_placeholder: 'π.χ. 2 κιλά' display_name_placeholder: 'π.χ. Ντομάτες' + unit_scale: "Κλίμακα μονάδας" + unit: Μονάδα + price: Τιμή + unit_value: Τιμή μεταβλητής + variant_category: Κατηγορία autocomplete: out_of_stock: "Εκτός αποθέματος" producer_name: "Παραγωγός" diff --git a/config/locales/en_AU.yml b/config/locales/en_AU.yml index 8b44d39ea06..aa2a74a1017 100644 --- a/config/locales/en_AU.yml +++ b/config/locales/en_AU.yml @@ -30,11 +30,11 @@ en_AU: price: "Price" primary_taxon_id: "Product Category" shipping_category_id: "Shipping Category" - variant_unit_name: "Variant Unit Name" spree/variant: primary_taxon: "Product Category" shipping_category_id: "Shipping Category" supplier: "Supplier" + variant_unit_name: "Variant Unit Name" spree/credit_card: base: "Credit Card" number: "Number" @@ -955,6 +955,8 @@ en_AU: Visit Discover Regenerative + vine: + enable: "Open Road" actions: edit_profile: Settings properties: Properties @@ -3630,12 +3632,14 @@ en_AU: new_variant: "New Variant" form: sku: "SKU" - price: "Price" unit_price: "Unit Price" display_as: "Display As" display_name: "Display Name" display_as_placeholder: 'eg. 2 kg' display_name_placeholder: 'eg. Tomatoes' + unit: Unit + price: Price + variant_category: Category autocomplete: out_of_stock: "Out of Stock" producer_name: "Producer" diff --git a/config/locales/en_BE.yml b/config/locales/en_BE.yml index 56e6423f035..69fc68c3531 100644 --- a/config/locales/en_BE.yml +++ b/config/locales/en_BE.yml @@ -29,11 +29,11 @@ en_BE: price: "Price" primary_taxon_id: "Product Category" shipping_category_id: "Shipping Category" - variant_unit_name: "Variant Unit Name" spree/variant: primary_taxon: "Product Category" shipping_category_id: "Shipping Category" supplier: "Supplier" + variant_unit_name: "Variant Unit Name" spree/credit_card: base: "Credit Card" number: "Number" @@ -885,6 +885,8 @@ en_BE: loading: "Loading" discover_regen: loading: "Loading" + vine: + enable: "Connect" actions: edit_profile: Settings properties: Properties @@ -3288,9 +3290,11 @@ en_BE: option_types: "Option Types" form: sku: "SKU" - price: "Price" unit_price: "Unit Price" display_as: "Display As" + unit: Unit + price: Price + variant_category: Category autocomplete: out_of_stock: "Out of Stock" producer_name: "Producer" diff --git a/config/locales/en_CA.yml b/config/locales/en_CA.yml index 57ad4e05b83..60d92f8cf6e 100644 --- a/config/locales/en_CA.yml +++ b/config/locales/en_CA.yml @@ -49,13 +49,13 @@ en_CA: price: "Price" primary_taxon_id: "Product Category" shipping_category_id: "Shipping Category" - variant_unit: "Unit Scale" - variant_unit_name: "Variant Unit Name" - unit_value: "Unit value" spree/variant: primary_taxon: "Product Category" shipping_category_id: "Shipping Category" supplier: "Supplier" + variant_unit: "Unit Scale" + variant_unit_name: "Variant Unit Name" + unit_value: "Unit value" spree/credit_card: base: "Credit Card" number: "Number" @@ -1372,6 +1372,10 @@ en_CA: Learn more about the Waterloo Food Directory. + vine: + enable: "Donate" + disable: "Disconnect" + need_to_be_manager: "Only managers can connect apps." actions: edit_profile: Settings properties: Properties @@ -4429,12 +4433,16 @@ en_CA: new_variant: "New Variant" form: sku: "SKU" - price: "Price" unit_price: "Unit Price" display_as: "Display As" display_name: "Display Name" display_as_placeholder: 'eg. 2 kg' display_name_placeholder: 'eg. Tomatoes' + unit_scale: "Unit scale" + unit: Unit + price: Price + unit_value: Unit value + variant_category: Category autocomplete: out_of_stock: "Out of Stock" producer_name: "Producer" diff --git a/config/locales/en_DE.yml b/config/locales/en_DE.yml index 7ad857a099c..2ef0f5b7de6 100644 --- a/config/locales/en_DE.yml +++ b/config/locales/en_DE.yml @@ -29,11 +29,11 @@ en_DE: price: "Price" primary_taxon_id: "Product Category" shipping_category_id: "Shipping Category" - variant_unit_name: "Variant Unit Name" spree/variant: primary_taxon: "Product Category" shipping_category_id: "Shipping Category" supplier: "Supplier" + variant_unit_name: "Variant Unit Name" spree/credit_card: base: "Credit Card" number: "Number" @@ -893,6 +893,8 @@ en_DE: loading: "Loading" discover_regen: loading: "Loading" + vine: + enable: "Connect" actions: edit_profile: Settings properties: Properties @@ -3303,9 +3305,11 @@ en_DE: option_types: "Option Types" form: sku: "SKU" - price: "Price" unit_price: "Unit Price" display_as: "Display As" + unit: Unit + price: Price + variant_category: Category autocomplete: out_of_stock: "Out of Stock" producer_name: "Producer" diff --git a/config/locales/en_FR.yml b/config/locales/en_FR.yml index 397d8abd330..9ce7d1040b1 100644 --- a/config/locales/en_FR.yml +++ b/config/locales/en_FR.yml @@ -49,13 +49,13 @@ en_FR: price: "Price" primary_taxon_id: "Product Category" shipping_category_id: "Shipping Category" - variant_unit: "Unit Scale" - variant_unit_name: "Variant Unit Name" - unit_value: "Unit value" spree/variant: primary_taxon: "Product Category" shipping_category_id: "Shipping Category" supplier: "Supplier" + variant_unit: "Unit Scale" + variant_unit_name: "Variant Unit Name" + unit_value: "Unit value" spree/credit_card: base: "Credit Card" number: "Number" @@ -107,6 +107,9 @@ en_FR: count_on_hand: using_producer_stock_settings_but_count_on_hand_set: "must be blank because using producer stock settings" limited_stock_but_no_count_on_hand: "must be specified because forcing limited stock" + connected_apps: + vine: + api_request_error: "An error occured when connecting to Vine API" messages: confirmation: "doesn't match %{attribute}" blank: "can't be blank" @@ -717,6 +720,7 @@ en_FR: connected_apps_enabled: discover_regen: Discover Regenerative portal affiliate_sales_data: DFC anonymised orders API for research purposes + vine: Voucher Integration Engine (VINE) update: resource: Connected app settings customers: @@ -1375,6 +1379,26 @@ en_FR: target="_blank">Learn more about Discover Regenerative + vine: + title: "Voucher Integration Engine (VINE)" + tagline: "Allow redemption of VINE vouchers in your shopfront." + enable: "About" + disable: "Disconnect" + need_to_be_manager: "Only managers can connect apps." + vine_api_key: "VINE API Key" + vine_secret: "VINE secret" + description_html: | ++ To enable VINE for your enterprise, enter your API key and secret. +
++ VINE + +
+ api_parameters_empty: "Please enter an API key and a secret" + api_parameters_error: "Check you entered your API key and secret correctly, contact your instance manager if the error persists" + connection_error: "API connection error, please try again" + setup_error: "VINE API is not configured, please contact your instance manager" actions: edit_profile: Settings properties: Properties @@ -4433,12 +4457,16 @@ en_FR: new_variant: "New Variant" form: sku: "SKU" - price: "Price" unit_price: "Unit Price" display_as: "Display As" display_name: "Display Name" display_as_placeholder: 'eg. 2 kg' display_name_placeholder: 'eg. Tomatoes' + unit_scale: "Unit scale" + unit: Unit + price: Price + unit_value: Unit value + variant_category: Category autocomplete: out_of_stock: "Out of Stock" producer_name: "Producer" diff --git a/config/locales/en_GB.yml b/config/locales/en_GB.yml index abb45424da6..72e767ed983 100644 --- a/config/locales/en_GB.yml +++ b/config/locales/en_GB.yml @@ -49,12 +49,12 @@ en_GB: price: "Price" primary_taxon_id: "Product Category" shipping_category_id: "Shipping Category" - variant_unit_name: "Variant Unit Name" - unit_value: "Unit value" spree/variant: primary_taxon: "Product Category" shipping_category_id: "Shipping Category" supplier: "Supplier" + variant_unit_name: "Variant Unit Name" + unit_value: "Unit value" spree/credit_card: base: "Credit Card" number: "Number" @@ -1331,6 +1331,10 @@ en_GB: target="_blank">Learn more about Discover Regenerative + vine: + enable: "Resources" + disable: "Disconnect" + need_to_be_manager: "Only managers can connect apps." actions: edit_profile: Settings properties: Properties @@ -4373,12 +4377,16 @@ en_GB: new_variant: "New Variant" form: sku: "Product Code" - price: "Price" unit_price: "Unit Price" display_as: "Display As" display_name: "Display Name" display_as_placeholder: 'eg. 2 kg' display_name_placeholder: 'eg. Tomatoes' + unit_scale: "Unit scale" + unit: Unit + price: Price + unit_value: Unit value + variant_category: Category autocomplete: out_of_stock: "Out of Stock" producer_name: "Producer" diff --git a/config/locales/en_IE.yml b/config/locales/en_IE.yml index 164d2cd2cd1..3a9fb80208e 100644 --- a/config/locales/en_IE.yml +++ b/config/locales/en_IE.yml @@ -49,12 +49,12 @@ en_IE: price: "Price" primary_taxon_id: "Product Category" shipping_category_id: "Shipping Category" - variant_unit_name: "Variant Unit Name" - unit_value: "Unit value" spree/variant: primary_taxon: "Product Category" shipping_category_id: "Shipping Category" supplier: "Supplier" + variant_unit_name: "Variant Unit Name" + unit_value: "Unit value" spree/credit_card: base: "Credit Card" number: "Number" @@ -1286,6 +1286,9 @@ en_IE: target="_blank">Learn more about Discover Regenerative + vine: + enable: "Resources" + disable: "Disconnect" actions: edit_profile: Settings properties: Properties @@ -4319,12 +4322,16 @@ en_IE: new_variant: "New Variant" form: sku: "Product Code" - price: "Price" unit_price: "Unit Price" display_as: "Display As" display_name: "Display Name" display_as_placeholder: 'eg. 2 kg' display_name_placeholder: 'eg. Tomatoes' + unit_scale: "Unit scale" + unit: Unit + price: Price + unit_value: Unit value + variant_category: Category autocomplete: out_of_stock: "Out of Stock" producer_name: "Producer" diff --git a/config/locales/en_IN.yml b/config/locales/en_IN.yml index da3d13ef1d8..4915a98f83a 100644 --- a/config/locales/en_IN.yml +++ b/config/locales/en_IN.yml @@ -29,11 +29,11 @@ en_IN: price: "Price" primary_taxon_id: "Product Category" shipping_category_id: "Shipping Category" - variant_unit_name: "Variant Unit Name" spree/variant: primary_taxon: "Product Category" shipping_category_id: "Shipping Category" supplier: "Supplier" + variant_unit_name: "Variant Unit Name" spree/credit_card: base: "Credit Card" number: "Number" @@ -918,6 +918,8 @@ en_IN: loading: "Loading" discover_regen: loading: "Loading" + vine: + enable: "Pricing" actions: edit_profile: Settings properties: Properties @@ -3532,12 +3534,14 @@ en_IN: new_variant: "New Variant" form: sku: "Product Code" - price: "Price" unit_price: "Unit Price" display_as: "Display As" display_name: "Display Name" display_as_placeholder: 'eg. 2 kg' display_name_placeholder: 'eg. Tomatoes' + unit: Unit + price: Price + variant_category: Category autocomplete: out_of_stock: "Out of Stock" producer_name: "Producer" diff --git a/config/locales/en_NZ.yml b/config/locales/en_NZ.yml index b450a432421..f5b47a61d2e 100644 --- a/config/locales/en_NZ.yml +++ b/config/locales/en_NZ.yml @@ -33,11 +33,11 @@ en_NZ: price: "Price" primary_taxon_id: "Product Category" shipping_category_id: "Shipping Category" - variant_unit_name: "Variant Unit Name" spree/variant: primary_taxon: "Product Category" shipping_category_id: "Shipping Category" supplier: "Supplier" + variant_unit_name: "Variant Unit Name" spree/credit_card: base: "Credit Card" number: "Number" @@ -1112,6 +1112,8 @@ en_NZ: loading: "Loading" discover_regen: loading: "Loading" + vine: + enable: "Connect" actions: edit_profile: Settings properties: Properties @@ -3881,12 +3883,14 @@ en_NZ: new_variant: "New Variant" form: sku: "SKU" - price: "Price" unit_price: "Unit Price" display_as: "Display As" display_name: "Display Name" display_as_placeholder: 'eg. 2 kg' display_name_placeholder: 'eg. Tomatoes' + unit: Unit + price: Price + variant_category: Category autocomplete: out_of_stock: "Out of Stock" producer_name: "Producer" diff --git a/config/locales/en_PH.yml b/config/locales/en_PH.yml index bbf4e265134..e10a40481fa 100644 --- a/config/locales/en_PH.yml +++ b/config/locales/en_PH.yml @@ -29,11 +29,11 @@ en_PH: price: "Price" primary_taxon_id: "Product Category" shipping_category_id: "Shipping Category" - variant_unit_name: "Variant Unit Name" spree/variant: primary_taxon: "Product Category" shipping_category_id: "Shipping Category" supplier: "Supplier" + variant_unit_name: "Variant Unit Name" spree/credit_card: base: "Credit Card" number: "Number" @@ -908,6 +908,8 @@ en_PH: loading: "Loading" discover_regen: loading: "Loading" + vine: + enable: "Connect" actions: edit_profile: Settings properties: Properties @@ -3469,10 +3471,12 @@ en_PH: new_variant: "New Variant" form: sku: "SKU" - price: "Price" unit_price: "Unit Price" display_as: "Display As" display_name: "Display Name" + unit: Unit + price: Price + variant_category: Category autocomplete: out_of_stock: "Out of Stock" producer_name: "Producer" diff --git a/config/locales/en_US.yml b/config/locales/en_US.yml index 0e67d1a5ab0..ca8f3ba0b0c 100644 --- a/config/locales/en_US.yml +++ b/config/locales/en_US.yml @@ -31,11 +31,11 @@ en_US: price: "Price" primary_taxon_id: "Product Category" shipping_category_id: "Shipping Category" - variant_unit_name: "Variant Unit Name" spree/variant: primary_taxon: "Product Category" shipping_category_id: "Shipping Category" supplier: "Supplier" + variant_unit_name: "Variant Unit Name" spree/credit_card: base: "Credit Card" number: "Number" @@ -1073,6 +1073,8 @@ en_US: loading: "Loading" discover_regen: loading: "Loading" + vine: + enable: "Pricing" actions: edit_profile: Settings properties: Properties @@ -3896,12 +3898,14 @@ en_US: new_variant: "New Variant" form: sku: "SKU" - price: "Price" unit_price: "Unit Price" display_as: "Display As" display_name: "Display Name" display_as_placeholder: 'For example, 2 kg' display_name_placeholder: 'For example, Tomatoes' + unit: Unit + price: Price + variant_category: Category autocomplete: out_of_stock: "Out of Stock" producer_name: "Producer" diff --git a/config/locales/en_ZA.yml b/config/locales/en_ZA.yml index 066c08bad28..faccf97832c 100644 --- a/config/locales/en_ZA.yml +++ b/config/locales/en_ZA.yml @@ -29,11 +29,11 @@ en_ZA: price: "Price" primary_taxon_id: "Product Category" shipping_category_id: "Shipping Category" - variant_unit_name: "Variant Unit Name" spree/variant: primary_taxon: "Product Category" shipping_category_id: "Shipping Category" supplier: "Supplier" + variant_unit_name: "Variant Unit Name" spree/credit_card: base: "Credit Card" number: "Number" @@ -909,6 +909,8 @@ en_ZA: loading: "Loading" discover_regen: loading: "Loading" + vine: + enable: "Connect" actions: edit_profile: Settings properties: Properties @@ -3363,9 +3365,11 @@ en_ZA: and: "and" form: sku: "SKU" - price: "Price" unit_price: "Unit Price" display_as: "Display As" + unit: Unit + price: Price + variant_category: Category autocomplete: out_of_stock: "Out of Stock" producer_name: "Producer" diff --git a/config/locales/es.yml b/config/locales/es.yml index 999bbd91323..36da47b18ca 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -46,12 +46,12 @@ es: price: "Precio" primary_taxon_id: "categoría del producto" shipping_category_id: "Categoría de envío" - variant_unit_name: "Nombre de la unidad de la variante" - unit_value: "Valor unidad" spree/variant: primary_taxon: "categoría del producto" shipping_category_id: "Categoría de envío" supplier: "Proveedora" + variant_unit_name: "Nombre de la unidad de la variante" + unit_value: "Valor unidad" spree/credit_card: base: "Tarjeta de crédito" number: "Número" @@ -1143,6 +1143,8 @@ es: loading: "Cargando" discover_regen: loading: "Cargando" + vine: + enable: "Conectar" actions: edit_profile: Configuración properties: Propiedades @@ -4052,12 +4054,15 @@ es: new_variant: "Nueva Variante" form: sku: "SKU" - price: "Precio" unit_price: "Precio por unidad" display_as: "Mostrar como" display_name: "Nombre para mostrar" display_as_placeholder: 'p. ej. 2 Kg' display_name_placeholder: 'p. ej. Tomates' + unit: Unidad + price: Precio + unit_value: Valor unidad + variant_category: Categoría autocomplete: out_of_stock: "Agotado" producer_name: "Productora" diff --git a/config/locales/es_CO.yml b/config/locales/es_CO.yml index a07b4b5025d..4b056d360ff 100644 --- a/config/locales/es_CO.yml +++ b/config/locales/es_CO.yml @@ -31,11 +31,11 @@ es_CO: price: "Precio" primary_taxon_id: "Categoría del producto" shipping_category_id: "Categoría de envío" - variant_unit_name: "Nombre de la unidad de la variante" spree/variant: primary_taxon: "Categoría del producto" shipping_category_id: "Categoría de envío" supplier: "Proveedora" + variant_unit_name: "Nombre de la unidad de la variante" spree/credit_card: base: "Tarjeta de crédito" number: "Número" @@ -941,6 +941,8 @@ es_CO: loading: "Cargando" discover_regen: loading: "Cargando" + vine: + enable: "Conectar" actions: edit_profile: Configuración properties: Propiedades @@ -3592,12 +3594,14 @@ es_CO: new_variant: "Nueva variante" form: sku: "SKU" - price: "Precio" unit_price: "Precio por unidad" display_as: "Mostrar como" display_name: "Nombre para mostrar" display_as_placeholder: 'p.ej. 2 kilogramos' display_name_placeholder: 'p.ej. Tomates' + unit: Unidad + price: Precio + variant_category: Categoría autocomplete: out_of_stock: "Agotado" producer_name: "Productor" diff --git a/config/locales/es_CR.yml b/config/locales/es_CR.yml index a9d6a6a2bf4..e2f449690d5 100644 --- a/config/locales/es_CR.yml +++ b/config/locales/es_CR.yml @@ -33,11 +33,11 @@ es_CR: price: "Precio" primary_taxon_id: "Categoría del producto" shipping_category_id: "Categoría de envío" - variant_unit_name: "Nombre de la unidad de la variante" spree/variant: primary_taxon: "Categoría del producto" shipping_category_id: "Categoría de envío" supplier: "Proveedor" + variant_unit_name: "Nombre de la unidad de la variante" spree/credit_card: base: "Tarjeta de crédito" number: "Número" @@ -1118,6 +1118,8 @@ es_CR: loading: "Cargando" discover_regen: loading: "Cargando" + vine: + enable: "Conectar" actions: edit_profile: Configuración properties: Propiedades @@ -3930,10 +3932,12 @@ es_CR: new_variant: "Nueva variante" form: sku: "SKU" - price: "Precio" unit_price: "Precio por unidad" display_as: "Mostrar como" display_name: "Nombre para mostrar" + unit: Unidad + price: Precio + variant_category: Categoría autocomplete: out_of_stock: "Agotado" producer_name: "Productor" diff --git a/config/locales/es_US.yml b/config/locales/es_US.yml index a34437e942d..8a6dd1a2529 100644 --- a/config/locales/es_US.yml +++ b/config/locales/es_US.yml @@ -31,11 +31,11 @@ es_US: price: "Precio" primary_taxon_id: "categoría del producto" shipping_category_id: "Categoría de envío" - variant_unit_name: "Nombre de la unidad de la variante" spree/variant: primary_taxon: "categoría del producto" shipping_category_id: "Categoría de envío" supplier: "Proveedor" + variant_unit_name: "Nombre de la unidad de la variante" spree/credit_card: base: "Tarjeta de crédito" number: "Número" @@ -1072,6 +1072,8 @@ es_US: loading: "Cargando" discover_regen: loading: "Cargando" + vine: + enable: "Conectar" actions: edit_profile: Configuración properties: Propiedades @@ -3846,12 +3848,14 @@ es_US: new_variant: "Nueva Variante" form: sku: "SKU" - price: "Precio" unit_price: "Precio por unidad" display_as: "Mostrar como" display_name: "Nombre para mostrar" display_as_placeholder: 'p. ej. 2 Kg' display_name_placeholder: 'p. ej. Tomates' + unit: Unidad + price: Precio + variant_category: Categoría autocomplete: out_of_stock: "Agotado" producer_name: "Productora" diff --git a/config/locales/fil_PH.yml b/config/locales/fil_PH.yml index a0e9ac8c90f..2fa301129e6 100644 --- a/config/locales/fil_PH.yml +++ b/config/locales/fil_PH.yml @@ -29,11 +29,11 @@ fil_PH: price: "Presyo" primary_taxon_id: "Kategorya ng Produkto" shipping_category_id: "Kategorya ng Pagpapadala" - variant_unit_name: "pangalan ng yunit ng variant" spree/variant: primary_taxon: "Kategorya ng Produkto" shipping_category_id: "Kategorya ng Pagpapadala" supplier: "Supplier" + variant_unit_name: "pangalan ng yunit ng variant" spree/credit_card: base: "Credit Card" number: "Bilang" @@ -909,6 +909,8 @@ fil_PH: loading: "naglo-load" discover_regen: loading: "naglo-load" + vine: + enable: "Kumonekta" actions: edit_profile: Settings properties: mga katangian @@ -3480,10 +3482,12 @@ fil_PH: new_variant: "bagong variant" form: sku: "SKU" - price: "presyo" unit_price: "Presyo kada Yunit" display_as: "Ipakita Bilang" display_name: "Pangalan na nakikita" + unit: yunit + price: presyo + variant_category: kategorya autocomplete: out_of_stock: "Walang stock" producer_name: "Producer" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index c34700e4743..2de63fe888b 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -49,13 +49,13 @@ fr: price: "Prix" primary_taxon_id: "Catégorie Produit" shipping_category_id: "Condition de transport" - variant_unit: "Unité" - variant_unit_name: "Unité de la variante" - unit_value: "Nb unités" spree/variant: primary_taxon: "Catégorie Produit" shipping_category_id: "Condition de transport" supplier: "Fournisseur" + variant_unit: "Unité" + variant_unit_name: "Unité de la variante" + unit_value: "Nb unités" spree/credit_card: base: "Carte de crédit" number: "N° commande" @@ -1377,6 +1377,10 @@ fr: target="_blank">En savoir plus sur Discover Regenerative + vine: + enable: "A propos" + disable: "Déconnecter" + need_to_be_manager: "Seuls les gestionnaires peuvent connecter des applications." actions: edit_profile: Paramètres properties: Labels / propriétés @@ -4491,12 +4495,16 @@ fr: new_variant: "Nouvelle variante" form: sku: "Référence Produit" - price: "Prix" unit_price: "Prix unitaire" display_as: "Unité affichée" display_name: "Nom affiché" display_as_placeholder: 'ex. 2 kg' display_name_placeholder: 'ex. Tomates' + unit_scale: "Unité" + unit: Unité affichée + price: Prix + unit_value: Nb unités + variant_category: Catégorie autocomplete: out_of_stock: "En rupture de stock" producer_name: "Producteur" diff --git a/config/locales/fr_BE.yml b/config/locales/fr_BE.yml index 1ed23be29e4..f2d317d5efe 100644 --- a/config/locales/fr_BE.yml +++ b/config/locales/fr_BE.yml @@ -46,12 +46,12 @@ fr_BE: price: "Prix" primary_taxon_id: "Catégorie de Produit" shipping_category_id: "Catégorie de livraison" - variant_unit_name: "Nom de la variante" - unit_value: "Valeur unitaire" spree/variant: primary_taxon: "Catégorie de Produit" shipping_category_id: "Catégorie de livraison" supplier: "Disitributeur·trice" + variant_unit_name: "Nom de la variante" + unit_value: "Valeur unitaire" spree/credit_card: base: "Carte de crédit" number: "N° commande" @@ -193,6 +193,7 @@ fr_BE: no_default_card: "Pas de carte de paiement par défaut pour cet acheteur" shipping_method: not_available_to_shop: "n'est pas disponible pour %{shop}" + card_details: "Détails de la carte" customer_instructions: "Précisions pour la personne qui achète" devise: passwords: @@ -485,10 +486,13 @@ fr_BE: clone: Dupliquer delete: Supprimer remove: Supprimer + preview: Aperçu image: edit: Modifier product_preview: + product_preview: Aperçu du produit shop_tab: Comptoir + product_details_tab: Détails du produit adjustments: skipped_changing_canceled_order: "Vous ne pouvez pas modifier une commande annulée." begins_at: Commence @@ -1182,6 +1186,8 @@ fr_BE: loading: "Chargement en cours" discover_regen: loading: "Chargement en cours" + vine: + enable: "Se connecter" actions: edit_profile: Paramètres properties: Labels / propriétés @@ -1469,6 +1475,9 @@ fr_BE: pack_by_customer: Préparation des commandes par Acheteur·euse pack_by_supplier: Préparation des commandes par Producteur·trice pack_by_product: Préparation des commandes par produit + display: + report_is_big: "Ce rapport est volumineux et peut ralentir votre appareil." + display_anyway: "Afficher quand même" download: button: "Télécharger le rapport" show: @@ -1722,6 +1731,7 @@ fr_BE: stripe: use_saved_card: Utiliser la carte enregistrée save_card: Enregistrer la carte pour une utilisation ultérieure + create_new_card: ou entrez les détails de la nouvelle carte ci-dessous explaination: Vous pouvez vérifier et confirmer votre commande à l'étape suivante qui comprend les coûts finaux. submit: Suivant - Récapitulatif de la commande cancel: Retour à Vos coordonnées @@ -1730,7 +1740,7 @@ fr_BE: apply_voucher: Appliquer le bon d'achat placeholder: Entrer le code du bon d'achat confirm_delete: Êtes-vous sûr de vouloir supprimer le bon ? - warning_forfeit_remaining_amount: "Remarque : si le total de votre commande est inférieur à votre bon, vous ne pourrez peut-être pas dépenser la valeur restante." + warning_forfeit_remaining_amount: "Remarque : si le total de votre commande est inférieur à votre bon, vous ne pourrez peut-être pas dépenser la valeur restante." step3: delivery_details: title: Détails de livraison @@ -3626,6 +3636,7 @@ fr_BE: email: Email account_updated: "Compte mis à jour!" email_updated: "Le compte sera mis à jour une fois la nouvelle adresse-mail confirmée" + show_api_key_view_toggled: "L'affichage de la clé API a été modifié !" my_account: "Mon compte" date: "Date" time: "Heure" @@ -4013,12 +4024,16 @@ fr_BE: new_variant: "Nouvelle variante" form: sku: "Référence produit" - price: "Prix" unit_price: "Prix unitaire" display_as: "Unité affichéé" display_name: "Nom d'affichage" display_as_placeholder: 'Ex: 2 kilo' display_name_placeholder: 'ex: Tomates' + unit_scale: "Unité" + unit: Unité + price: Prix + unit_value: Valeur unitaire + variant_category: Catégorie autocomplete: out_of_stock: "Pas en stock" producer_name: "Producteur·trice" @@ -4232,6 +4247,7 @@ fr_BE: key_cleared: "clé effacée" shipment: cannot_ready: "Impossible de préparer l'expédition." + toggle_api_key_view: "Afficher la vue de la clé API pour l'utilisateur" unit: unité per_unit: Montant par unité datetime: diff --git a/config/locales/fr_CA.yml b/config/locales/fr_CA.yml index 894430b7b79..66b41e828be 100644 --- a/config/locales/fr_CA.yml +++ b/config/locales/fr_CA.yml @@ -49,13 +49,13 @@ fr_CA: price: "Prix" primary_taxon_id: "Catégorie Produit" shipping_category_id: "Condition de transport" - variant_unit: "Unit Scale" - variant_unit_name: "Unité de la variante" - unit_value: "Nb unités" spree/variant: primary_taxon: "Catégorie Produit" shipping_category_id: "Condition de transport" supplier: "Fournisseur" + variant_unit: "Unit Scale" + variant_unit_name: "Unité de la variante" + unit_value: "Nb unités" spree/credit_card: base: "Carte de crédit" number: "N° commande" @@ -1375,6 +1375,10 @@ fr_CA: En savoir plus sur le Annuaire alimentaire de Waterloo. + vine: + enable: "Se connecter" + disable: "Déconnecter" + need_to_be_manager: "Seuls les gestionnaires peuvent connecter des applications." actions: edit_profile: Paramètres properties: Labels / propriétés @@ -4472,12 +4476,16 @@ fr_CA: new_variant: "Nouvelle variante" form: sku: "Référence Produit" - price: "Prix" unit_price: "Prix unitaire" display_as: "Afficher comme" display_name: "Nom affiché" display_as_placeholder: 'ex. 2 kg' display_name_placeholder: 'ex. Tomates' + unit_scale: "Échelle d'unité" + unit: Unité + price: Prix + unit_value: Nb unités + variant_category: Catégorie autocomplete: out_of_stock: "En rupture de stock" producer_name: "Producteur" diff --git a/config/locales/fr_CH.yml b/config/locales/fr_CH.yml index f43a96e2ffa..be8e5b4129b 100644 --- a/config/locales/fr_CH.yml +++ b/config/locales/fr_CH.yml @@ -31,11 +31,11 @@ fr_CH: price: "Prix" primary_taxon_id: "Catégorie Produit" shipping_category_id: "Condition de transport" - variant_unit_name: "Unité de la variante" spree/variant: primary_taxon: "Catégorie Produit" shipping_category_id: "Condition de transport" supplier: "Fournisseur" + variant_unit_name: "Unité de la variante" spree/credit_card: base: "Carte de crédit" number: "N° commande" @@ -1105,6 +1105,8 @@ fr_CH: loading: "Chargement en cours" discover_regen: loading: "Chargement en cours" + vine: + enable: "A propos" actions: edit_profile: Paramètres properties: Labels / propriétés @@ -4002,12 +4004,14 @@ fr_CH: new_variant: "Nouvelle variante" form: sku: "Référence Produit" - price: "Prix" unit_price: "Prix unitaire" display_as: "Unité affichée" display_name: "Nom affiché" display_as_placeholder: 'ex. 2 kg' display_name_placeholder: 'ex. Tomates' + unit: Unité + price: Prix + variant_category: Catégorie autocomplete: out_of_stock: "En rupture de stock" producer_name: "Producteur" diff --git a/config/locales/fr_CM.yml b/config/locales/fr_CM.yml index 2431e13e231..b7003f505cd 100644 --- a/config/locales/fr_CM.yml +++ b/config/locales/fr_CM.yml @@ -31,11 +31,11 @@ fr_CM: price: "Prix" primary_taxon_id: "Catégorie Produit" shipping_category_id: "Condition de transport" - variant_unit_name: "Unité de la variante" spree/variant: primary_taxon: "Catégorie Produit" shipping_category_id: "Condition de transport" supplier: "Fournisseur" + variant_unit_name: "Unité de la variante" spree/credit_card: base: "Carte de crédit" number: "N° commande" @@ -1029,6 +1029,8 @@ fr_CM: loading: "Chargement en cours" discover_regen: loading: "Chargement en cours" + vine: + enable: "A propos" actions: edit_profile: Paramètres properties: Labels / propriétés @@ -3896,12 +3898,14 @@ fr_CM: new_variant: "Nouvelle variante" form: sku: "Référence Produit" - price: "Prix" unit_price: "Prix unitaire" display_as: "Unité affichée" display_name: "Nom affiché" display_as_placeholder: 'ex. 2 kg' display_name_placeholder: 'ex. Tomates' + unit: Unité + price: Prix + variant_category: Catégorie autocomplete: out_of_stock: "En rupture de stock" producer_name: "Producteur" diff --git a/config/locales/hi.yml b/config/locales/hi.yml index 2b5980c30b6..9697b6fa323 100644 --- a/config/locales/hi.yml +++ b/config/locales/hi.yml @@ -49,12 +49,12 @@ hi: price: "कीमत" primary_taxon_id: "उत्पाद की श्रेणी" shipping_category_id: "शिपिंग श्रेणी" - variant_unit_name: "वेरिएंट यूनिट का नाम" - unit_value: "यूनिट वैल्यू" spree/variant: primary_taxon: "उत्पाद की श्रेणी" shipping_category_id: "शिपिंग श्रेणी" supplier: "आपूर्तिकर्ता" + variant_unit_name: "वेरिएंट यूनिट का नाम" + unit_value: "यूनिट वैल्यू" spree/credit_card: base: "क्रेडिट कार्ड" number: "नंबर" @@ -1233,6 +1233,8 @@ hi: loading: "लोड हो रहा" discover_regen: loading: "लोड हो रहा" + vine: + enable: "मूल्य निर्धारण" actions: edit_profile: सेटिंग्स properties: प्रॉपर्टीज़ @@ -4235,12 +4237,15 @@ hi: new_variant: "नया वैरिएंट" form: sku: "SKU" - price: "कीमत" unit_price: "यूनिट की कीमत" display_as: "इस रूप में प्रदर्शित करें" display_name: "नाम प्रदर्शित करें" display_as_placeholder: 'उदाहरण 2 किलोग्राम' display_name_placeholder: 'उदाहरण टमाटर' + unit: यूनिट + price: कीमत + unit_value: यूनिट वैल्यू + variant_category: श्रेणी autocomplete: out_of_stock: "आउट ऑफ स्टॉक" producer_name: "उत्पादक" diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 927a200f0fa..57f38011201 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -49,12 +49,12 @@ hu: price: "Ár" primary_taxon_id: "Termékkategória" shipping_category_id: "Szállítási mód" - variant_unit_name: "Változat egység neve" - unit_value: "Egység értéke" spree/variant: primary_taxon: "Termékkategória" shipping_category_id: "Szállítási mód" supplier: "Beszállító" + variant_unit_name: "Változat egység neve" + unit_value: "Egység értéke" spree/credit_card: base: "Hitelkártya" number: "Szám" @@ -1323,6 +1323,10 @@ hu: target="_blank"> Tudj meg többet a Regeneratív gyakorlatokról. + vine: + enable: "Csatlakozás" + disable: "Lecsatlakozás" + need_to_be_manager: "Csak a megfelelő jogosultsággal rendelkező felhasználók csatlakoztathatnak alkalmazásokat." actions: edit_profile: Beállítások properties: Tulajdonságok @@ -4362,12 +4366,16 @@ hu: new_variant: "Új Változat" form: sku: "SKU" - price: "Ár" unit_price: "Egységár" display_as: "Megjelenítés mint" display_name: "Megjelenítendő név" display_as_placeholder: 'például. 2 kg''' display_name_placeholder: 'például. paradicsom' + unit_scale: "Mértékegység skála" + unit: Mértékegység + price: Ár + unit_value: Egység értéke + variant_category: Kategória autocomplete: out_of_stock: "Nincs raktáron" producer_name: "Termelő" diff --git a/config/locales/it.yml b/config/locales/it.yml index bd377afd9d3..bf37062fa51 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -46,12 +46,12 @@ it: price: "Prezzo" primary_taxon_id: "Categoria Prodotto" shipping_category_id: "Categoria Spedizioni" - variant_unit_name: "Nome Unità Variante" - unit_value: "Valore unità" spree/variant: primary_taxon: "Categoria Prodotto" shipping_category_id: "Categoria Spedizioni" supplier: "Fornitore" + variant_unit_name: "Nome Unità Variante" + unit_value: "Valore unità" spree/credit_card: base: "Carta di Credito" number: "Numero" @@ -1150,6 +1150,8 @@ it: loading: "Caricamento" discover_regen: loading: "Caricamento" + vine: + enable: "Blog" actions: edit_profile: Impostazioni properties: Proprietà @@ -4091,12 +4093,15 @@ it: new_variant: "Nuova variante" form: sku: "Codice ID" - price: "Prezzo" unit_price: "Prezzo unitario" display_as: "Visualizza come" display_name: "Nome da visualizzare" display_as_placeholder: 'es. 2 kg' display_name_placeholder: 'es. Pomodori' + unit: Unità + price: Prezzo + unit_value: Valore unità + variant_category: Categoria autocomplete: out_of_stock: "Esaurito" producer_name: "Produttore" diff --git a/config/locales/it_CH.yml b/config/locales/it_CH.yml index 9d745d7a5f2..bcf299093a7 100644 --- a/config/locales/it_CH.yml +++ b/config/locales/it_CH.yml @@ -31,11 +31,11 @@ it_CH: price: "Prezzo" primary_taxon_id: "Categoria prodotto" shipping_category_id: "Categoria Spedizioni" - variant_unit_name: "Nome Unità Variante" spree/variant: primary_taxon: "Categoria prodotto" shipping_category_id: "Categoria Spedizioni" supplier: "Fornitore" + variant_unit_name: "Nome Unità Variante" spree/credit_card: base: "Carta di Credito" number: "Numero" @@ -1079,6 +1079,8 @@ it_CH: loading: "Caricamento" discover_regen: loading: "Caricamento" + vine: + enable: "Blog" actions: edit_profile: Impostazioni properties: Proprietà @@ -3931,12 +3933,14 @@ it_CH: new_variant: "Nuova variante" form: sku: "Codice ID" - price: "Prezzo" unit_price: "Prezzo unitario" display_as: "Visualizza come" display_name: "Nome da visualizzare" display_as_placeholder: 'es. 2 kg' display_name_placeholder: 'es. Pomodori' + unit: Unità + price: Prezzo + variant_category: Categoria autocomplete: out_of_stock: "Esaurito" producer_name: "Produttore" diff --git a/config/locales/ko.yml b/config/locales/ko.yml index e4f508e1546..c77d9215fbe 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -31,11 +31,11 @@ ko: price: "가격" primary_taxon_id: "물품 목록" shipping_category_id: "전송물품 목록" - variant_unit_name: "변경된 구성 단위 이름" spree/variant: primary_taxon: "물품 목록" shipping_category_id: "전송물품 목록" supplier: "공급업체" + variant_unit_name: "변경된 구성 단위 이름" spree/credit_card: base: "신용카드" number: "숫자" @@ -1099,6 +1099,8 @@ ko: loading: "로딩 중" discover_regen: loading: "로딩 중" + vine: + enable: "함께하고 싶으시다면" actions: edit_profile: 설정 properties: 특성 @@ -3898,12 +3900,14 @@ ko: new_variant: "새로운 변경사항" form: sku: "재고 관리 단위" - price: "가격" unit_price: "단가" display_as: "다른 이름으로 표시" display_name: "이름 표시" display_as_placeholder: '예. 2 kg' display_name_placeholder: '예. Tomatoes' + unit: 단위 + price: 가격 + variant_category: 목록 autocomplete: out_of_stock: "품절" producer_name: "제공자" diff --git a/config/locales/ml.yml b/config/locales/ml.yml index 14407160c35..2db92efb786 100644 --- a/config/locales/ml.yml +++ b/config/locales/ml.yml @@ -49,12 +49,12 @@ ml: price: "വില" primary_taxon_id: "ഉൽപ്പന്ന വിഭാഗം" shipping_category_id: "ഷിപ്പിംഗ് വിഭാഗം" - variant_unit_name: "വേരിയന്റ് യൂണിറ്റിന്റെ പേര്" - unit_value: "യൂണിറ്റ് മൂല്യം" spree/variant: primary_taxon: "ഉൽപ്പന്ന വിഭാഗം" shipping_category_id: "അയക്കൽ വിഭാഗം" supplier: "വിതരണക്കാരൻ" + variant_unit_name: "വേരിയന്റ് യൂണിറ്റിന്റെ പേര്" + unit_value: "യൂണിറ്റ് മൂല്യം" spree/credit_card: base: "ക്രെഡിറ്റ് കാർഡ്" number: "നമ്പർ" @@ -1242,6 +1242,8 @@ ml: discover_regen: title: "റീജനറേറ്റീവ് കണ്ടെത്തുക" loading: "ലോഡിംഗ്" + vine: + enable: "ബന്ധിപ്പിക്കുക" actions: edit_profile: ക്രമീകരണങ്ങൾ properties: പ്രോപ്പർട്ടികൾ @@ -4262,12 +4264,15 @@ ml: new_variant: "പുതിയ വേരിയന്റ്" form: sku: "എസ്.കെ.യു" - price: "വില" unit_price: "യൂണിറ്റ് വില" display_as: "പ്രദർശന മാർഗ്ഗം" display_name: "പ്രദർശന നാമം" display_as_placeholder: 'ഉദാ. 2 കി.ഗ്രാം' display_name_placeholder: 'ഉദാ. തക്കാളി' + unit: യൂണിറ്റ് + price: വില + unit_value: യൂണിറ്റ് മൂല്യം + variant_category: വിഭാഗം autocomplete: out_of_stock: "സ്റ്റോക്കില്ല" producer_name: "പ്രൊഡ്യൂസർ" diff --git a/config/locales/mr.yml b/config/locales/mr.yml index 9129e1711b3..4db419b77e2 100644 --- a/config/locales/mr.yml +++ b/config/locales/mr.yml @@ -49,12 +49,12 @@ mr: price: "किंमत" primary_taxon_id: "उत्पादन श्रेणी" shipping_category_id: "शिपिंग श्रेणी" - variant_unit_name: "वेरिएंट युनिटचे नाव" - unit_value: "युनिट मूल्य" spree/variant: primary_taxon: "उत्पादन श्रेणी" shipping_category_id: "शिपिंग श्रेणी" supplier: "पुरवठादार" + variant_unit_name: "वेरिएंट युनिटचे नाव" + unit_value: "युनिट मूल्य" spree/credit_card: base: "क्रेडीट कार्ड" number: "क्रमांक" @@ -1221,6 +1221,9 @@ mr: create_custom_tab: "शॉपफ्रंटमध्ये कस्टम टॅब तयार करा" custom_tab_title: "कस्टम टॅबसाठी शीर्षक" custom_tab_content: "कस्टम टॅबसाठी मजकूर" + connected_apps: + vine: + enable: "किंमत" actions: edit_profile: सेटिंग्ज properties: 'गुणधर्म ' @@ -4148,12 +4151,14 @@ mr: new_variant: "नवीन प्रकार" form: sku: "SKU" - price: "किंमत" unit_price: "युनिट किंमत" display_as: "म्हणून प्रदर्शित करा" display_name: "डिस्प्ले नाव" display_as_placeholder: 'उदा. 2 किलो' display_name_placeholder: 'उदा. टोमॅटो' + price: किंमत + unit_value: युनिट मूल्य + variant_category: श्रेणी autocomplete: out_of_stock: "स्टॉक संपला" producer_name: "उत्पादक" diff --git a/config/locales/nb.yml b/config/locales/nb.yml index 9ed17d144c8..c89ea8b2fb0 100644 --- a/config/locales/nb.yml +++ b/config/locales/nb.yml @@ -49,12 +49,12 @@ nb: price: "Pris" primary_taxon_id: "Produktkategori" shipping_category_id: "Leveringskategori" - variant_unit_name: "Enhetsnavn Variant" - unit_value: "Enhetsverdi" spree/variant: primary_taxon: "Produktkategori" shipping_category_id: "Leveringskategori" supplier: "Leverandør" + variant_unit_name: "Enhetsnavn Variant" + unit_value: "Enhetsverdi" spree/credit_card: base: "Kredittkort" number: "Antall" @@ -1328,6 +1328,10 @@ nb: target="_blank">Lær mer om Discover Regenerativ + vine: + enable: "Koble til" + disable: "Koble fra" + need_to_be_manager: "Bare ledere kan koble til apper." actions: edit_profile: Innstillinger properties: Egenskaper @@ -4358,12 +4362,16 @@ nb: new_variant: "Ny Variant" form: sku: "SKU" - price: "Pris" unit_price: "Enhetspris" display_as: "Vis som" display_name: "Visningsnavn" display_as_placeholder: 'f.eks. 2 kg' display_name_placeholder: 'f.eks. Tomater' + unit_scale: "Enhetsskala" + unit: Enhet + price: Pris + unit_value: Enhetsverdi + variant_category: Kategori autocomplete: out_of_stock: "Ikke på Lager" producer_name: "Produsent" diff --git a/config/locales/nl_BE.yml b/config/locales/nl_BE.yml index fa66bcaa060..d24f754e2ac 100644 --- a/config/locales/nl_BE.yml +++ b/config/locales/nl_BE.yml @@ -31,11 +31,11 @@ nl_BE: price: "Prijs" primary_taxon_id: "Product categorie" shipping_category_id: "Verzendcategorie" - variant_unit_name: "Variant Unit Name" spree/variant: primary_taxon: "Product categorie" shipping_category_id: "Verzendcategorie" supplier: "Leverancier" + variant_unit_name: "Variant Unit Name" spree/credit_card: base: "Kredietkaart" number: "Nummer" @@ -932,6 +932,8 @@ nl_BE: loading: "Aan het opladen" discover_regen: loading: "Aan het opladen" + vine: + enable: "Connecteer je " actions: edit_profile: Instellingen properties: Eigenschappen @@ -3491,12 +3493,14 @@ nl_BE: new_variant: "Nieuw variant" form: sku: "SKU" - price: "Prijs" unit_price: "Stukprijs" display_as: "Weergeven als" display_name: "Weergave naam" display_as_placeholder: 'bv. 2.kg' display_name_placeholder: 'bv. Tomaten' + unit: Unit + price: Prijs + variant_category: Categorie autocomplete: out_of_stock: "Geen voorraad" producer_name: "Producent" diff --git a/config/locales/pa.yml b/config/locales/pa.yml index a92d5db1312..c42c4c99658 100644 --- a/config/locales/pa.yml +++ b/config/locales/pa.yml @@ -46,12 +46,12 @@ pa: price: "ਕੀਮਤ" primary_taxon_id: "ਉਤਪਾਦ ਸ਼੍ਰੇਣੀ" shipping_category_id: "ਸ਼ਿਪਿੰਗ ਸ਼੍ਰੇਣੀ" - variant_unit_name: "ਵੇਰੀਐਂਟ ਯੂਨਿਟ ਦਾ ਨਾਮ" - unit_value: "ਯੂਨਿਟ ਵੈਲਯੂ" spree/variant: primary_taxon: "ਉਤਪਾਦ ਸ਼੍ਰੇਣੀ" shipping_category_id: "ਸ਼ਿਪਿੰਗ ਸ਼੍ਰੇਣੀ" supplier: "ਸਪਲਾਇਰ" + variant_unit_name: "ਵੇਰੀਐਂਟ ਯੂਨਿਟ ਦਾ ਨਾਮ" + unit_value: "ਯੂਨਿਟ ਵੈਲਯੂ" spree/credit_card: base: "ਕਰੇਡਿਟ ਕਾਰਡ" number: "ਨੰਬਰ" @@ -1217,6 +1217,8 @@ pa: loading: "ਲੋਡ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ" discover_regen: loading: "ਲੋਡ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ" + vine: + enable: "ਕਨੈਕਟ" actions: edit_profile: ਸੈਟਿੰਗਾਂ properties: ਪ੍ਰਾਪਰਟੀਜ਼ @@ -4129,12 +4131,15 @@ pa: new_variant: "ਨਵਾਂ ਵੇਰੀਐਂਟ" form: sku: "SKU" - price: "ਕੀਮਤ" unit_price: "ਯੂਨਿਟ ਦੀ ਕੀਮਤ" display_as: "ਇਸ ਤਰ੍ਹਾਂ ਪ੍ਰਦਰਸ਼ਿਤ ਕਰੋ" display_name: "ਡਿਸਪਲੇ ਕੀਤੇ ਜਾਣ ਵਾਲਾ ਨਾਂ" display_as_placeholder: 'ਜਿਵੇਂ ਕਿ 2 ਕਿਲੋ' display_name_placeholder: 'ਜਿਵੇਂ ਕਿ ਟਮਾਟਰ''' + unit: ਯੂਨਿਟ + price: ਕੀਮਤ + unit_value: ਯੂਨਿਟ ਵੈਲਯੂ + variant_category: ਸ਼੍ਰੇਣੀ autocomplete: out_of_stock: "ਸਟਾਕ ਵਿੱਚ ਨਹੀਂ ਹੈਂ" producer_name: "ਉਤਪਾਦਕ" diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 6578b1fff37..298d7006fce 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -26,11 +26,11 @@ pl: price: "Cena" primary_taxon_id: "Kategoria produktu" shipping_category_id: "Kategoria dostawy" - variant_unit_name: "Nazwa jednostki wariantu" spree/variant: primary_taxon: "Kategoria produktu" shipping_category_id: "Kategoria dostawy" supplier: "Dostawca" + variant_unit_name: "Nazwa jednostki wariantu" spree/credit_card: base: "Karta kredytowa" number: "Numer zamówienia" @@ -880,6 +880,9 @@ pl: email_not_confirmed: "Adres e-mail nie został potwierdzony" vouchers: customers: Klient + connected_apps: + vine: + enable: "Połącz się" actions: edit_profile: Ustawienia properties: Właściwości @@ -3455,11 +3458,13 @@ pl: new_variant: "New Variant" form: sku: "SKU" - price: "Cena" display_as: "Wyświetl jako" display_name: "Wyświetlana nazwa" display_as_placeholder: 'na przykład. 2 kg' display_name_placeholder: 'np. Pomidory' + unit: Jednostka + price: Cena + variant_category: Kategoria autocomplete: out_of_stock: "Obecnie brak na stanie" producer_name: "Producent" diff --git a/config/locales/pt.yml b/config/locales/pt.yml index e29dc251941..a7ebfd230f7 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -31,11 +31,11 @@ pt: price: "Preço" primary_taxon_id: "Categoria de Produto" shipping_category_id: "Categoria de Envio" - variant_unit_name: "Nome da Unidade da Variante" spree/variant: primary_taxon: "Categoria de Produto" shipping_category_id: "Categoria de Envio" supplier: "Fornecedor" + variant_unit_name: "Nome da Unidade da Variante" spree/credit_card: base: "Cartão de Crédito" number: "Número" @@ -972,6 +972,8 @@ pt: loading: "A carregar" discover_regen: loading: "A carregar" + vine: + enable: "Conectar" actions: edit_profile: Definições properties: Propriedades @@ -3457,12 +3459,14 @@ pt: new_variant: "Nova variante" form: sku: "SKU" - price: "Preço" unit_price: "Preço Unitário" display_as: "Mostrar como" display_name: "Nome a apresentar" display_as_placeholder: 'por ex. 2 kg' display_name_placeholder: 'por ex. Tomates' + unit: Unidade + price: Preço + variant_category: Categoria autocomplete: out_of_stock: "Sem Stock" producer_name: "Produtor" diff --git a/config/locales/pt_BR.yml b/config/locales/pt_BR.yml index 2cf1dc829b0..fb394fde76d 100644 --- a/config/locales/pt_BR.yml +++ b/config/locales/pt_BR.yml @@ -29,11 +29,11 @@ pt_BR: price: "Preço" primary_taxon_id: "Categoria de Produto" shipping_category_id: "Tipos de Frete" - variant_unit_name: "Nome da unidade variante" spree/variant: primary_taxon: "Categoria de Produto" shipping_category_id: "Tipos de Frete" supplier: "Fornecedor" + variant_unit_name: "Nome da Unidade da Variante" spree/credit_card: base: "Cartão de Crédito" number: "Número" @@ -1012,6 +1012,8 @@ pt_BR: loading: "Carregando" discover_regen: loading: "Carregando" + vine: + enable: "Conectar" actions: edit_profile: Configurações properties: Propriedades @@ -3780,12 +3782,14 @@ pt_BR: new_variant: "Nova Variante" form: sku: "SKU" - price: "Preço" unit_price: "Preço Unitário" display_as: "Mostrar Como" display_name: "Mostrar Nome" display_as_placeholder: 'ex. 2 kg' display_name_placeholder: 'ex. Tomates' + unit: Unidade + price: Preço + variant_category: Categoria autocomplete: out_of_stock: "Sem estoque" producer_name: "Produtor" diff --git a/config/locales/ru.yml b/config/locales/ru.yml index aa6b6a1d6ab..c24ac4eaeab 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -49,12 +49,12 @@ ru: price: "Цена" primary_taxon_id: "Категория Товара" shipping_category_id: "Категория Доставки" - variant_unit_name: "Название Единицы Варианта" - unit_value: "Значение товара" spree/variant: primary_taxon: "Категория Товара" shipping_category_id: "Категория Доставки" supplier: "Поставщик" + variant_unit_name: "Название Единицы Варианта" + unit_value: "Значение товара" spree/credit_card: base: "Кредитная Карта" number: "Номер" @@ -1286,6 +1286,9 @@ ru: Ваша учетная запись Открытой Сети Продуктов подключена к Discover Regenerative. Добавьте или обновите информацию о своем списке Discover Regenerative здесь. link_label: "Управление списком" + vine: + enable: "Подключить" + disable: "Отключить" actions: edit_profile: Настройки properties: Свойства @@ -4374,12 +4377,16 @@ ru: new_variant: "Новый Вариант" form: sku: "SKU" - price: "Цена" unit_price: "Цена за единицу" display_as: "Показать как" display_name: "Показать имя" display_as_placeholder: 'напр. 2 кг' display_name_placeholder: 'напр. Помидоры' + unit_scale: "Единицы" + unit: Единица измерения + price: Цена + unit_value: Значение товара + variant_category: Категория autocomplete: out_of_stock: "Нет в Наличии" producer_name: "Производитель" diff --git a/config/locales/sv.yml b/config/locales/sv.yml index dd76a3b91db..a3e07a01bf0 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -567,6 +567,9 @@ sv: managers_tip: Andra användare med tillstånd att leda detta företag. vouchers: customers: Kund + connected_apps: + vine: + enable: "Anslut" actions: edit_profile: Inställningar properties: Egenskaper @@ -2349,9 +2352,11 @@ sv: price: "Pris" form: sku: "SKU" - price: "Pris" unit_price: "Styckpris" display_as: "Visa som" + unit: Enhet + price: Pris + variant_category: Kategori autocomplete: producer_name: "Producent" unit: "Enhet" diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 6d6465906c3..7e6b5d26f82 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -31,11 +31,11 @@ tr: price: "Fiyat" primary_taxon_id: "ÜRÜN KATEGORİSİ" shipping_category_id: "TESLİMAT KATEGORİSİ" - variant_unit_name: "Çeşit Birim Adı" spree/variant: primary_taxon: "ÜRÜN KATEGORİSİ" shipping_category_id: "TESLİMAT KATEGORİSİ" supplier: "TEDARİKÇİ" + variant_unit_name: "Çeşit Birim Adı" spree/credit_card: base: "Kredİ kartı" number: "Numara" @@ -1001,6 +1001,8 @@ tr: loading: "Yükleniyor" discover_regen: loading: "Yükleniyor" + vine: + enable: "Bağlan" actions: edit_profile: Ayarlar properties: ÖZELLİKLER @@ -3785,12 +3787,14 @@ tr: new_variant: "Yeni Çeşit" form: sku: "Stok Kodu" - price: "Fiyat" unit_price: "Birim Fiyat" display_as: "Gösterme Şekli" display_name: "Ekran adı" display_as_placeholder: 'Örn. 2 kg' display_name_placeholder: 'Örn. Domates' + unit: Birim + price: Fiyat + variant_category: Kategori autocomplete: out_of_stock: "Stokta Yok" producer_name: "Üretici" diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 785e0a1ce30..a26ad1db693 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -33,11 +33,11 @@ uk: price: "Ціна" primary_taxon_id: "Категорія товару" shipping_category_id: "Категорія доставки" - variant_unit_name: "Назва варіанта одиниці" spree/variant: primary_taxon: "Категорія товару" shipping_category_id: "Категорія доставки" supplier: "Постачальник" + variant_unit_name: "Назва варіанта одиниці" spree/credit_card: base: "Кредитна картка" number: "Номер" @@ -1116,6 +1116,8 @@ uk: loading: "Завантаження" discover_regen: loading: "Завантаження" + vine: + enable: "Підключитися" actions: edit_profile: Налаштування properties: Властивості @@ -4023,12 +4025,14 @@ uk: new_variant: "Новий Варіант" form: sku: "Артикул" - price: "Ціна" unit_price: "Ціна за од." display_as: "Відображати як" display_name: "Відображуване ім'я" display_as_placeholder: 'напр. 2 кг' display_name_placeholder: 'напр. Помідори' + unit: Одиниця + price: Ціна + variant_category: Категорія autocomplete: out_of_stock: "Немає в наявності" producer_name: "Виробник" diff --git a/config/routes/spree.rb b/config/routes/spree.rb index e9d21a66cb5..c6c84fddbec 100644 --- a/config/routes/spree.rb +++ b/config/routes/spree.rb @@ -83,8 +83,10 @@ end end - # duplicate old path for reference when admin_style_v3 enabled - resources :products_old, to: 'products#index', only: :index + if Rails.env.development? + # duplicate old path for reference when admin_style_v3 enabled + resources :products_old, to: 'products#index', only: :index + end get '/variants/search', :to => "variants#search", :as => :search_variants diff --git a/engines/order_management/app/services/order_management/order/updater.rb b/engines/order_management/app/services/order_management/order/updater.rb index 97b77ace28e..c31e2b929d0 100644 --- a/engines/order_management/app/services/order_management/order/updater.rb +++ b/engines/order_management/app/services/order_management/order/updater.rb @@ -240,7 +240,30 @@ def update_pending_payment return unless order.state.in? ["payment", "confirmation", "complete"] return unless order.pending_payments.any? - order.pending_payments.first.update_attribute :amount, order.total + @payment = order.pending_payments.first + return update_payment if @payment.adjustment.nil? + + # Update payment tax fees if needed + new_amount = @payment.payment_method.compute_amount(@payment) + if new_amount != @payment.adjustment.amount + update_payment_adjustment(new_amount) + end + + update_payment + end + + def update_payment + # Update payment with correct amount + @payment.update_attribute :amount, order.total + end + + def update_payment_adjustment(amount) + @payment.adjustment.update_attribute(:amount, amount) + + # Update order total to take into account updated payment fees + update_adjustment_total + update_order_total + persist_totals end end end diff --git a/engines/order_management/spec/services/order_management/order/updater_spec.rb b/engines/order_management/spec/services/order_management/order/updater_spec.rb index 4b1eb0689e2..458bb785ceb 100644 --- a/engines/order_management/spec/services/order_management/order/updater_spec.rb +++ b/engines/order_management/spec/services/order_management/order/updater_spec.rb @@ -121,7 +121,7 @@ module Order updater.update end - context "whith pending payments" do + context "with pending payments" do let(:order) { create(:completed_order_with_totals) } it "updates pending payments" do @@ -183,6 +183,19 @@ module Order expect { updater.update }.to change { payment.reload.amount }.from(10).to(20) end + + it "updates pending payments fees" do + calculator = build(:calculator_flat_percent_per_item, preferred_flat_percent: 10) + payment_method = create(:payment_method, name: "Percentage cash", calculator:) + payment = create(:payment, payment_method:, order:, amount: order.total) + + # update order so the order total will change + update_order_quantity(order) + order.payments.reload + + expect { updater.update }.to change { payment.reload.amount }.from(10).to(22) + .and change { payment.reload.adjustment.amount }.from(1).to(2) + end end context "with order in cart" do diff --git a/lib/open_food_network/feature_toggle.rb b/lib/open_food_network/feature_toggle.rb index a3b1d8b2537..bac5fa61db7 100644 --- a/lib/open_food_network/feature_toggle.rb +++ b/lib/open_food_network/feature_toggle.rb @@ -7,6 +7,19 @@ module OpenFoodNetwork # - http://localhost:3000/admin/feature-toggle/features # module FeatureToggle + def self.conditional_features + features = {} + if Rails.env.development? + features.merge!({ + "admin_style_v3" => <<~DESC, + Test the work-in-progress design updates. + DESC + }); + end + + features + end + # Please add your new feature here to appear in the Flipper UI. # We way move this to a YAML file when it becomes too awkward. # **WARNING:** Features not in this list will be removed. @@ -22,9 +35,6 @@ module FeatureToggle # Flipper.enable("dragon_mode") # CURRENT_FEATURES = { - "admin_style_v3" => <<~DESC, - Test the work-in-progress design updates. - DESC "api_reports" => <<~DESC, An API endpoint for reports at/api/v0/reports/:report_type(/:report_subtype)
@@ -48,7 +58,7 @@ module FeatureToggle
Activated for a user.
The user (INRAE researcher) has access to anonymised sales.
DESC
- }.freeze
+ }.merge(conditional_features).freeze;
# Features you would like to be enabled to start with.
ACTIVE_BY_DEFAULT = {
@@ -75,6 +85,9 @@ def self.setup!
# Checks weather a feature is enabled for any of the given actors.
def self.enabled?(feature_name, *actors)
+ # TODO: Need to remove these checks when we fully remove the toggle from development as well
+ # need this check as Flipper won't recognize 'admin_style_v3' as it is removed for server envs
+ return true if !Rails.env.development? && feature_name == :admin_style_v3
return Flipper.enabled?(feature_name) if actors.empty?
actors.any? do |actor|
diff --git a/package.json b/package.json
index fcc82f57677..b515b4bb026 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@floating-ui/dom": "^1.6.11",
"@hotwired/stimulus": "^3.2",
- "@hotwired/turbo": "^8.0.11",
+ "@hotwired/turbo": "^8.0.12",
"@rails/webpacker": "5.4.4",
"@stimulus-components/rails-nested-form": "^5.0.0",
"cable_ready": "5.0.5",
@@ -32,7 +32,7 @@
"stimulus-flatpickr": "^1.4.0",
"stimulus_reflex": "3.5.1",
"tom-select": "^2.3.1",
- "trix": "^2.1.6",
+ "trix": "^2.1.7",
"turbo_power": "^0.7.0",
"webpack": "~4"
},
diff --git a/spec/fixtures/vcr_cassettes/DfcRequest/refreshes_the_access_token_on_fail.yml b/spec/fixtures/vcr_cassettes/DfcRequest/refreshes_the_access_token_on_fail.yml
index 9a14071f73f..8af0a0f99d2 100644
--- a/spec/fixtures/vcr_cassettes/DfcRequest/refreshes_the_access_token_on_fail.yml
+++ b/spec/fixtures/vcr_cassettes/DfcRequest/refreshes_the_access_token_on_fail.yml
@@ -19,7 +19,7 @@ http_interactions:
message: OK
headers:
Date:
- - Fri, 15 Mar 2024 05:44:06 GMT
+ - Thu, 17 Oct 2024 22:34:30 GMT
Content-Type:
- application/json;charset=UTF-8
Transfer-Encoding:
@@ -29,14 +29,14 @@ http_interactions:
Vary:
- Accept-Encoding
Set-Cookie:
- - AUTH_SESSION_ID=1710481447.162.5206.870756|6055218c9898cae39f8ffd531999e49a;
+ - AUTH_SESSION_ID=1729204471.193.75356.242686|78230f584c0d7db97d376e98de5321dc;
Path=/; Secure; HttpOnly
Cache-Control:
- no-cache, must-revalidate, no-transform, no-store
Referrer-Policy:
- no-referrer
Strict-Transport-Security:
- - max-age=15724800; includeSubDomains
+ - max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
@@ -47,7 +47,7 @@ http_interactions:
encoding: ASCII-8BIT
string: '{"issuer":"https://login.lescommuns.org/auth/realms/data-food-consortium","authorization_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/auth","token_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/token","introspection_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/token/introspect","userinfo_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/userinfo","end_session_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/logout","frontchannel_logout_session_supported":true,"frontchannel_logout_supported":true,"jwks_uri":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/certs","check_session_iframe":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/login-status-iframe.html","grant_types_supported":["authorization_code","implicit","refresh_token","password","client_credentials","urn:openid:params:grant-type:ciba","urn:ietf:params:oauth:grant-type:device_code"],"acr_values_supported":["0","1"],"response_types_supported":["code","none","id_token","token","id_token
token","code id_token","code token","code id_token token"],"subject_types_supported":["public","pairwise"],"id_token_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],"id_token_encryption_alg_values_supported":["RSA-OAEP","RSA-OAEP-256","RSA1_5"],"id_token_encryption_enc_values_supported":["A256GCM","A192GCM","A128GCM","A128CBC-HS256","A192CBC-HS384","A256CBC-HS512"],"userinfo_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512","none"],"userinfo_encryption_alg_values_supported":["RSA-OAEP","RSA-OAEP-256","RSA1_5"],"userinfo_encryption_enc_values_supported":["A256GCM","A192GCM","A128GCM","A128CBC-HS256","A192CBC-HS384","A256CBC-HS512"],"request_object_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512","none"],"request_object_encryption_alg_values_supported":["RSA-OAEP","RSA-OAEP-256","RSA1_5"],"request_object_encryption_enc_values_supported":["A256GCM","A192GCM","A128GCM","A128CBC-HS256","A192CBC-HS384","A256CBC-HS512"],"response_modes_supported":["query","fragment","form_post","query.jwt","fragment.jwt","form_post.jwt","jwt"],"registration_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/clients-registrations/openid-connect","token_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],"token_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],"introspection_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],"introspection_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],"authorization_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],"authorization_encryption_alg_values_supported":["RSA-OAEP","RSA-OAEP-256","RSA1_5"],"authorization_encryption_enc_values_supported":["A256GCM","A192GCM","A128GCM","A128CBC-HS256","A192CBC-HS384","A256CBC-HS512"],"claims_supported":["aud","sub","iss","auth_time","name","given_name","family_name","preferred_username","email","acr"],"claim_types_supported":["normal"],"claims_parameter_supported":true,"scopes_supported":["openid","microprofile-jwt","phone","roles","profile","email","address","web-origins","acr","offline_access"],"request_parameter_supported":true,"request_uri_parameter_supported":true,"require_request_uri_registration":true,"code_challenge_methods_supported":["plain","S256"],"tls_client_certificate_bound_access_tokens":true,"revocation_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/revoke","revocation_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],"revocation_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],"backchannel_logout_supported":true,"backchannel_logout_session_supported":true,"device_authorization_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/auth/device","backchannel_token_delivery_modes_supported":["poll","ping"],"backchannel_authentication_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/ext/ciba/auth","backchannel_authentication_request_signing_alg_values_supported":["PS384","ES384","RS384","ES256","RS256","ES512","PS256","PS512","RS512"],"require_pushed_authorization_requests":false,"pushed_authorization_request_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/ext/par/request","mtls_endpoint_aliases":{"token_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/token","revocation_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/revoke","introspection_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/token/introspect","device_authorization_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/auth/device","registration_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/clients-registrations/openid-connect","userinfo_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/userinfo","pushed_authorization_request_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/ext/par/request","backchannel_authentication_endpoint":"https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/ext/ciba/auth"},"authorization_response_iss_parameter_supported":true}'
- recorded_at: Fri, 15 Mar 2024 05:44:05 GMT
+ recorded_at: Thu, 17 Oct 2024 22:34:30 GMT
- request:
method: post
uri: https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/token
@@ -71,7 +71,7 @@ http_interactions:
message: OK
headers:
Date:
- - Fri, 15 Mar 2024 05:44:07 GMT
+ - Thu, 17 Oct 2024 22:34:31 GMT
Content-Type:
- application/json
Transfer-Encoding:
@@ -81,7 +81,7 @@ http_interactions:
Vary:
- Accept-Encoding
Set-Cookie:
- - AUTH_SESSION_ID=1710481448.492.2309.531618|6055218c9898cae39f8ffd531999e49a;
+ - AUTH_SESSION_ID=1729204472.43.75092.609685|78230f584c0d7db97d376e98de5321dc;
Path=/; Secure; HttpOnly
Cache-Control:
- no-store
@@ -90,7 +90,7 @@ http_interactions:
Referrer-Policy:
- no-referrer
Strict-Transport-Security:
- - max-age=15724800; includeSubDomains
+ - max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
@@ -99,7 +99,7 @@ http_interactions:
- 1; mode=block
body:
encoding: ASCII-8BIT
- string: '{"access_token":"