xsys 0.0.17 → 0.0.18
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 +4 -0
- data/lib/xsys/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adb16f388ac3fb33664aa49df416a662dac603d0
|
4
|
+
data.tar.gz: c7fe8106cfe2c2a9e77d8e48398d3af582419971
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33205a79770b5f8ea4fabb0e612f3300c011ee5c489b998af8103eadf72f7ae6c3ca5b48aee8eb14e5397ccfa30c1e172981f8fcb2409ad0b3e64f1068b3547b
|
7
|
+
data.tar.gz: f3b2f0c30094349d4725a2a10ca913ccf2bf849880941bf869c79d92ff59ec6571550fc0064286597cc8d6a83013035bc1fc2f5cb72e9746708bcc4111f92904
|
data/CHANGELOG.md
CHANGED
data/lib/xsys/model/product.rb
CHANGED
@@ -20,6 +20,10 @@ module Xsys
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
+
def sellable_stock
|
24
|
+
stocks.find_all { |s| ![:ser, :ext].include?(s.shop_code.to_sym) }.map(&:quantity).sum
|
25
|
+
end
|
26
|
+
|
23
27
|
def stock_in(shop_code)
|
24
28
|
stocks.find { |s| s.shop_code.to_sym == shop_code.to_sym }.try(:quantity)
|
25
29
|
end
|
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.0.
|
4
|
+
version: 0.0.18
|
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-
|
11
|
+
date: 2014-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.2.
|
104
|
+
rubygems_version: 2.2.2
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: Get data from xsys api
|