xsys 0.2.9 → 0.2.10
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 +13 -3
- 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: 95ecba7c9d99f591384aced77ca921384d481e44
|
4
|
+
data.tar.gz: 6f0232471d69495745daa5afa5e482f26c474d18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24287ffa1d88f7c41ee4019bbedac354c04b9020bd297620634f8c838c7260af703e29a1bfc2ca771f3d785a57f036b5aa09024ed8f67bd1fe9ebb990621809e
|
7
|
+
data.tar.gz: b00edb95caf93ee6ecbb3c88f34c0c0d5eb621634004578acdce3442acb21d49ecb20e45c39b0461685cab09df382a2db99dfcc2f020ad924886b74355d97ed8
|
data/CHANGELOG.md
CHANGED
data/lib/xsys/model/product.rb
CHANGED
@@ -27,14 +27,24 @@ module Xsys
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
def
|
30
|
+
def sellable_stocks
|
31
31
|
stocks.find_all { |s|
|
32
32
|
!['SER', 'EXT'].include?(s.shop_code)
|
33
|
-
}
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
def sellable_stocks_quantity
|
37
|
+
sellable_stocks.map(&:quantity).sum
|
38
|
+
end
|
39
|
+
|
40
|
+
def service_stocks
|
41
|
+
stocks.find_all { |s|
|
42
|
+
['SER', 'EXT'].include?(s.shop_code)
|
43
|
+
}
|
34
44
|
end
|
35
45
|
|
36
46
|
def service_stocks_quantity
|
37
|
-
|
47
|
+
service_stocks.map(&:quantity).sum
|
38
48
|
end
|
39
49
|
|
40
50
|
def stocks_quantity
|
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.2.
|
4
|
+
version: 0.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matias Hick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|