solidus_bling 3.4.4 → 3.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/spree/admin/solidus_bling/accounts_controller.rb +2 -2
- data/app/models/solidus_bling/order.rb +2 -1
- data/app/views/spree/admin/solidus_bling/accounts/_form.html.erb +8 -9
- data/db/migrate/20240830124253_add_incoming_category_id_on_payment_method.rb +5 -0
- data/db/migrate/20240830124611_remove_incoming_category_id_from_account.rb +5 -0
- data/lib/solidus_bling/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86fb55a042d40aa34d5eaf3c1dc697d189a8ab9d5bdf551410871eb002b816bd
|
4
|
+
data.tar.gz: b95270aa77365172bdab967704f0ad64ee4e3b26cef5daed44a007c80fd5892e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64986dd4c0f9177c8ae667c8414d6b28e4aad0c0e821f614241c29ae426ebb8325993c0c3e4943dd8b7b7a1e2ce64bffc82a069de49c0faec72aca5cf141d536
|
7
|
+
data.tar.gz: f76a22b611035be87d7a326bb67441807df7b4ef115be32454a4b93691abc14b2716f0d929ab35a02a095400fe62a0bbad4b7c857bf00944d4f44aa402fab858
|
@@ -74,8 +74,8 @@ module Spree
|
|
74
74
|
|
75
75
|
def account_params
|
76
76
|
params.require(:account).permit(
|
77
|
-
:client_id, :client_secret, :refresh_token, :redirect_url, :state, :access_token, :api_key, :external_store_id,
|
78
|
-
payment_methods_attributes: [:id, :spree_payment_method_id, :external_id],
|
77
|
+
:client_id, :client_secret, :refresh_token, :redirect_url, :state, :access_token, :api_key, :external_store_id,
|
78
|
+
payment_methods_attributes: [:id, :spree_payment_method_id, :external_id, :incoming_category_id],
|
79
79
|
shipping_methods_attributes: [:id, :spree_shipping_method_id, :alias, :company],
|
80
80
|
sellers_attributes: [:id, :name, :external_id]
|
81
81
|
)
|
@@ -15,6 +15,7 @@ module SolidusBling
|
|
15
15
|
observacoes_internas = internal_observations
|
16
16
|
transporte = shipment
|
17
17
|
id_vendedor = seller_external_id
|
18
|
+
id_categoria_receita = @account.payment_methods.find_by(spree_payment_method_id: @order.payments.last.payment_method_id).incoming_category_id
|
18
19
|
|
19
20
|
bling_order = BlingApi::Order.new(
|
20
21
|
id_contato: contato.id,
|
@@ -30,7 +31,7 @@ module SolidusBling
|
|
30
31
|
observacoes: "Número do pedido loja: #{@order.number}",
|
31
32
|
observacoes_internas: observacoes_internas,
|
32
33
|
valor_desconto: @order.adjustment_total.abs,
|
33
|
-
id_categoria:
|
34
|
+
id_categoria: id_categoria_receita,
|
34
35
|
transporte: transporte,
|
35
36
|
id_vendedor: id_vendedor
|
36
37
|
).create
|
@@ -25,13 +25,6 @@
|
|
25
25
|
<%= form.text_field :external_store_id, required: true, class: 'fullwidth' %>
|
26
26
|
<%= form.error_message_on :external_store_id %>
|
27
27
|
<% end %>
|
28
|
-
|
29
|
-
<%= form.field_container :incoming_category_id do %>
|
30
|
-
<%= form.label :incoming_category_id, "ID Categoria Receita", class: 'required' %>
|
31
|
-
<%= form.text_field :incoming_category_id, required: true, class: 'fullwidth' %>
|
32
|
-
<%= form.error_message_on :incoming_category_id %>
|
33
|
-
<% end %>
|
34
|
-
|
35
28
|
</div>
|
36
29
|
|
37
30
|
<div class="col-12 col-md-6">
|
@@ -76,18 +69,24 @@
|
|
76
69
|
</legend>
|
77
70
|
<%= form.fields_for :payment_methods do |payment_form| %>
|
78
71
|
<div class="row">
|
79
|
-
<div class="col-12 col-md-
|
72
|
+
<div class="col-12 col-md-4">
|
80
73
|
<div class="field">
|
81
74
|
<%= payment_form.label :spree_payment_method_id, "Método de Pagamento", class: 'required' %>
|
82
75
|
<%= payment_form.select :spree_payment_method_id, @payment_methods, {}, { class: "custom-select fullwidth" } %>
|
83
76
|
</div>
|
84
77
|
</div>
|
85
|
-
<div class="col-12 col-md-
|
78
|
+
<div class="col-12 col-md-4">
|
86
79
|
<div class="field">
|
87
80
|
<%= payment_form.label :external_id, "ID Forma de Pagamento", class: 'required' %>
|
88
81
|
<%= payment_form.text_field :external_id, required: true, class:"fullwidth" %>
|
89
82
|
</div>
|
90
83
|
</div>
|
84
|
+
<div class="col-12 col-md-4">
|
85
|
+
<div class="field">
|
86
|
+
<%= payment_form.label :incoming_category_id, "ID Categoria Receita", class: 'required' %>
|
87
|
+
<%= payment_form.text_field :incoming_category_id, required: true, class:"fullwidth" %>
|
88
|
+
</div>
|
89
|
+
</div>
|
91
90
|
</div>
|
92
91
|
<% end %>
|
93
92
|
</fieldset>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_bling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Todas Essas Coisas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|
@@ -151,6 +151,8 @@ files:
|
|
151
151
|
- db/migrate/20240318171147_add_solidus_bling_seller_id_to_orders.rb
|
152
152
|
- db/migrate/20240318180555_add_deafult_column_to_sellers.rb
|
153
153
|
- db/migrate/20240424112257_add_active_column_to_sellers.rb
|
154
|
+
- db/migrate/20240830124253_add_incoming_category_id_on_payment_method.rb
|
155
|
+
- db/migrate/20240830124611_remove_incoming_category_id_from_account.rb
|
154
156
|
- lib/generators/solidus_bling/install/install_generator.rb
|
155
157
|
- lib/generators/solidus_bling/install/templates/initializer.rb
|
156
158
|
- lib/solidus_bling.rb
|