oddb2xml 1.7.7 → 1.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2U1MTZiMWIxZWRjMjJkZGQ3MmJkOTFkNjZlNTNmZjBlNjk4ZWZlYg==
4
+ YzRmYjExNzg3YzVmYjg1Y2QzZTRiNzkwZGZlZWVjNThkOTExNjljNA==
5
5
  data.tar.gz: !binary |-
6
- ZGU2ZWQ0ZGNiYTdkMGNlZjU0NWQwYmFjYzlhNDZmMDhiMjZhNzI1MA==
6
+ MmFiOTY2MTI1MjY4ZDM2MjVhOWUzMGNlY2RjYzE4YzM3NWM1MGU1YQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTFjODM5NzExNjMyYzFjMGQyNjBlNzY2NDI4YzRlZWI4MzczOGE3N2UxMTU3
10
- YmFiYzVkYTlmM2RmMjc0YjU2NjFmZTE2MDM1ZDM2YWUxMzkyOTNiOGEwNjA3
11
- OWE2YjUyNDcyZjQxZmUyZWYxYmY4M2UwZjRmOGFiY2FkNjllYzQ=
9
+ ZTk4NTc1NDUyYWMwN2M0YTQ0NDVlMDIzZTAwZWM4YmFmMmZkZTI0ZTViODNi
10
+ ZDc5ODI1ODU2MDI3NmFkYWEyYTlmMmU3ODljZjllY2Y4NGU5MTYyNjk3MTA0
11
+ OTBkMGViYWIxODhhYzIwNzYzZjkzZWRkYWQ2YmNkMjAzNTEyNjU=
12
12
  data.tar.gz: !binary |-
13
- NmFlNjc4MjZiMzViYmFmMWQ0MzJiOTM4MWQ1MDc1NTg2NzFhNmNmMjJkNGNm
14
- OTYyZjkwYjA0NWU5YzIyZGRlZDZlYzQwZTM1MDQ0ZjI1MzUzYTg0NDkzMWUx
15
- NmE5OGIxOWRhZmZjNTZjMzc1MjlkMzZiMTAzNjA0MTU0MDc0NWE=
13
+ NGE5ZGMyZDMxYjM1MTk4MzdmOTc4M2RiNGJmM2ZlMWI0MzdkYTQ0NmE2YTY3
14
+ ZmE3OWJlOWI5YzYwZTcxNjlmNTk3ZmMwMzFkMmI2YjI4ZmUzMzAxZjZjNDI0
15
+ NTVmNDkzNzY4NzQ3YzQxZjQ3Y2Q5Y2IyMDgxMzQ4NzgwYTEyN2U=
@@ -1,3 +1,7 @@
1
+ === 1.7.8 / 02.04.2014
2
+
3
+ * Don't emit field BC starting with 000000
4
+
1
5
  === 1.7.7 / 02.04.2014
2
6
 
3
7
  * Don't emit pseudo-eans starting with 000000
@@ -568,19 +568,19 @@ module Oddb2xml
568
568
  pac,no8 = nil,de_idx[:ean][4..11] # BAG-XML(SL/LS)
569
569
  ppac = nil # Packungen
570
570
  ean = de_idx[:ean]
571
- ean = 0 if ean.match(/^000000/)
571
+ ean = nil if ean.match(/^000000/)
572
572
  if obj[:seq]
573
573
  pac = obj[:seq][:packages][de_idx[:pharmacode]]
574
574
  pac = obj[:seq][:packages][ean] unless pac
575
575
  else
576
- pac = @items[ean][:packages][ean] if @items and @items[ean] and @items[ean][:packages]
576
+ pac = @items[ean][:packages][ean] if @items and ean and @items[ean] and @items[ean][:packages]
577
577
  end
578
578
  if no8
579
579
  ppac = ((_ppac = @packs[no8.intern] and !_ppac[:is_tier]) ? _ppac : nil)
580
580
  end
581
581
  price = nil
582
- if !@prices.empty? && de_idx[:ean] && @prices[de_idx[:ean]]
583
- price = @prices[de_idx[:ean]] # zurrose
582
+ if !@prices.empty? && ean && @prices[ean]
583
+ price = @prices[ean] # zurrose
584
584
  end
585
585
  xml.ART('DT' => '') {
586
586
  xml.PHAR de_idx[:pharmacode] unless de_idx[:pharmacode].empty?
@@ -591,7 +591,7 @@ module Oddb2xml
591
591
  xml.SMCAT ppac[:swissmedic_category] unless ppac[:swissmedic_category].empty?
592
592
  end
593
593
  if no8 and !no8.to_s.empty?
594
- if de_idx[:ean][0..3] == "7680"
594
+ if ean and ean[0..3] == "7680"
595
595
  xml.SMNO no8.to_s
596
596
  end
597
597
  end
@@ -618,8 +618,8 @@ module Oddb2xml
618
618
  xml.COOL 1 if @fridges.include?($1.to_s)
619
619
  end
620
620
  #xml.TEMP
621
- unless de_idx[:ean].empty?
622
- flag = @flags[de_idx[:ean]]
621
+ if ean and not ean.empty?
622
+ flag = @flags[ean]
623
623
  # as same flag
624
624
  xml.CDBG(flag ? 'Y' : 'N')
625
625
  xml.BG(flag ? 'Y' : 'N')
@@ -681,7 +681,7 @@ module Oddb2xml
681
681
  }
682
682
  xml.ARTBAR {
683
683
  xml.CDTYP 'E13'
684
- xml.BC de_idx[:ean] unless de_idx[:ean].empty?
684
+ xml.BC ean if ean and not ean.empty?
685
685
  xml.BCSTAT 'A' # P is alternative
686
686
  #xml.PHAR2
687
687
  }
@@ -1,3 +1,3 @@
1
1
  module Oddb2xml
2
- VERSION = "1.7.7"
2
+ VERSION = "1.7.8"
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.7.7
4
+ version: 1.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasuhiro Asaka, Zeno R.R. Davatz