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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4153e749353b66f77b9436fdef35673422df7dc
4
- data.tar.gz: d5aa2a8ffe1c7b2da4155e56668bde0caa93066d
3
+ metadata.gz: adb16f388ac3fb33664aa49df416a662dac603d0
4
+ data.tar.gz: c7fe8106cfe2c2a9e77d8e48398d3af582419971
5
5
  SHA512:
6
- metadata.gz: ca26e64d3e15b3d8c16804b3c06b22fabf6b342c1de37500b411836ce6b696928e49020f52e8a9e921fba0eaf138cec37a4ef931afb048bdd822c1f9f6117cef
7
- data.tar.gz: 0dae4681cb98862cc35acf072e3e53e97066ace81c2df823b487ae733bfe93521e3369286036a1c34b9fe8b787d1473e63d90636248fa86bba0d67a689e51bc9
6
+ metadata.gz: 33205a79770b5f8ea4fabb0e612f3300c011ee5c489b998af8103eadf72f7ae6c3ca5b48aee8eb14e5397ccfa30c1e172981f8fcb2409ad0b3e64f1068b3547b
7
+ data.tar.gz: f3b2f0c30094349d4725a2a10ca913ccf2bf849880941bf869c79d92ff59ec6571550fc0064286597cc8d6a83013035bc1fc2f5cb72e9746708bcc4111f92904
data/CHANGELOG.md CHANGED
@@ -65,3 +65,7 @@
65
65
  ## v0.0.17
66
66
 
67
67
  * Fixed purchases taxes grand total
68
+
69
+ ## v0.0.18
70
+
71
+ * Added sellable stock total
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Xsys
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
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.17
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-02-12 00:00:00.000000000 Z
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.0
104
+ rubygems_version: 2.2.2
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: Get data from xsys api