xsys 0.2.11 → 0.2.12

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: 59a321f1965944027a14114a97e9686651b834cc
4
- data.tar.gz: ef0845b36f2b548aee88c0220d81f8741abe9281
3
+ metadata.gz: 7c104bd6698a1aea3fa1b95272caf3c6784f193c
4
+ data.tar.gz: 2138ebf0d60a7a2204bf1228d2a396f35820fa58
5
5
  SHA512:
6
- metadata.gz: 35524998e50508f033ad6acc2aed9ed4ff693b8bc87e4c3566bcd395a2e8646ea1119e2d194ba358abf082a6b68f2e7a89b5b75b44a70eb8c7ddb2519782aa72
7
- data.tar.gz: 13e0a2c49c1936c26771bb7defb3d96428a4ede8312cbd94b9f42081b6ef49cfe9e87b7bb6de2e8a8784e8aedc67f87529dafad3f5ed55377d58a10c833eab92
6
+ metadata.gz: b741f0e67e18cf9d86098ccda9b42600320ca29c7589f71c38a44c5a28b553bab42041bb981349d6e4269d9db1403a3be3900bd04dd64d0795cbd985afde3fe8
7
+ data.tar.gz: 259a46b6f089a98013df94cc2c29c04348ffcb6b426817559a2b12fbade91a91f1c94b4e886d60a0feb0080fa2ca55a8127b7e07745f85f661c86eb62a8444e0
data/CHANGELOG.md CHANGED
@@ -161,3 +161,7 @@
161
161
  ## v0.2.11
162
162
 
163
163
  * Bugfixes nil update dates
164
+
165
+ ## v0.2.12
166
+
167
+ * Added last cost to products
@@ -4,7 +4,8 @@ module Xsys
4
4
  def self.attr_list
5
5
  [:id, :name, :cost_updated_at, :sellable, :product_category_id,
6
6
  :product_provider_id, :vat_rate, :taxed_cost, :vat_cost, :total_cost,
7
- :pending_ordered_quantity, :stocks, :prices, :category, :provider]
7
+ :pending_ordered_quantity, :stocks, :prices, :category, :provider,
8
+ :last_total_cost, :last_cost_updated_at]
8
9
  end
9
10
 
10
11
  attr_reader *attr_list
@@ -21,6 +22,8 @@ module Xsys
21
22
  @prices = v.map { |s| ProductPriceList.new(s) }
22
23
  elsif k.to_s == 'cost_updated_at'
23
24
  @cost_updated_at = Time.parse(v) unless v.nil?
25
+ elsif k.to_s == 'last_cost_updated_at'
26
+ @cost_updated_at = Time.parse(v) unless v.nil?
24
27
  else
25
28
  self.send("#{k}=", v) if self.respond_to?(k)
26
29
  end
data/lib/xsys/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Xsys
2
- VERSION = "0.2.11"
2
+ VERSION = "0.2.12"
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.2.11
4
+ version: 0.2.12
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-08-06 00:00:00.000000000 Z
11
+ date: 2014-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler