xsys 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/xsys/model/product.rb +3 -10
- data/lib/xsys/model/stock.rb +1 -1
- data/lib/xsys/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 354c6868131f12429bcc0244cfaa2ee8b838524d
|
4
|
+
data.tar.gz: 32325a7f29a36bc77db20dfaa8e3774f814d8c08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7993470512059218d0542e336d57b60fccae75282cafd5df9c1b68d228f04a61f9ac647f5b6099e0e2af4709194838a724408d2ea734e5a72fa6389570603596
|
7
|
+
data.tar.gz: b2ee1ce7167f8cb136cb0384c155c10cfc8c4ba8e9240cd9802c8d138e68431941e2744defaf43bbeff74b19e41ec31cec4180058a9fd651265ef23239a91567
|
data/CHANGELOG.md
CHANGED
data/lib/xsys/model/product.rb
CHANGED
@@ -34,20 +34,15 @@ module Xsys
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def sellable_stocks
|
37
|
-
stocks.find_all { |s|
|
38
|
-
!['SER', 'EXT'].include?(s.shop_code)
|
39
|
-
}
|
37
|
+
stocks.find_all { |s| !s.shop_service }
|
40
38
|
end
|
41
39
|
|
42
40
|
def sellable_stocks_quantity(options={})
|
43
41
|
result = 0
|
44
|
-
online_shop_codes = ['OL']
|
45
|
-
deposit_shop_codes = ['ADM']
|
46
|
-
no_exhibition_shop_codes = online_shop_codes + deposit_shop_codes
|
47
42
|
|
48
43
|
sellable_stocks.each do |stock|
|
49
44
|
if options[:skip_exhibition]
|
50
|
-
if
|
45
|
+
if stock.shop_has_exhibition
|
51
46
|
result += stock.quantity
|
52
47
|
elsif stock.quantity > 0
|
53
48
|
result += (stock.quantity - 1)
|
@@ -63,9 +58,7 @@ module Xsys
|
|
63
58
|
end
|
64
59
|
|
65
60
|
def service_stocks
|
66
|
-
stocks.find_all { |s|
|
67
|
-
['SER', 'EXT'].include?(s.shop_code)
|
68
|
-
}
|
61
|
+
stocks.find_all { |s| s.shop_service }
|
69
62
|
end
|
70
63
|
|
71
64
|
def service_stocks_quantity
|
data/lib/xsys/model/stock.rb
CHANGED
data/lib/xsys/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xsys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matias Hick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|