bbmb 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +8 -1
- data/bbmb.gemspec +1 -1
- data/lib/bbmb/html/state/favorites.rb +2 -0
- data/lib/bbmb/model/order.rb +14 -9
- data/lib/bbmb/persistence/odba/model/customer.rb +4 -0
- data/lib/bbmb/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 539253d09b62765c28bc81f550e1831fd5d6fade
|
4
|
+
data.tar.gz: 54e3f3a803f0b54ec32c1fd2bc111f2f07ed5e63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b56bf4ea3c9fc2f19eca1eeea3db51ca2faee383fe63f79fc0940c0e7531c8b090d7b7368be64d14b177fd3363c9868d9e3a6e4383b5700117de2374d5b6f6a
|
7
|
+
data.tar.gz: 2bc9a62ea60ec95ee4141921c4aeb75fae09fd12a275e453404471eac7b0a6d4a205ad2b2d49e42677cf3b4bbc892dd4c214614a8429bdf32ce2ee9911367147
|
data/History.txt
CHANGED
@@ -1,4 +1,11 @@
|
|
1
|
-
=== 2.2.
|
1
|
+
=== 2.2.3 / 22.05.2017
|
2
|
+
|
3
|
+
* Delete in Schnellbestellung all positions with an invalid product
|
4
|
+
* Fixed nil access when displaying an order with invalid positions
|
5
|
+
* Fixed login problem because of invalid current_order
|
6
|
+
* Updated to sbsm 1.4.1 to be able to use the async method
|
7
|
+
|
8
|
+
=== 2.2.2 / 17.05.2017
|
2
9
|
|
3
10
|
* Remove bin/bbmbd. It is replaced by config.ru to start the rack process
|
4
11
|
* Made bin/bbmb_admin work again
|
data/bbmb.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency "ydbd-pg", '>= 0.5.2'
|
22
22
|
spec.add_dependency "ydbi", '>= 0.5.3'
|
23
23
|
spec.add_dependency "json"
|
24
|
-
spec.add_dependency "sbsm", '>= 1.4.
|
24
|
+
spec.add_dependency "sbsm", '>= 1.4.1'
|
25
25
|
spec.add_dependency "htmlgrid"
|
26
26
|
spec.add_dependency "ydim", '>= 0.5.1'
|
27
27
|
spec.add_dependency "syck"
|
data/lib/bbmb/model/order.rb
CHANGED
@@ -87,6 +87,7 @@ class Order
|
|
87
87
|
info
|
88
88
|
end
|
89
89
|
def calculate_effective_prices
|
90
|
+
delete_invalid_positions
|
90
91
|
@positions.each { |pos|
|
91
92
|
pos.price_effective = price_effective(pos)
|
92
93
|
}
|
@@ -121,6 +122,7 @@ class Order
|
|
121
122
|
add(quantity, product)
|
122
123
|
end
|
123
124
|
def item_count
|
125
|
+
delete_invalid_positions
|
124
126
|
@positions.inject(0) { |memo, pos| memo + pos.quantity }
|
125
127
|
end
|
126
128
|
def i2_body
|
@@ -204,15 +206,7 @@ class Order
|
|
204
206
|
twin
|
205
207
|
end
|
206
208
|
def total
|
207
|
-
|
208
|
-
begin
|
209
|
-
pos.total
|
210
|
-
false
|
211
|
-
rescue => error
|
212
|
-
SBSM.info "Deleting an invalid position from order #{order_id}"
|
213
|
-
true
|
214
|
-
end
|
215
|
-
end
|
209
|
+
delete_invalid_positions
|
216
210
|
@positions.inject(@shipping) { |memo, pos| pos.total + memo }
|
217
211
|
end
|
218
212
|
def total_incl_vat
|
@@ -259,6 +253,17 @@ class Order
|
|
259
253
|
def _formatted_comment(replacement=';')
|
260
254
|
@comment.to_s.gsub(/[\r\n]+/, replacement)[0,60] if @comment
|
261
255
|
end
|
256
|
+
def delete_invalid_positions
|
257
|
+
@positions.delete_if do |pos|
|
258
|
+
begin
|
259
|
+
pos.total
|
260
|
+
false
|
261
|
+
rescue => error
|
262
|
+
SBSM.info "Deleting an invalid position from order #{order_id}"
|
263
|
+
true
|
264
|
+
end
|
265
|
+
end
|
266
|
+
end
|
262
267
|
end
|
263
268
|
end
|
264
269
|
end
|
data/lib/bbmb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bbmb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masaomi Hatakeyama, Zeno R.R. Davatz, Niklaus Giger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: odba
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.4.
|
75
|
+
version: 1.4.1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.4.
|
82
|
+
version: 1.4.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: htmlgrid
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|