oddb2xml 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ === 1.5.1 / 10.06.2013
2
+
3
+ * Update oddb2xml to handle pharmacode that is started with "0"
4
+ * Delete SMNO if article does not have correct GTIN (GTIN must begin with "7680")
5
+
1
6
  === 1.5.0 / 08.06.2013
2
7
 
3
8
  * Fix NINCD and NonPharma products report
@@ -550,8 +550,10 @@ module Oddb2xml
550
550
  if ppac
551
551
  xml.SMCAT ppac[:swissmedic_category] unless ppac[:swissmedic_category].empty?
552
552
  end
553
- if no8
554
- xml.SMNO no8.to_s unless no8.to_s.empty?
553
+ if no8 and !no8.to_s.empty?
554
+ if de_idx[:ean][0..3] == "7680"
555
+ xml.SMNO no8.to_s
556
+ end
555
557
  end
556
558
  #xml.HOSPCD
557
559
  #xml.CLINCD
@@ -176,6 +176,9 @@ module Oddb2xml
176
176
  item[:company_ean] = (gln = comp.at_xpath('.//GLN')) ? gln.text : ''
177
177
  end
178
178
  unless item[:pharmacode].empty?
179
+ if item[:pharmacode].length != 7 # restore zero at the beginnig
180
+ item[:pharmacode] = ("%07i" % item[:pharmacode])
181
+ end
179
182
  unless data[item[:pharmacode]] # pharmacode => GTINs
180
183
  data[item[:pharmacode]] = []
181
184
  end
@@ -1,3 +1,3 @@
1
1
  module Oddb2xml
2
- VERSION = "1.5.0"
2
+ VERSION = "1.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oddb2xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-07 00:00:00.000000000 Z
12
+ date: 2013-06-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubyzip